Skip to content

Commit cfcc8c5

Browse files
committed
Merge branch 'main' into fix/lockfile-inconsistency
2 parents 8d418f4 + 72ddf0c commit cfcc8c5

File tree

23 files changed

+46
-89
lines changed

23 files changed

+46
-89
lines changed

.bazelci/presubmit.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ buildifier:
9494
bazel: "7.x"
9595
environment:
9696
RULES_PYTHON_ENABLE_PYSTAR: "1"
97+
build_flags:
98+
- "--config=bazel7.x"
9799
test_flags:
98100
# The doc check tests fail because the Starlark implementation makes the
99101
# PyInfo and PyRuntimeInfo symbols become documented.

.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ build:rtd --stamp
3333
# Some bzl files contain repos only available under bzlmod
3434
build:rtd --enable_bzlmod
3535

36+
common:bazel7.x --incompatible_python_disallow_native_rules
37+
3638
build --lockfile_mode=update

CHANGELOG.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,27 @@ A brief description of the categories of changes:
2323
{#v0-0-0}
2424
## Unreleased
2525

26+
### Changed
27+
- (bzlmod) `pip.parse` spoke repository naming has changed in places where the
28+
users specify different package versions per platform in the same hub repository.
29+
We advise the users to use the `hub` repository directly to avoid such breakage in
30+
the future.
31+
32+
### Added
33+
- (bzlmod) `pip.parse` now supports `whl-only` setup using
34+
`download_only = True` where users can specify multiple requirements files
35+
and use the `pip` backend to do the downloading. This was only available for
36+
users setting {bzl:obj}`pip.parse.experimental_index_url`, but now users have
37+
more options whilst we continue to work on stabilizing the experimental feature.
38+
39+
### Fixed
40+
- (bzlmod) The extension evaluation has been adjusted to always generate the
41+
same lock file irrespective if `experimental_index_url` is set by any module
42+
or not. Fixes
43+
[#2268](https://github.com/bazelbuild/rules_python/issues/2268). A known
44+
issue is that it may break `bazel query` and in these use cases it is
45+
advisable to use `cquery` or switch to `download_only = True`
46+
2647
[0.0.0]: https://github.com/bazelbuild/rules_python/releases/tag/0.0.0
2748

2849
{#v0-0-0-changed}
@@ -31,11 +52,9 @@ A brief description of the categories of changes:
3152

3253
{#v0-0-0-fixed}
3354
### Fixed
34-
- The extension evaluation has been adjusted to always generate the same lock
35-
file irrespective if `experimental_index_url` is set by any module or not.
36-
Fixes [#2268](https://github.com/bazelbuild/rules_python/issues/2268). A known
37-
issue is that it may break `bazel query` and in these use cases it is advisable
38-
to use `cquery` until we have `sdist` cross-building from source fully working.
55+
* (rules) Setting `--incompatible_python_disallow_native_rules` no longer
56+
causes rules_python rules to fail.
57+
([#2326](https://github.com/bazelbuild/rules_python/issues/2326).
3958

4059
{#v0-0-0-added}
4160
### Added

docs/precompiling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Note that any execution requirements values can be specified in the flag.
8383
* Mixing rules_python PyInfo with Bazel builtin PyInfo will result in pyc files
8484
being dropped.
8585
* Precompiled files may not be used in certain cases prior to Python 3.11. This
86-
occurs due Python adding the directory of the binary's main `.py` file, which
86+
occurs due to Python adding the directory of the binary's main `.py` file, which
8787
causes the module to be found in the workspace source directory instead of
8888
within the binary's runfiles directory (where the pyc files are). This can
8989
usually be worked around by removing `sys.path[0]` (or otherwise ensuring the

examples/build_file_generation/.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ build --enable_runfiles
66
# The bzlmod version of this example is in examples/bzlmod_build_file_generation
77
# Once WORKSPACE support is dropped, this example can be entirely deleted.
88
build --experimental_enable_bzlmod=false
9+
10+
common:bazel7.x --incompatible_python_disallow_native_rules

examples/bzlmod/.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ test --test_output=errors --enable_runfiles
77

88
# Windows requires these for multi-python support:
99
build --enable_runfiles
10+
common:bazel7.x --incompatible_python_disallow_native_rules

examples/bzlmod/MODULE.bazel.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/bzlmod_build_file_generation/.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ build --enable_runfiles
66
common --experimental_enable_bzlmod
77

88
coverage --java_runtime_version=remotejdk_11
9+
common:bazel7.x --incompatible_python_disallow_native_rules

examples/multi_python_versions/.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ test --test_output=errors
44
build --enable_runfiles
55

66
coverage --java_runtime_version=remotejdk_11
7+
common:bazel7.x --incompatible_python_disallow_native_rules

examples/pip_parse/.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# https://docs.bazel.build/versions/main/best-practices.html#using-the-bazelrc-file
22
try-import %workspace%/user.bazelrc
3+
common:bazel7.x --incompatible_python_disallow_native_rules

0 commit comments

Comments
 (0)