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

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

Merged
merged 4 commits into from
Dec 11, 2024

Conversation

encukou
Copy link
Member

@encukou encukou commented Dec 11, 2024

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 [email protected]
Co-authored-by: Hugo van Kemenade [email protected]
(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 <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
(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
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
23 checks passed
@encukou encukou deleted the dba992b-3.11 branch December 12, 2024 12:13
@encukou encukou added the needs backport to 3.10 only security fixes label Dec 12, 2024
@miss-islington-app
Copy link

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
needs backport to 3.10 only security fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants