Skip to content

Commit a520e29

Browse files
committed
Merge branch 'main' into fix/lockfile-inconsistency
2 parents 9482a13 + 70caec7 commit a520e29

File tree

28 files changed

+1363
-560
lines changed

28 files changed

+1363
-560
lines changed

.bazelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# (Note, we cannot use `common --deleted_packages` because the bazel version command doesn't support it)
55
# To update these lines, execute
66
# `bazel run @rules_bazel_integration_test//tools:update_deleted_packages`
7-
build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered
8-
query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/pythonconfig,gazelle/python/private,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered
7+
build --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/python/private,gazelle/pythonconfig,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered
8+
query --deleted_packages=examples/build_file_generation,examples/build_file_generation/random_number_generator,examples/bzlmod,examples/bzlmod/entry_points,examples/bzlmod/entry_points/tests,examples/bzlmod/libs/my_lib,examples/bzlmod/other_module,examples/bzlmod/other_module/other_module/pkg,examples/bzlmod/patches,examples/bzlmod/py_proto_library,examples/bzlmod/py_proto_library/example.com/another_proto,examples/bzlmod/py_proto_library/example.com/proto,examples/bzlmod/runfiles,examples/bzlmod/tests,examples/bzlmod/tests/other_module,examples/bzlmod/whl_mods,examples/bzlmod_build_file_generation,examples/bzlmod_build_file_generation/other_module/other_module/pkg,examples/bzlmod_build_file_generation/runfiles,examples/multi_python_versions/libs/my_lib,examples/multi_python_versions/requirements,examples/multi_python_versions/tests,examples/pip_parse,examples/pip_parse_vendored,examples/pip_repository_annotations,examples/py_proto_library,examples/py_proto_library/example.com/another_proto,examples/py_proto_library/example.com/proto,gazelle,gazelle/manifest,gazelle/manifest/generate,gazelle/manifest/hasher,gazelle/manifest/test,gazelle/modules_mapping,gazelle/python,gazelle/python/private,gazelle/pythonconfig,tests/integration/compile_pip_requirements,tests/integration/compile_pip_requirements_test_from_external_repo,tests/integration/custom_commands,tests/integration/ignore_root_user_error,tests/integration/ignore_root_user_error/submodule,tests/integration/local_toolchains,tests/integration/pip_parse,tests/integration/pip_parse/empty,tests/integration/py_cc_toolchain_registered
99

1010
test --test_output=errors
1111

.github/workflows/create_archive_and_notes.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE
2525
SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}')
2626

2727
cat > release_notes.txt << EOF
28-
## Using Bzlmod with Bazel 6
2928
30-
**NOTE: bzlmod support is still beta. APIs subject to change.**
29+
For more detailed setup instructions, see https://rules-python.readthedocs.io/en/latest/getting-started.html
30+
31+
## Using Bzlmod
3132
3233
Add to your \`MODULE.bazel\` file:
3334

CHANGELOG.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,28 @@ A brief description of the categories of changes:
4848

4949
{#v0-0-0-changed}
5050
### Changed
51-
- Nothing yet
51+
* (deps) (WORKSPACE only) rules_cc 0.0.13 and protobuf 27.0 is now the default
52+
version used; this for Bazel 8+ support (previously version was rules_cc 0.0.9
53+
and no protobuf version specified)
54+
([2310](https://github.com/bazelbuild/rules_python/issues/2310)).
55+
* (publish) The dependencies have been updated to the latest available versions
56+
for the `twine` publishing rule.
5257

5358
{#v0-0-0-fixed}
5459
### Fixed
55-
- Nothing yet
60+
* Nothing yet
5661

5762
{#v0-0-0-added}
5863
### Added
59-
- Nothing yet
64+
* (publish) The requirements file for the `twine` publishing rules have been
65+
updated to have a new convention: `requirements_darwin.txt`,
66+
`requirements_linux.txt`, `requirements_windows.txt` for each respective OS
67+
and one extra file `requirements_universal.txt` if you prefer a single file.
68+
The `requirements.txt` file may be removed in the future.
6069

6170
{#v0-0-0-removed}
6271
### Removed
63-
- Nothing yet
72+
* Nothing yet
6473

6574
{#v0-37-1}
6675
## [0.37.1] - 2024-10-22

CONTRIBUTING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ and setup. Subsequent runs will be faster, but there are many tests, and some of
6565
them are slow. If you're working on a particular area of code, you can run just
6666
the tests in those directories instead, which can speed up your edit-run cycle.
6767

68+
## Updating tool dependencies
69+
70+
It's suggested to routinely update the tool versions within our repo - some of the
71+
tools are using requirement files compiled by `uv` and others use other means. In order
72+
to have everything self-documented, we have a special target -
73+
`//private:requirements.update`, which uses `rules_multirun` to run in sequence all
74+
of the requirement updating scripts in one go. This can be done once per release as
75+
we prepare for releases.
76+
6877
## Formatting
6978

7079
Starlark files should be formatted by

DEVELOPING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
1. Modify the `./python/private/pypi/requirements.txt` file and run:
66
```
7-
bazel run //tools/private/update_deps:update_pip_deps
7+
bazel run //private:whl_library_requirements.update
8+
```
9+
1. Run the following target to update `twine` dependencies:
10+
```
11+
bazel run //private:requirements.update
812
```
913
1. Bump the coverage dependencies using the script using:
1014
```

MODULE.bazel

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ pip.parse(
6161
hub_name = "rules_python_publish_deps",
6262
python_version = "3.11",
6363
requirements_by_platform = {
64-
"//tools/publish:requirements.txt": "linux_*",
6564
"//tools/publish:requirements_darwin.txt": "osx_*",
65+
"//tools/publish:requirements_linux.txt": "linux_*",
6666
"//tools/publish:requirements_windows.txt": "windows_*",
6767
},
6868
)
@@ -75,6 +75,7 @@ bazel_dep(name = "stardoc", version = "0.6.2", repo_name = "io_bazel_stardoc")
7575
bazel_dep(name = "rules_bazel_integration_test", version = "0.20.0", dev_dependency = True)
7676
bazel_dep(name = "rules_testing", version = "0.6.0", dev_dependency = True)
7777
bazel_dep(name = "rules_shell", version = "0.2.0", dev_dependency = True)
78+
bazel_dep(name = "rules_multirun", version = "0.9.0", dev_dependency = True)
7879

7980
# Extra gazelle plugin deps so that WORKSPACE.bzlmod can continue including it for e2e tests.
8081
# We use `WORKSPACE.bzlmod` because it is impossible to have dev-only local overrides.
@@ -145,7 +146,7 @@ uv = use_extension(
145146
"uv",
146147
dev_dependency = True,
147148
)
148-
uv.toolchain(uv_version = "0.2.23")
149+
uv.toolchain(uv_version = "0.4.25")
149150
use_repo(uv, "uv_toolchains")
150151

151152
register_toolchains(

docs/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ lock(
158158
srcs = ["pyproject.toml"],
159159
out = "requirements.txt",
160160
upgrade = True,
161+
visibility = ["//private:__pkg__"],
161162
)
162163

163164
# Temporary compatibility aliases for some other projects depending on the old

0 commit comments

Comments
 (0)