Skip to content

[3.11] gh-121277: Allow .. versionadded:: next in docs (GH-121278) (#124718) - #127827

Merged
pablogsal merged 4 commits into
python:3.11from
encukou:dba992b-3.11
Dec 11, 2024
Merged

pablogsal merged 4 commits into
python:3.11from
encukou:dba992b-3.11

Conversation

@encukou

@encukou encukou commented Dec 11, 2024 •

Copy link
Copy Markdown
Member

Make versionchanged:: next expand to current (unreleased) version.

When a new CPython release is cut, the release manager will replace
all such occurences of "next" with the just-released version.
(See the issue for release-tools and devguide PRs.)

Obviously, this is not a security fix. It's an internal feature meant to make backporting easier.
@pablogsal, do you want this in 3.11?

The cherry-pick had conflicts that needed some rework.


I tested locally by adding this to docs:

   .. versionadded:: next

   .. deprecated-removed:: next 3.20

   .. versionadded:: 3.18

   .. deprecated-removed:: 3.18 3.20

With Sphinx 7.3.7:

image

With Sphinx 4.2.0 & other old reqs pinned in https://github.com/python/cpython/blob/3.11/Doc/requirements-oldest-sphinx.txt:

image


Co-authored-by: Adam Turner 9087854+AA-Turner@users.noreply.github.com
Co-authored-by: Hugo van Kemenade 1324225+hugovk@users.noreply.github.com
(cherry picked from commit 7d24ea9)

Also backports follow-up GH-124623: Raise nice error on next as second argument to deprecated-removed

(cherry-picked from e349f73)


📚 Documentation preview 📚: https://cpython-previews--127827.org.readthedocs.build/

…nGH-121278) (python#124718)

Make `versionchanged:: next`` expand to current (unreleased) version.

When a new CPython release is cut, the release manager will replace
all such occurences of "next" with the just-released version.
(See the issue for release-tools and devguide PRs.)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit 7d24ea9)

pythongh-121277: Raise nice error on `next` as second argument to deprecated-removed (pythonGH-124623)

(cherry-picked from e349f73)
sphinx.domains.changeset.VersionChange exists at least since Sphinx 2.1,
according to: https://www.sphinx-doc.org/en/master/extdev/deprecated.html
@pablogsal

Copy link
Copy Markdown
Member

I'm happy to get this in yeah :)

@pablogsal
pablogsal enabled auto-merge (squash) December 11, 2024 14:54
@pablogsal
pablogsal merged commit f0895aa into python:3.11 Dec 11, 2024
@encukou
encukou deleted the dba992b-3.11 branch December 12, 2024 12:13
@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants