Skip to content

Commit 16caeea

Browse files
authored
Merge branch 'main' into fix/escape_pywheel_name_segment
2 parents 1856170 + cc46fb2 commit 16caeea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2373
-2037
lines changed

.github/workflows/mypy.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ defaults:
1515

1616
jobs:
1717
ci:
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-latest
1919
steps:
2020
# Checkout the code
2121
- uses: actions/checkout@v4

CHANGELOG.md

+50-8
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A brief description of the categories of changes:
2121
`(docs)`.
2222

2323
<!--
24-
Unreleased changes template.
24+
BEGIN_UNRELEASED_TEMPLATE
2525
2626
{#v0-0-0}
2727
## Unreleased
@@ -43,8 +43,9 @@ Unreleased changes template.
4343
{#v0-0-0-removed}
4444
### Removed
4545
* Nothing removed.
46-
-->
4746
47+
END_UNRELEASED_TEMPLATE
48+
-->
4849

4950
{#v0-0-0}
5051
## Unreleased
@@ -53,6 +54,30 @@ Unreleased changes template.
5354

5455
{#v0-0-0-changed}
5556
### Changed
57+
* Nothing changed.
58+
59+
{#v0-0-0-fixed}
60+
### Fixed
61+
* (rules) PyInfo provider is now advertised by py_test, py_binary, and py_library;
62+
this allows aspects using required_providers to function correctly.
63+
([#2506](https://github.com/bazel-contrib/rules_python/issues/2506)).
64+
* (py_wheel) Ensure the filename segment is escaped in when using stamping wheel names.
65+
66+
{#v0-0-0-added}
67+
### Added
68+
* Nothing added.
69+
70+
{#v0-0-0-removed}
71+
### Removed
72+
* Nothing removed.
73+
74+
{#1-4-0}
75+
## [1.4.0] - 2025-04-19
76+
77+
[1.4.0]: https://github.com/bazel-contrib/rules_python/releases/tag/1.4.0
78+
79+
{#1-4-0-changed}
80+
### Changed
5681
* (toolchain) The `exec` configuration toolchain now has the forwarded
5782
`exec_interpreter` now also forwards the `ToolchainInfo` provider. This is
5883
for increased compatibility with the `RBE` setups where access to the `exec`
@@ -72,15 +97,22 @@ Unreleased changes template.
7297
* (toolchains) Previously [#2636](https://github.com/bazel-contrib/rules_python/pull/2636)
7398
changed the semantics of `ignore_root_user_error` from "ignore" to "warning". This is now
7499
flipped back to ignoring the issue, and will only emit a warning when the attribute is set
75-
`False`.
100+
`False`.
76101
* (pypi) The PyPI extension will no longer write the lock file entries as the
77102
extension has been marked reproducible.
78103
Fixes [#2434](https://github.com/bazel-contrib/rules_python/issues/2434).
104+
* (gazelle) Lazily load and parse manifest files when running Gazelle. This ensures no
105+
manifest files are loaded when Gazelle is run over a set of non-python directories
106+
[PR #2746](https://github.com/bazel-contrib/rules_python/pull/2746).
107+
* (rules) {attr}`py_binary.srcs` and {attr}`py_test.srcs` is no longer mandatory when
108+
`main_module` is specified (for `--bootstrap_impl=script`)
79109

80110
[20250317]: https://github.com/astral-sh/python-build-standalone/releases/tag/20250317
81111

82-
{#v0-0-0-fixed}
112+
{#1-4-0-fixed}
83113
### Fixed
114+
* (pypi) Platform specific extras are now correctly handled when using
115+
universal lock files with environment markers. Fixes [#2690](https://github.com/bazel-contrib/rules_python/pull/2690).
84116
* (runfiles) ({obj}`--bootstrap_impl=script`) Follow symlinks when searching for runfiles.
85117
* (toolchains) Do not try to run `chmod` when downloading non-windows hermetic toolchain
86118
repositories on Windows. Fixes
@@ -90,9 +122,13 @@ Unreleased changes template.
90122
transitions transitioning on the `python_version` flag.
91123
Fixes [#2685](https://github.com/bazel-contrib/rules_python/issues/2685).
92124
* (toolchains) Run the check on the Python interpreter in isolated mode, to ensure it's not affected by userland environment variables, such as `PYTHONPATH`.
93-
* (py_wheel) Ensure the filename segment is escaped in when using stamping wheel names.
125+
* (toolchains) Ensure temporary `.pyc` and `.pyo` files are also excluded from the interpreters repository files.
126+
* (pypi) Run interpreter version call in isolated mode, to ensure it's not affected by userland environment variables, such as `PYTHONPATH`.
127+
* (packaging) An empty `requires_file` is treated as if it were omitted, resulting in a valid `METADATA` file.
128+
* (rules) py_wheel and sphinxdocs rules now propagate `target_compatible_with` to all targets they create.
129+
[PR #2788](https://github.com/bazel-contrib/rules_python/pull/2788).
94130

95-
{#v0-0-0-added}
131+
{#1-4-0-added}
96132
### Added
97133
* (pypi) From now on `sha256` values in the `requirements.txt` is no longer
98134
mandatory when enabling {attr}`pip.parse.experimental_index_url` feature.
@@ -116,14 +152,20 @@ Unreleased changes template.
116152
allow specifying links to create within the venv site packages (only
117153
applicable with {obj}`--bootstrap_impl=script`)
118154
([#2156](https://github.com/bazelbuild/rules_python/issues/2156)).
155+
* (toolchains) Local Python installs can be used to create a toolchain
156+
equivalent to the standard toolchains. See [Local toolchains] docs for how to
157+
configure them.
158+
* (toolchains) Expose `$(PYTHON2_ROOTPATH)` and `$(PYTHON3_ROOTPATH)` which are runfiles
159+
locations equivalents of `$(PYTHON2)` and `$(PYTHON3) respectively.
119160

120-
{#v0-0-0-removed}
161+
162+
{#1-4-0-removed}
121163
### Removed
122164
* Nothing removed.
123165

124166

125167
{#v1-3-0}
126-
## Unreleased
168+
## [1.3.0] - 2025-03-27
127169

128170
[1.3.0]: https://github.com/bazel-contrib/rules_python/releases/tag/1.3.0
129171

RELEASING.md

+21
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ These are the steps for a regularly scheduled release from HEAD.
1414

1515
1. [Determine the next semantic version number](#determining-semantic-version).
1616
1. Update CHANGELOG.md: replace the `v0-0-0` and `0.0.0` with `X.Y.0`.
17+
```
18+
awk -v version=X.Y.0 'BEGIN { hv=version; gsub(/\./, "-", hv) } /END_UNRELEASED_TEMPLATE/ { found_marker = 1 } found_marker { gsub(/v0-0-0/, hv, $0); gsub(/Unreleased/, "[" version "] - " strftime("%Y-%m-%d"), $0); gsub(/0.0.0/, version, $0); } { print } ' CHANGELOG.md > /tmp/changelog && cp /tmp/changelog CHANGELOG.md
19+
```
1720
1. Replace `VERSION_NEXT_*` strings with `X.Y.0`.
21+
```
22+
grep -l --exclude=CONTRIBUTING.md --exclude=RELEASING.md --exclude-dir=.* VERSION_NEXT_ -r \
23+
| xargs sed -i -e 's/VERSION_NEXT_FEATURE/X.Y.0/' -e 's/VERSION_NEXT_PATCH/X.Y.0/'
24+
```
1825
1. Send these changes for review and get them merged.
1926
1. Create a branch for the new release, named `release/X.Y`
2027
```
@@ -90,6 +97,20 @@ It will be promoted to stable next week, pending feedback.
9097
It's traditional to include notable changes from the changelog, but not
9198
required.
9299

100+
### Re-releasing a version
101+
102+
Re-releasing a version (i.e. changing the commit a tag points to) is
103+
*sometimes* possible, but it depends on how far into the release process it got.
104+
105+
The two points of no return are:
106+
* If the PyPI package has been published: PyPI disallows using the same
107+
filename/version twice. Once published, it cannot be replaced.
108+
* If the BCR package has been published: Once it's been committed to the BCR
109+
registry, it cannot be replaced.
110+
111+
If release steps fail _prior_ to those steps, then its OK to change the tag. You
112+
may need to manually delete the GitHub release.
113+
93114
## Secrets
94115

95116
### PyPI user rules-python

docs/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ sphinx_stardocs(
108108
"//python/cc:py_cc_toolchain_bzl",
109109
"//python/cc:py_cc_toolchain_info_bzl",
110110
"//python/entry_points:py_console_script_binary_bzl",
111+
"//python/local_toolchains:repos_bzl",
111112
"//python/private:attr_builders_bzl",
112113
"//python/private:builders_util_bzl",
113114
"//python/private:py_binary_rule_bzl",

0 commit comments

Comments
 (0)