Skip to content

Commit 844e7ad

Browse files
authored
release: 1.4.0 release prep (#2789)
Updates changelog and version markers. Also updates the release docs with some shell-one liners to copy and paste to make it a bit more mechanical.
1 parent abdf560 commit 844e7ad

11 files changed

+46
-23
lines changed

CHANGELOG.md

+12-10
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,15 +43,17 @@ Unreleased changes template.
4343
{#v0-0-0-removed}
4444
### Removed
4545
* Nothing removed.
46+
47+
END_UNRELEASED_TEMPLATE
4648
-->
4749

4850

49-
{#v0-0-0}
50-
## Unreleased
51+
{#1-4-0}
52+
## [1.4.0] - 2025-04-19
5153

52-
[0.0.0]: https://github.com/bazel-contrib/rules_python/releases/tag/0.0.0
54+
[1.4.0]: https://github.com/bazel-contrib/rules_python/releases/tag/1.4.0
5355

54-
{#v0-0-0-changed}
56+
{#1-4-0-changed}
5557
### Changed
5658
* (toolchain) The `exec` configuration toolchain now has the forwarded
5759
`exec_interpreter` now also forwards the `ToolchainInfo` provider. This is
@@ -72,7 +74,7 @@ Unreleased changes template.
7274
* (toolchains) Previously [#2636](https://github.com/bazel-contrib/rules_python/pull/2636)
7375
changed the semantics of `ignore_root_user_error` from "ignore" to "warning". This is now
7476
flipped back to ignoring the issue, and will only emit a warning when the attribute is set
75-
`False`.
77+
`False`.
7678
* (pypi) The PyPI extension will no longer write the lock file entries as the
7779
extension has been marked reproducible.
7880
Fixes [#2434](https://github.com/bazel-contrib/rules_python/issues/2434).
@@ -84,7 +86,7 @@ Unreleased changes template.
8486

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

87-
{#v0-0-0-fixed}
89+
{#1-4-0-fixed}
8890
### Fixed
8991
* (pypi) Platform specific extras are now correctly handled when using
9092
universal lock files with environment markers. Fixes [#2690](https://github.com/bazel-contrib/rules_python/pull/2690).
@@ -103,7 +105,7 @@ Unreleased changes template.
103105
* (rules) py_wheel and sphinxdocs rules now propagate `target_compatible_with` to all targets they create.
104106
[PR #2788](https://github.com/bazel-contrib/rules_python/pull/2788).
105107

106-
{#v0-0-0-added}
108+
{#1-4-0-added}
107109
### Added
108110
* (pypi) From now on `sha256` values in the `requirements.txt` is no longer
109111
mandatory when enabling {attr}`pip.parse.experimental_index_url` feature.
@@ -134,13 +136,13 @@ Unreleased changes template.
134136
locations equivalents of `$(PYTHON2)` and `$(PYTHON3) respectively.
135137

136138

137-
{#v0-0-0-removed}
139+
{#1-4-0-removed}
138140
### Removed
139141
* Nothing removed.
140142

141143

142144
{#v1-3-0}
143-
## Unreleased
145+
## [1.3.0] - 2025-03-27
144146

145147
[1.3.0]: https://github.com/bazel-contrib/rules_python/releases/tag/1.3.0
146148

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

python/current_py_toolchain.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ current_py_toolchain = rule(
5252
happened, to a rule which expects a concrete implementation of a toolchain, rather than a
5353
toolchain_type which could be resolved to that toolchain.
5454
55-
:::{versionchanged} VERSION_NEXT_FEATURE
55+
:::{versionchanged} 1.4.0
5656
From now on, we also expose `$(PYTHON2_ROOTPATH)` and `$(PYTHON3_ROOTPATH)` which are runfiles
5757
locations equivalents of `$(PYTHON2)` and `$(PYTHON3) respectively.
5858
:::

python/features.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def _features_typedef():
3535
3636
True if the `PyInfo.site_packages_symlinks` field is available.
3737
38-
:::{versionadded} VERSION_NEXT_FEATURE
38+
:::{versionadded} 1.4.0
3939
:::
4040
::::
4141

python/local_toolchains/repos.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Rules/macros for repository phase for local toolchains.
22
3-
:::{versionadded} VERSION_NEXT_FEATURE
3+
:::{versionadded} 1.4.0
44
:::
55
"""
66

python/packaging.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def py_wheel(
101101
102102
Currently only pure-python wheels are supported.
103103
104-
:::{versionchanged} VERSION_NEXT_FEATURE
104+
:::{versionchanged} 1.4.0
105105
From now on, an empty `requires_file` is treated as if it were omitted, resulting in a valid
106106
`METADATA` file.
107107
:::

python/private/py_exec_tools_toolchain.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ handle all the necessary transitions and runtime setup to invoke a program.
7777
7878
See {obj}`PyExecToolsInfo.exec_interpreter` for further docs.
7979
80-
:::{versionchanged} VERSION_NEXT_FEATURE
80+
:::{versionchanged} 1.4.0
8181
From now on the provided target also needs to provide `platform_common.ToolchainInfo`
8282
so that the toolchain `py_runtime` field can be correctly forwarded.
8383
:::

python/private/py_info.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ values from further way dependencies, such as forcing symlinks to point to
168168
specific paths or preventing symlinks from being created.
169169
:::
170170
171-
:::{versionadded} VERSION_NEXT_FEATURE
171+
:::{versionadded} 1.4.0
172172
:::
173173
""",
174174
"transitive_implicit_pyc_files": """

python/private/py_library.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ to a consumer have precedence. See {obj}`PyInfo.site_packages_symlinks` for
9494
more information.
9595
:::
9696
97-
:::{versionadded} VERSION_NEXT_FEATURE
97+
:::{versionadded} 1.4.0
9898
:::
9999
""",
100100
),

python/private/pypi/extension.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ If {attr}`download_only` is set, then `sdist` archives will be discarded and `pi
686686
operate in wheel-only mode.
687687
:::
688688
689-
:::{versionchanged} VERSION_NEXT_FEATURE
689+
:::{versionchanged} 1.4.0
690690
Index metadata will be used to deduct `sha256` values for packages even if the
691691
`sha256` values are not present in the requirements.txt lock file.
692692
:::
@@ -767,7 +767,7 @@ to `rules_python` and use this attribute until the bug is fixed.
767767
768768
EXPERIMENTAL: this may be removed without notice.
769769
770-
:::{versionadded} VERSION_NEXT_FEATURE
770+
:::{versionadded} 1.4.0
771771
:::
772772
""",
773773
),

python/private/python.bzl

+4-4
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ matches the {attr}`python_version` attribute of a toolchain, this
695695
toolchain is the default version. If this attribute is set, the
696696
{attr}`is_default` attribute of the toolchain is ignored.
697697
698-
:::{versionadded} VERSION_NEXT_FEATURE
698+
:::{versionadded} 1.4.0
699699
:::
700700
""",
701701
),
@@ -707,7 +707,7 @@ If the string matches the {attr}`python_version` attribute of a
707707
toolchain, this toolchain is the default version. If this attribute is
708708
set, the {attr}`is_default` attribute of the toolchain is ignored.
709709
710-
:::{versionadded} VERSION_NEXT_FEATURE
710+
:::{versionadded} 1.4.0
711711
:::
712712
""",
713713
),
@@ -720,7 +720,7 @@ of the file match the {attr}`python_version` attribute of a toolchain,
720720
this toolchain is the default version. If this attribute is set, the
721721
{attr}`is_default` attribute of the toolchain is ignored.
722722
723-
:::{versionadded} VERSION_NEXT_FEATURE
723+
:::{versionadded} 1.4.0
724724
:::
725725
""",
726726
),
@@ -813,7 +813,7 @@ this to `False`.
813813
doc = """\
814814
Whether the toolchain is the default version.
815815
816-
:::{versionchanged} VERSION_NEXT_FEATURE
816+
:::{versionchanged} 1.4.0
817817
This setting is ignored if the default version is set using the `defaults`
818818
tag class.
819819
:::

0 commit comments

Comments
 (0)