Skip to content

Commit bd6f6fd

Browse files
committed
Work around c-analyzer complaints about _testclinic deprecation
This is not a *correct* fix, but kicks the can far enough down the road that we can surely fix in in the next 25 years.
1 parent efe5b51 commit bd6f6fd

File tree

3 files changed

+223
-223
lines changed

3 files changed

+223
-223
lines changed

Lib/test/test_clinic.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,7 @@ def check_depr_star(self, pnames, fn, /, *args, name=None, **kwds):
29852985
regex = (
29862986
fr"Passing( more than)?( [0-9]+)? positional argument(s)? to "
29872987
fr"{re.escape(name)}\(\) is deprecated. Parameters? {pnames} will "
2988-
fr"become( a)? keyword-only parameters? in Python 3\.14"
2988+
fr"become( a)? keyword-only parameters? in Python 3\.37"
29892989
)
29902990
self.check_depr(regex, fn, *args, **kwds)
29912991

@@ -2998,7 +2998,7 @@ def check_depr_kwd(self, pnames, fn, *args, name=None, **kwds):
29982998
regex = (
29992999
fr"Passing keyword argument{pl} {pnames} to "
30003000
fr"{re.escape(name)}\(\) is deprecated. Parameter{pl} {pnames} "
3001-
fr"will become positional-only in Python 3\.14."
3001+
fr"will become positional-only in Python 3\.37."
30023002
)
30033003
self.check_depr(regex, fn, *args, **kwds)
30043004

@@ -3782,9 +3782,9 @@ def test_depr_star_multi(self):
37823782
fn("a", b="b", c="c", d="d", e="e", f="f", g="g", h="h")
37833783
errmsg = (
37843784
"Passing more than 1 positional argument to depr_star_multi() is deprecated. "
3785-
"Parameter 'b' will become a keyword-only parameter in Python 3.16. "
3786-
"Parameters 'c' and 'd' will become keyword-only parameters in Python 3.15. "
3787-
"Parameters 'e', 'f' and 'g' will become keyword-only parameters in Python 3.14.")
3785+
"Parameter 'b' will become a keyword-only parameter in Python 3.39. "
3786+
"Parameters 'c' and 'd' will become keyword-only parameters in Python 3.38. "
3787+
"Parameters 'e', 'f' and 'g' will become keyword-only parameters in Python 3.37.")
37883788
check = partial(self.check_depr, re.escape(errmsg), fn)
37893789
check("a", "b", c="c", d="d", e="e", f="f", g="g", h="h")
37903790
check("a", "b", "c", d="d", e="e", f="f", g="g", h="h")
@@ -3883,9 +3883,9 @@ def test_depr_kwd_multi(self):
38833883
fn("a", "b", "c", "d", "e", "f", "g", h="h")
38843884
errmsg = (
38853885
"Passing keyword arguments 'b', 'c', 'd', 'e', 'f' and 'g' to depr_kwd_multi() is deprecated. "
3886-
"Parameter 'b' will become positional-only in Python 3.14. "
3887-
"Parameters 'c' and 'd' will become positional-only in Python 3.15. "
3888-
"Parameters 'e', 'f' and 'g' will become positional-only in Python 3.16.")
3886+
"Parameter 'b' will become positional-only in Python 3.37. "
3887+
"Parameters 'c' and 'd' will become positional-only in Python 3.38. "
3888+
"Parameters 'e', 'f' and 'g' will become positional-only in Python 3.39.")
38893889
check = partial(self.check_depr, re.escape(errmsg), fn)
38903890
check("a", "b", "c", "d", "e", "f", g="g", h="h")
38913891
check("a", "b", "c", "d", "e", f="f", g="g", h="h")
@@ -3900,17 +3900,17 @@ def test_depr_multi(self):
39003900
self.assertRaises(TypeError, fn, "a", "b", "c", "d", "e", "f", "g")
39013901
errmsg = (
39023902
"Passing more than 4 positional arguments to depr_multi() is deprecated. "
3903-
"Parameter 'e' will become a keyword-only parameter in Python 3.15. "
3904-
"Parameter 'f' will become a keyword-only parameter in Python 3.14.")
3903+
"Parameter 'e' will become a keyword-only parameter in Python 3.38. "
3904+
"Parameter 'f' will become a keyword-only parameter in Python 3.37.")
39053905
check = partial(self.check_depr, re.escape(errmsg), fn)
39063906
check("a", "b", "c", "d", "e", "f", g="g")
39073907
check("a", "b", "c", "d", "e", f="f", g="g")
39083908
fn("a", "b", "c", "d", e="e", f="f", g="g")
39093909
fn("a", "b", "c", d="d", e="e", f="f", g="g")
39103910
errmsg = (
39113911
"Passing keyword arguments 'b' and 'c' to depr_multi() is deprecated. "
3912-
"Parameter 'b' will become positional-only in Python 3.14. "
3913-
"Parameter 'c' will become positional-only in Python 3.15.")
3912+
"Parameter 'b' will become positional-only in Python 3.37. "
3913+
"Parameter 'c' will become positional-only in Python 3.38.")
39143914
check = partial(self.check_depr, re.escape(errmsg), fn)
39153915
check("a", "b", c="c", d="d", e="e", f="f", g="g")
39163916
check("a", b="b", c="c", d="d", e="e", f="f", g="g")

0 commit comments

Comments
 (0)