python / cpython

The Python programming language
https://www.python.org
Other
63.36k stars 30.34k forks source link

Allow `.. versionadded:: next` in docs #121277

Open encukou opened 4 months ago

encukou commented 4 months ago

Feature or enhancement

Proposal:

In a PR to CPython, the versionadded, versionchanged, versionremoved, deprecated, deprecated-removed directives in documentation should currently be set to the upcoming release.

This is inconvenient:

It would be good to treat this more like News entries, which live in a next/ directory before a release, when the release manager bundles them up and assigns a version.

Concrete proposal:

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

https://discuss.python.org/t/automating-versionadded-changed-markers-in-docs-to-expedite-prs/38423

Linked PRs

Related PRs

Discourse announcement

encukou commented 4 months ago

It might be better for the tool to live outside the cpython repo, like blurb.

gpshead commented 3 months ago

It might be better for the tool to live outside the cpython repo, like blurb.

The tool for replacing version "next" in .rst files with the number makes sense to keep in repo to me (as your draft PR does for now) as it is small. Really not a lot more than could be done with some inscrutable sed commands.

encukou commented 3 months ago

It's small, but there can still be bugs in it, and it'd be easier to deal with those if we don't need to backport them.

@hugovk You said elsewhere that you'd prefer the version-bumping tool to live outside CPython repo. Since it's so small, I'd add it (and its test) to https://github.com/python/release-tools directly. Would that work?

You're a RM, so you get to choose the bikeshed paint here :)

hugovk commented 3 months ago

@hugovk You said elsewhere that you'd prefer the version-bumping tool to live outside CPython repo. Since it's so small, I'd add it (and its test) to python/release-tools directly. Would that work?

Yep, this sounds good 👍 🖌️

encukou commented 1 week ago

It's now in 3.13 & 3.12. I plan to wait for releases from those branches before offering this to RMs of the security-only ones. (This is obviously not a security fix, but as a feature designed to make backporting easier, it might get an exception.)

hugovk commented 1 week ago

It worked well for 3.14.0a1, you can see the next -> 3.14 changes in https://github.com/python/cpython/commit/8cdaca8b25e3354530d66cbccc622e0e914e8e8a 👍

encukou commented 1 week ago

Yup! Pre-releases and dot-0's do have slightly different behaviour though.