Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpython#121277: Replace next versions in docs by the just-released version #164

Merged
merged 12 commits into from
Sep 24, 2024

Conversation

encukou
Copy link
Member

@encukou encukou commented Aug 16, 2024

See CPython issue: python/cpython#121277

After the CPython PR is merged, a Sphinx plugin will expand next in directives like versionchanged to e.g. 3.14.0b0 (unreleased).

This PR gives the RM a tool to replace all such occurences of next by the currently released version, baking it directly into the ReST source files, as part of the version bump commit.

This is done textually (I don't know of a round-trip parser for ReST).

To make sure the text manipulation worked, the released docs artifact (if it's being published) is grepped for the string (unreleased), and if it's found, the RM is asked for confirmation.

@encukou encukou marked this pull request as ready for review August 19, 2024 14:21
@encukou
Copy link
Member Author

encukou commented Aug 19, 2024

Dear RMs, do you want this?

I can add tests for the remaining uncovered lines; is this the style of tests you're looking for?

release.py Outdated Show resolved Hide resolved
update_version_next.py Outdated Show resolved Hide resolved
update_version_next.py Outdated Show resolved Hide resolved
tests/test_update_version_next.py Outdated Show resolved Hide resolved
@hugovk
Copy link
Member

hugovk commented Aug 25, 2024

Dear RMs, do you want this?

Yes, I think so, but still need to take a closer look, and would also like to hear from other RMs who have actually made releases :)

I can add tests for the remaining uncovered lines; is this the style of tests you're looking for?

I've not had a proper look yet, but will do.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, I tested it against python/cpython#121278 and it worked as expected.

Here's a few small suggestions.

run_release.py Show resolved Hide resolved
update_version_next.py Show resolved Hide resolved
update_version_next.py Outdated Show resolved Hide resolved
update_version_next.py Outdated Show resolved Hide resolved
Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@encukou
Copy link
Member Author

encukou commented Sep 24, 2024

On the sprint, @Yhg1s agreed to the concept, so I'll merge.

I'll link related PRs on the CPython issue: python/cpython#121277

@encukou encukou merged commit 7814f13 into python:master Sep 24, 2024
9 checks passed
@encukou encukou deleted the versionchange-next branch September 24, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants