https://github.com/python/cpython/commit/e349f73a5ad2856b0a7cbe4aef7cc081c7aed777
commit: e349f73a5ad2856b0a7cbe4aef7cc081c7aed777
branch: main
author: Petr Viktorin <[email protected]>
committer: encukou <[email protected]>
date: 2024-09-27T19:38:40+02:00
summary:

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

files:
M Doc/tools/extensions/pyspecific.py

diff --git a/Doc/tools/extensions/pyspecific.py 
b/Doc/tools/extensions/pyspecific.py
index 1f725c2377035b..c89b1693343b4e 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -288,6 +288,9 @@ def run(self):
         version_deprecated = expand_version_arg(self.arguments[0],
                                                 self.config.release)
         version_removed = self.arguments.pop(1)
+        if version_removed == 'next':
+            raise ValueError(
+                'deprecated-removed:: second argument cannot be `next`')
         self.arguments[0] = version_deprecated, version_removed
 
         # Set the label based on if we have reached the removal version

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to