8000 [3.11] gh-121277: Allow .. versionadded:: next in docs (GH-121278) (#124718) by encukou · Pull Request #127827 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

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

Merged
merged 4 commits into from
Dec 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Use version, not arguments directly
  • Loading branch information
encukou committed Dec 11, 2024
commit ba0529bdae2b17d5bbbc887f1778619cbcbd4d37
4 changes: 2 additions & 2 deletions Doc/tools/extensions/pyspecific.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,13 @@ def run(self):
'deprecated-removed:: second argument cannot be `next`')
node['version'] = version
current_version = tuple(int(e) for e in env.config.version.split('.'))
removed_version = tuple(int(e) for e in self.arguments[1].split('.'))
removed_version = tuple(int(e) for e in version[1].split('.'))
if current_version < removed_version:
label = self._deprecated_label
else:
label = self._removed_label

text = label.format(deprecated=self.arguments[0], removed=self.arguments[1])
text = label.format(deprecated=version[0], removed=version[1])
if len(self.arguments) == 3:
inodes, messages = self.state.inline_text(self.arguments[2],
self.lineno+1)
Expand Down
Loading
0