python / release-tools

Scripts for making (C)Python releases
39 stars 33 forks source link

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

Closed encukou closed 1 month ago

encukou commented 2 months ago

See CPython issue: https://github.com/python/cpython/issues/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 commented 2 months ago

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?

hugovk commented 2 months ago

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.

encukou commented 1 month ago

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

I'll link related PRs on the CPython issue: https://github.com/python/cpython/issues/121277