Skip to content

Commit

Permalink
chore!(pip.parse): remove parse_all_requirements_files attribute (baz…
Browse files Browse the repository at this point in the history
…elbuild#2407)

Remove the deprecated symbol and use the default `pip` extension in
`rules_python` to pull `twine` as part of the dependencies.

Work towards bazelbuild#1361
Fixes bazelbuild#2268 for all the users by default
  • Loading branch information
aignas authored Nov 19, 2024
1 parent d52b964 commit b9b0948
Show file tree
Hide file tree
Showing 6 changed files with 197 additions and 437 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Unreleased changes template.
{bzl:obj}`python_register_toolchains` and
{bzl:obj}`python_register_multi_toolchains` macros or the {bzl:obj}`python`
bzlmod extension.
* (bzlmod) `pip.parse.parse_all_requirements_files` attribute has been removed.
See notes in the previous versions about what to do.

Other changes:
* (python_repository) Start honoring the `strip_prefix` field for `zstd` archives.
Expand Down Expand Up @@ -214,7 +216,7 @@ Other changes:
* (bzlmod) The extension evaluation has been adjusted to always generate the
same lock file irrespective if `experimental_index_url` is set by any module
or not. To opt into this behavior, set
{bzl:obj}`pip.parse.parse_all_requirements_files`, which will become the
`pip.parse.parse_all_requirements_files`, which will become the
default in future releases leading up to `1.0.0`. Fixes
[#2268](https://github.com/bazelbuild/rules_python/issues/2268). A known
issue is that it may break `bazel query` and in these use cases it is
Expand Down
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ register_toolchains("@pythons_hub//:all")
#####################
# Install twine for our own runfiles wheel publishing and allow bzlmod users to use it.

pip = use_extension("//python/private/pypi:pip.bzl", "pip_internal")
pip = use_extension("//python/extensions:pip.bzl", "pip")
pip.parse(
# NOTE @aignas 2024-10-26: We have an integration test that depends on us
# being able to build sdists for this hub, so explicitly set this to False.
Expand Down
3 changes: 0 additions & 3 deletions examples/bzlmod/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,6 @@ pip.parse(
"host",
],
hub_name = "pip",
# Parse all requirements files for the same lock file on all OSes, this will
# become the default with 1.0 release
parse_all_requirements_files = True,
python_version = "3.10",
# The requirements files for each platform that we want to support.
requirements_by_platform = {
Expand Down
Loading

0 comments on commit b9b0948

Please sign in to comment.