forked from bazelbuild/rules_python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove internal usage of deprecated py_binary ad py_test (baze…
…lbuild#2569) This goes together with bazelbuild#2565 to remove the internal usage of the deprecated symbols. This also fixes the compile_pip_requirements symbol to print the correct deprecation message. Builds on top of 611eda8 The example message that would be printed is as follows: ``` The 'py_test' symbol in '@+python+python_3_11//:defs.bzl' is deprecated. It is an alias to the regular rule; use it directly instead: load("@rules_python//python:py_test.bzl", "py_test") py_test( name = "versioned_py_test", srcs = ["dummy.py"], main = "dummy.py", python_version = "3.11.11", ) ``` --------- Co-authored-by: Richard Levasseur <[email protected]>
- Loading branch information
Showing
22 changed files
with
336 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
load("@python_versions//3.11:defs.bzl", compile_pip_requirements_311 = "compile_pip_requirements") | ||
load("@rules_python//python:pip.bzl", "compile_pip_requirements") | ||
|
||
# NOTE: To update the requirements, you need to uncomment the rules_python | ||
# override in the MODULE.bazel. | ||
compile_pip_requirements_311( | ||
compile_pip_requirements( | ||
name = "requirements", | ||
src = "requirements.in", | ||
python_version = "3.11", | ||
requirements_txt = "requirements_lock_3_11.txt", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
load("@python//3.10:defs.bzl", compile_pip_requirements_3_10 = "compile_pip_requirements") | ||
load("@python//3.11:defs.bzl", compile_pip_requirements_3_11 = "compile_pip_requirements") | ||
load("@python//3.8:defs.bzl", compile_pip_requirements_3_8 = "compile_pip_requirements") | ||
load("@python//3.9:defs.bzl", compile_pip_requirements_3_9 = "compile_pip_requirements") | ||
load("@rules_python//python:pip.bzl", "compile_pip_requirements") | ||
|
||
compile_pip_requirements_3_8( | ||
compile_pip_requirements( | ||
name = "requirements_3_8", | ||
src = "requirements.in", | ||
python_version = "3.8", | ||
requirements_txt = "requirements_lock_3_8.txt", | ||
) | ||
|
||
compile_pip_requirements_3_9( | ||
compile_pip_requirements( | ||
name = "requirements_3_9", | ||
src = "requirements.in", | ||
python_version = "3.9", | ||
requirements_txt = "requirements_lock_3_9.txt", | ||
) | ||
|
||
compile_pip_requirements_3_10( | ||
compile_pip_requirements( | ||
name = "requirements_3_10", | ||
src = "requirements.in", | ||
python_version = "3.10", | ||
requirements_txt = "requirements_lock_3_10.txt", | ||
) | ||
|
||
compile_pip_requirements_3_11( | ||
compile_pip_requirements( | ||
name = "requirements_3_11", | ||
src = "requirements.in", | ||
python_version = "3.11", | ||
requirements_txt = "requirements_lock_3_11.txt", | ||
) |
Oops, something went wrong.