Skip to content

Commit b9b0948

Browse files
authored
chore!(pip.parse): remove parse_all_requirements_files attribute (#2407)
Remove the deprecated symbol and use the default `pip` extension in `rules_python` to pull `twine` as part of the dependencies. Work towards #1361 Fixes #2268 for all the users by default
1 parent d52b964 commit b9b0948

File tree

6 files changed

+197
-437
lines changed

6 files changed

+197
-437
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ Unreleased changes template.
6868
{bzl:obj}`python_register_toolchains` and
6969
{bzl:obj}`python_register_multi_toolchains` macros or the {bzl:obj}`python`
7070
bzlmod extension.
71+
* (bzlmod) `pip.parse.parse_all_requirements_files` attribute has been removed.
72+
See notes in the previous versions about what to do.
7173

7274
Other changes:
7375
* (python_repository) Start honoring the `strip_prefix` field for `zstd` archives.
@@ -214,7 +216,7 @@ Other changes:
214216
* (bzlmod) The extension evaluation has been adjusted to always generate the
215217
same lock file irrespective if `experimental_index_url` is set by any module
216218
or not. To opt into this behavior, set
217-
{bzl:obj}`pip.parse.parse_all_requirements_files`, which will become the
219+
`pip.parse.parse_all_requirements_files`, which will become the
218220
default in future releases leading up to `1.0.0`. Fixes
219221
[#2268](https://github.com/bazelbuild/rules_python/issues/2268). A known
220222
issue is that it may break `bazel query` and in these use cases it is

MODULE.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ register_toolchains("@pythons_hub//:all")
5454
#####################
5555
# Install twine for our own runfiles wheel publishing and allow bzlmod users to use it.
5656

57-
pip = use_extension("//python/private/pypi:pip.bzl", "pip_internal")
57+
pip = use_extension("//python/extensions:pip.bzl", "pip")
5858
pip.parse(
5959
# NOTE @aignas 2024-10-26: We have an integration test that depends on us
6060
# being able to build sdists for this hub, so explicitly set this to False.

examples/bzlmod/MODULE.bazel

-3
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,6 @@ pip.parse(
231231
"host",
232232
],
233233
hub_name = "pip",
234-
# Parse all requirements files for the same lock file on all OSes, this will
235-
# become the default with 1.0 release
236-
parse_all_requirements_files = True,
237234
python_version = "3.10",
238235
# The requirements files for each platform that we want to support.
239236
requirements_by_platform = {

0 commit comments

Comments
 (0)