From dc70ff34a9a6d5adc232a432b0a9b2a0676facdf Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 24 Jul 2025 14:04:53 -0500 Subject: [PATCH 1/5] Exclude _testclinic_depr.c.h from c-analyzer _testclinic.c mocks out PY_VERSION_HEX to 3.8 before including _testclinic_depr.c.h to avoid the errors the preprocessor would otherwise throw due to the deprecation feature it is testing. --- Tools/c-analyzer/cpython/_parser.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tools/c-analyzer/cpython/_parser.py b/Tools/c-analyzer/cpython/_parser.py index cfbf0d14348499..1e754040eaf1cc 100644 --- a/Tools/c-analyzer/cpython/_parser.py +++ b/Tools/c-analyzer/cpython/_parser.py @@ -83,6 +83,8 @@ def clean_lines(text): Python/generated_cases.c.h Python/executor_cases.c.h Python/optimizer_cases.c.h +# XXX: Throws errors if PY_VERSION_HEX is not mocked out +Modules/clinic/_testclinic_depr.c.h # not actually source Python/bytecodes.c From 3ed05147f9f9e722d5989ba275dbee2ac3375b07 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 24 Jul 2025 14:07:10 -0500 Subject: [PATCH 2/5] Partially revert 74e2acddf68b31ce16e8e0067b1df8c7b67bd6c8 This restores Modules/_testclinic.c to match the same file in the 3.14 branch. --- Modules/_testclinic.c | 118 +++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/Modules/_testclinic.c b/Modules/_testclinic.c index 7e4ea0901fe726..3e903b6d87d89f 100644 --- a/Modules/_testclinic.c +++ b/Modules/_testclinic.c @@ -1734,14 +1734,14 @@ output impl_definition block class _testclinic.DeprStarNew "PyObject *" "PyObject" @classmethod _testclinic.DeprStarNew.__new__ as depr_star_new - * [from 3.37] + * [from 3.14] a: object = None The deprecation message should use the class name instead of __new__. [clinic start generated code]*/ static PyObject * depr_star_new_impl(PyTypeObject *type, PyObject *a) -/*[clinic end generated code: output=bdbb36244f90cf46 input=df8930826b302c3a]*/ +/*[clinic end generated code: output=bdbb36244f90cf46 input=fdd640db964b4dc1]*/ { return type->tp_alloc(type, 0); } @@ -1775,14 +1775,14 @@ static PyTypeObject DeprStarNew = { /*[clinic input] class _testclinic.DeprStarInit "PyObject *" "PyObject" _testclinic.DeprStarInit.__init__ as depr_star_init - * [from 3.37] + * [from 3.14] a: object = None The deprecation message should use the class name instead of __init__. [clinic start generated code]*/ static int depr_star_init_impl(PyObject *self, PyObject *a) -/*[clinic end generated code: output=8d27b43c286d3ecc input=07a5c35e04f526c5]*/ +/*[clinic end generated code: output=8d27b43c286d3ecc input=5575b77229d5e2be]*/ { return 0; } @@ -1818,7 +1818,7 @@ static PyTypeObject DeprStarInit = { class _testclinic.DeprStarInitNoInline "PyObject *" "PyObject" _testclinic.DeprStarInitNoInline.__init__ as depr_star_init_noinline a: object - * [from 3.37] + * [from 3.14] b: object c: object = None * @@ -1829,7 +1829,7 @@ _testclinic.DeprStarInitNoInline.__init__ as depr_star_init_noinline static int depr_star_init_noinline_impl(PyObject *self, PyObject *a, PyObject *b, PyObject *c, const char *d, Py_ssize_t d_length) -/*[clinic end generated code: output=9b31fc167f1bf9f7 input=45171504f009a391]*/ +/*[clinic end generated code: output=9b31fc167f1bf9f7 input=5a887543122bca48]*/ { return 0; } @@ -1849,13 +1849,13 @@ class _testclinic.DeprKwdNew "PyObject *" "PyObject" @classmethod _testclinic.DeprKwdNew.__new__ as depr_kwd_new a: object = None - / [from 3.37] + / [from 3.14] The deprecation message should use the class name instead of __new__. [clinic start generated code]*/ static PyObject * depr_kwd_new_impl(PyTypeObject *type, PyObject *a) -/*[clinic end generated code: output=618d07afc5616149 input=1bfb1b86f56ad2e6]*/ +/*[clinic end generated code: output=618d07afc5616149 input=6c7d13c471013c10]*/ { return type->tp_alloc(type, 0); } @@ -1873,13 +1873,13 @@ static PyTypeObject DeprKwdNew = { class _testclinic.DeprKwdInit "PyObject *" "PyObject" _testclinic.DeprKwdInit.__init__ as depr_kwd_init a: object = None - / [from 3.37] + / [from 3.14] The deprecation message should use the class name instead of __init__. [clinic start generated code]*/ static int depr_kwd_init_impl(PyObject *self, PyObject *a) -/*[clinic end generated code: output=6e02eb724a85d840 input=6f4daaa912ec24b2]*/ +/*[clinic end generated code: output=6e02eb724a85d840 input=b9bf3c20f012d539]*/ { return 0; } @@ -1901,7 +1901,7 @@ _testclinic.DeprKwdInitNoInline.__init__ as depr_kwd_init_noinline / b: object c: object = None - / [from 3.37] + / [from 3.14] # Force to use _PyArg_ParseTupleAndKeywordsFast. d: str(accept={str, robuffer}, zeroes=True) = '' [clinic start generated code]*/ @@ -1909,7 +1909,7 @@ _testclinic.DeprKwdInitNoInline.__init__ as depr_kwd_init_noinline static int depr_kwd_init_noinline_impl(PyObject *self, PyObject *a, PyObject *b, PyObject *c, const char *d, Py_ssize_t d_length) -/*[clinic end generated code: output=27759d70ddd25873 input=a022ad17f4b6008c]*/ +/*[clinic end generated code: output=27759d70ddd25873 input=c19d982c8c70a930]*/ { return 0; } @@ -1926,13 +1926,13 @@ static PyTypeObject DeprKwdInitNoInline = { /*[clinic input] depr_star_pos0_len1 - * [from 3.37] + * [from 3.14] a: object [clinic start generated code]*/ static PyObject * depr_star_pos0_len1_impl(PyObject *module, PyObject *a) -/*[clinic end generated code: output=e1c6c2b423129499 input=c8f49d8c6165ab6c]*/ +/*[clinic end generated code: output=e1c6c2b423129499 input=089b9aee25381b69]*/ { Py_RETURN_NONE; } @@ -1940,14 +1940,14 @@ depr_star_pos0_len1_impl(PyObject *module, PyObject *a) /*[clinic input] depr_star_pos0_len2 - * [from 3.37] + * [from 3.14] a: object b: object [clinic start generated code]*/ static PyObject * depr_star_pos0_len2_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=96df9be39859c7e4 input=aca96f36892eda25]*/ +/*[clinic end generated code: output=96df9be39859c7e4 input=65c83a32e01495c6]*/ { Py_RETURN_NONE; } @@ -1955,7 +1955,7 @@ depr_star_pos0_len2_impl(PyObject *module, PyObject *a, PyObject *b) /*[clinic input] depr_star_pos0_len3_with_kwd - * [from 3.37] + * [from 3.14] a: object b: object c: object @@ -1966,7 +1966,7 @@ depr_star_pos0_len3_with_kwd static PyObject * depr_star_pos0_len3_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=7f2531eda837052f input=5602f0bced3d5094]*/ +/*[clinic end generated code: output=7f2531eda837052f input=b33f620f57d9270f]*/ { Py_RETURN_NONE; } @@ -1975,13 +1975,13 @@ depr_star_pos0_len3_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b, /*[clinic input] depr_star_pos1_len1_opt a: object - * [from 3.37] + * [from 3.14] b: object = None [clinic start generated code]*/ static PyObject * depr_star_pos1_len1_opt_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=b5b4e326ee3b216f input=070817da1d6ccf49]*/ +/*[clinic end generated code: output=b5b4e326ee3b216f input=4a4b8ff72eae9ff7]*/ { Py_RETURN_NONE; } @@ -1990,13 +1990,13 @@ depr_star_pos1_len1_opt_impl(PyObject *module, PyObject *a, PyObject *b) /*[clinic input] depr_star_pos1_len1 a: object - * [from 3.37] + * [from 3.14] b: object [clinic start generated code]*/ static PyObject * depr_star_pos1_len1_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=eab92e37d5b0a480 input=2e3a30c71edd0f30]*/ +/*[clinic end generated code: output=eab92e37d5b0a480 input=1e7787a9fe5f62a0]*/ { Py_RETURN_NONE; } @@ -2005,7 +2005,7 @@ depr_star_pos1_len1_impl(PyObject *module, PyObject *a, PyObject *b) /*[clinic input] depr_star_pos1_len2_with_kwd a: object - * [from 3.37] + * [from 3.14] b: object c: object * @@ -2015,7 +2015,7 @@ depr_star_pos1_len2_with_kwd static PyObject * depr_star_pos1_len2_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=3bccab672b7cfbb8 input=48492b028a4f281c]*/ +/*[clinic end generated code: output=3bccab672b7cfbb8 input=6bc7bd742fa8be15]*/ { Py_RETURN_NONE; } @@ -2025,14 +2025,14 @@ depr_star_pos1_len2_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b, depr_star_pos2_len1 a: object b: object - * [from 3.37] + * [from 3.14] c: object [clinic start generated code]*/ static PyObject * depr_star_pos2_len1_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=20f5b230e9beeb70 input=80ee46e15cd14cf3]*/ +/*[clinic end generated code: output=20f5b230e9beeb70 input=5fc3e1790dec00d5]*/ { Py_RETURN_NONE; } @@ -2042,7 +2042,7 @@ depr_star_pos2_len1_impl(PyObject *module, PyObject *a, PyObject *b, depr_star_pos2_len2 a: object b: object - * [from 3.37] + * [from 3.14] c: object d: object [clinic start generated code]*/ @@ -2050,7 +2050,7 @@ depr_star_pos2_len2 static PyObject * depr_star_pos2_len2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d) -/*[clinic end generated code: output=9f90ed8fbce27d7a input=ac57914cf40a011b]*/ +/*[clinic end generated code: output=9f90ed8fbce27d7a input=9cc8003b89d38779]*/ { Py_RETURN_NONE; } @@ -2060,7 +2060,7 @@ depr_star_pos2_len2_impl(PyObject *module, PyObject *a, PyObject *b, depr_star_pos2_len2_with_kwd a: object b: object - * [from 3.37] + * [from 3.14] c: object d: object * @@ -2070,7 +2070,7 @@ depr_star_pos2_len2_with_kwd static PyObject * depr_star_pos2_len2_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e) -/*[clinic end generated code: output=05432c4f20527215 input=98f25e33c01285a3]*/ +/*[clinic end generated code: output=05432c4f20527215 input=831832d90534da91]*/ { Py_RETURN_NONE; } @@ -2079,7 +2079,7 @@ depr_star_pos2_len2_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b, /*[clinic input] depr_star_noinline a: object - * [from 3.37] + * [from 3.14] b: object c: object = None * @@ -2090,7 +2090,7 @@ depr_star_noinline static PyObject * depr_star_noinline_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, const char *d, Py_ssize_t d_length) -/*[clinic end generated code: output=cc27dacf5c2754af input=a829784557a42349]*/ +/*[clinic end generated code: output=cc27dacf5c2754af input=d36cc862a2daef98]*/ { Py_RETURN_NONE; } @@ -2099,12 +2099,12 @@ depr_star_noinline_impl(PyObject *module, PyObject *a, PyObject *b, /*[clinic input] depr_star_multi a: object - * [from 3.39] + * [from 3.16] b: object - * [from 3.38] + * [from 3.15] c: object d: object - * [from 3.37] + * [from 3.14] e: object f: object g: object @@ -2116,7 +2116,7 @@ static PyObject * depr_star_multi_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e, PyObject *f, PyObject *g, PyObject *h) -/*[clinic end generated code: output=77681653f4202068 input=6798940a18b2e62b]*/ +/*[clinic end generated code: output=77681653f4202068 input=3ebd05d888a957ea]*/ { Py_RETURN_NONE; } @@ -2127,12 +2127,12 @@ depr_kwd_required_1 a: object / b: object - / [from 3.37] + / [from 3.14] [clinic start generated code]*/ static PyObject * depr_kwd_required_1_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=1d8ab19ea78418af input=37853d8548d42df5]*/ +/*[clinic end generated code: output=1d8ab19ea78418af input=53f2c398b828462d]*/ { Py_RETURN_NONE; } @@ -2144,13 +2144,13 @@ depr_kwd_required_2 / b: object c: object - / [from 3.37] + / [from 3.14] [clinic start generated code]*/ static PyObject * depr_kwd_required_2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=44a89cb82509ddde input=0e1faedd8ec248b1]*/ +/*[clinic end generated code: output=44a89cb82509ddde input=a2b0ef37de8a01a7]*/ { Py_RETURN_NONE; } @@ -2161,12 +2161,12 @@ depr_kwd_optional_1 a: object / b: object = None - / [from 3.37] + / [from 3.14] [clinic start generated code]*/ static PyObject * depr_kwd_optional_1_impl(PyObject *module, PyObject *a, PyObject *b) -/*[clinic end generated code: output=a8a3d67efcc7b058 input=adb240416511b30a]*/ +/*[clinic end generated code: output=a8a3d67efcc7b058 input=e416981eb78c3053]*/ { Py_RETURN_NONE; } @@ -2178,13 +2178,13 @@ depr_kwd_optional_2 / b: object = None c: object = None - / [from 3.37] + / [from 3.14] [clinic start generated code]*/ static PyObject * depr_kwd_optional_2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=aa2d967f26fdb9f6 input=fb8a82d0087f8732]*/ +/*[clinic end generated code: output=aa2d967f26fdb9f6 input=cae3afb783bfc855]*/ { Py_RETURN_NONE; } @@ -2195,13 +2195,13 @@ depr_kwd_optional_3 a: object = None b: object = None c: object = None - / [from 3.37] + / [from 3.14] [clinic start generated code]*/ static PyObject * depr_kwd_optional_3_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=a26025bf6118fd07 input=e54bbbacd8624fa7]*/ +/*[clinic end generated code: output=a26025bf6118fd07 input=c9183b2f9ccaf992]*/ { Py_RETURN_NONE; } @@ -2213,13 +2213,13 @@ depr_kwd_required_optional / b: object c: object = None - / [from 3.37] + / [from 3.14] [clinic start generated code]*/ static PyObject * depr_kwd_required_optional_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c) -/*[clinic end generated code: output=e53a8b7a250d8ffc input=285105a1ffb784b5]*/ +/*[clinic end generated code: output=e53a8b7a250d8ffc input=23237a046f8388f5]*/ { Py_RETURN_NONE; } @@ -2231,7 +2231,7 @@ depr_kwd_noinline / b: object c: object = None - / [from 3.37] + / [from 3.14] # Force to use _PyArg_ParseStackAndKeywords. d: str(accept={str, robuffer}, zeroes=True) = '' [clinic start generated code]*/ @@ -2239,7 +2239,7 @@ depr_kwd_noinline static PyObject * depr_kwd_noinline_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, const char *d, Py_ssize_t d_length) -/*[clinic end generated code: output=f59da8113f2bad7c input=3773d1bdc1f82298]*/ +/*[clinic end generated code: output=f59da8113f2bad7c input=1d6db65bebb069d7]*/ { Py_RETURN_NONE; } @@ -2250,14 +2250,14 @@ depr_kwd_multi a: object / b: object - / [from 3.37] + / [from 3.14] c: object d: object - / [from 3.38] + / [from 3.15] e: object f: object g: object - / [from 3.39] + / [from 3.16] h: object [clinic start generated code]*/ @@ -2265,7 +2265,7 @@ static PyObject * depr_kwd_multi_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e, PyObject *f, PyObject *g, PyObject *h) -/*[clinic end generated code: output=ddfbde80fe1942e1 input=a84c447a74284174]*/ +/*[clinic end generated code: output=ddfbde80fe1942e1 input=7a074e621c79efd7]*/ { Py_RETURN_NONE; } @@ -2276,13 +2276,13 @@ depr_multi a: object / b: object - / [from 3.37] + / [from 3.14] c: object - / [from 3.38] + / [from 3.15] d: object - * [from 3.38] + * [from 3.15] e: object - * [from 3.37] + * [from 3.14] f: object * g: object @@ -2291,7 +2291,7 @@ depr_multi static PyObject * depr_multi_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e, PyObject *f, PyObject *g) -/*[clinic end generated code: output=f81c92852ca2d4ee input=0e859e8b8eda75d7]*/ +/*[clinic end generated code: output=f81c92852ca2d4ee input=5b847c5e44bedd02]*/ { Py_RETURN_NONE; } From 9501ed52a29035efd15e3f7bad31b0360104b29a Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 24 Jul 2025 14:28:06 -0500 Subject: [PATCH 3/5] amend! Partially revert 74e2acddf68b31ce16e8e0067b1df8c7b67bd6c8 Partially revert 74e2acddf68b31ce16e8e0067b1df8c7b67bd6c8 This restores Modules/_testclinic.c to match the same file in the 3.14 branch. --- Modules/clinic/_testclinic_depr.c.h | 304 ++++++++++++++-------------- 1 file changed, 152 insertions(+), 152 deletions(-) diff --git a/Modules/clinic/_testclinic_depr.c.h b/Modules/clinic/_testclinic_depr.c.h index 135197f06fd7b4..a46d238801b321 100644 --- a/Modules/clinic/_testclinic_depr.c.h +++ b/Modules/clinic/_testclinic_depr.c.h @@ -19,16 +19,16 @@ PyDoc_STRVAR(depr_star_new__doc__, "\n" "Note: Passing positional arguments to _testclinic.DeprStarNew() is\n" "deprecated. Parameter \'a\' will become a keyword-only parameter in\n" -"Python 3.37.\n" +"Python 3.14.\n" ""); static PyObject * depr_star_new_impl(PyTypeObject *type, PyObject *a); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of '_testclinic.DeprStarNew.__new__'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of '_testclinic.DeprStarNew.__new__'.") # else @@ -77,7 +77,7 @@ depr_star_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing positional arguments to _testclinic.DeprStarNew() is " "deprecated. Parameter 'a' will become a keyword-only parameter " - "in Python 3.37.", 1)) + "in Python 3.14.", 1)) { goto exit; } @@ -104,7 +104,7 @@ PyDoc_STRVAR(depr_star_new_clone__doc__, "\n" "Note: Passing positional arguments to _testclinic.DeprStarNew.cloned()\n" "is deprecated. Parameter \'a\' will become a keyword-only parameter in\n" -"Python 3.37.\n" +"Python 3.14.\n" ""); #define DEPR_STAR_NEW_CLONE_METHODDEF \ @@ -113,10 +113,10 @@ PyDoc_STRVAR(depr_star_new_clone__doc__, static PyObject * depr_star_new_clone_impl(PyObject *type, PyObject *a); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of '_testclinic.DeprStarNew.cloned'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of '_testclinic.DeprStarNew.cloned'.") # else @@ -163,7 +163,7 @@ depr_star_new_clone(PyObject *type, PyObject *const *args, Py_ssize_t nargs, PyO if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing positional arguments to _testclinic.DeprStarNew.cloned()" " is deprecated. Parameter 'a' will become a keyword-only " - "parameter in Python 3.37.", 1)) + "parameter in Python 3.14.", 1)) { goto exit; } @@ -192,16 +192,16 @@ PyDoc_STRVAR(depr_star_init__doc__, "\n" "Note: Passing positional arguments to _testclinic.DeprStarInit() is\n" "deprecated. Parameter \'a\' will become a keyword-only parameter in\n" -"Python 3.37.\n" +"Python 3.14.\n" ""); static int depr_star_init_impl(PyObject *self, PyObject *a); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of '_testclinic.DeprStarInit.__init__'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of '_testclinic.DeprStarInit.__init__'.") # else @@ -250,7 +250,7 @@ depr_star_init(PyObject *self, PyObject *args, PyObject *kwargs) if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing positional arguments to _testclinic.DeprStarInit() is " "deprecated. Parameter 'a' will become a keyword-only parameter " - "in Python 3.37.", 1)) + "in Python 3.14.", 1)) { goto exit; } @@ -277,7 +277,7 @@ PyDoc_STRVAR(depr_star_init_clone__doc__, "\n" "Note: Passing positional arguments to\n" "_testclinic.DeprStarInit.cloned() is deprecated. Parameter \'a\' will\n" -"become a keyword-only parameter in Python 3.37.\n" +"become a keyword-only parameter in Python 3.14.\n" ""); #define DEPR_STAR_INIT_CLONE_METHODDEF \ @@ -286,10 +286,10 @@ PyDoc_STRVAR(depr_star_init_clone__doc__, static PyObject * depr_star_init_clone_impl(PyObject *self, PyObject *a); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of '_testclinic.DeprStarInit.cloned'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of '_testclinic.DeprStarInit.cloned'.") # else @@ -336,7 +336,7 @@ depr_star_init_clone(PyObject *self, PyObject *const *args, Py_ssize_t nargs, Py if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing positional arguments to " "_testclinic.DeprStarInit.cloned() is deprecated. Parameter 'a' " - "will become a keyword-only parameter in Python 3.37.", 1)) + "will become a keyword-only parameter in Python 3.14.", 1)) { goto exit; } @@ -361,10 +361,10 @@ static int depr_star_init_noinline_impl(PyObject *self, PyObject *a, PyObject *b, PyObject *c, const char *d, Py_ssize_t d_length); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of '_testclinic.DeprStarInitNoInline.__init__'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of '_testclinic.DeprStarInitNoInline.__init__'.") # else @@ -414,7 +414,7 @@ depr_star_init_noinline(PyObject *self, PyObject *args, PyObject *kwargs) if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing more than 1 positional argument to " "_testclinic.DeprStarInitNoInline() is deprecated. Parameters 'b'" - " and 'c' will become keyword-only parameters in Python 3.37.", 1)) + " and 'c' will become keyword-only parameters in Python 3.14.", 1)) { goto exit; } @@ -436,16 +436,16 @@ PyDoc_STRVAR(depr_kwd_new__doc__, "The deprecation message should use the class name instead of __new__.\n" "\n" "Note: Passing keyword argument \'a\' to _testclinic.DeprKwdNew() is\n" -"deprecated. Parameter \'a\' will become positional-only in Python 3.37.\n" +"deprecated. Parameter \'a\' will become positional-only in Python 3.14.\n" ""); static PyObject * depr_kwd_new_impl(PyTypeObject *type, PyObject *a); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of '_testclinic.DeprKwdNew.__new__'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of '_testclinic.DeprKwdNew.__new__'.") # else @@ -499,7 +499,7 @@ depr_kwd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword argument 'a' to _testclinic.DeprKwdNew() is " "deprecated. Parameter 'a' will become positional-only in Python " - "3.37.", 1)) + "3.14.", 1)) { goto exit; } @@ -522,16 +522,16 @@ PyDoc_STRVAR(depr_kwd_init__doc__, "The deprecation message should use the class name instead of __init__.\n" "\n" "Note: Passing keyword argument \'a\' to _testclinic.DeprKwdInit() is\n" -"deprecated. Parameter \'a\' will become positional-only in Python 3.37.\n" +"deprecated. Parameter \'a\' will become positional-only in Python 3.14.\n" ""); static int depr_kwd_init_impl(PyObject *self, PyObject *a); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of '_testclinic.DeprKwdInit.__init__'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of '_testclinic.DeprKwdInit.__init__'.") # else @@ -585,7 +585,7 @@ depr_kwd_init(PyObject *self, PyObject *args, PyObject *kwargs) if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword argument 'a' to _testclinic.DeprKwdInit() is " "deprecated. Parameter 'a' will become positional-only in Python " - "3.37.", 1)) + "3.14.", 1)) { goto exit; } @@ -605,10 +605,10 @@ static int depr_kwd_init_noinline_impl(PyObject *self, PyObject *a, PyObject *b, PyObject *c, const char *d, Py_ssize_t d_length); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of '_testclinic.DeprKwdInitNoInline.__init__'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of '_testclinic.DeprKwdInitNoInline.__init__'.") # else @@ -665,7 +665,7 @@ depr_kwd_init_noinline(PyObject *self, PyObject *args, PyObject *kwargs) if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword arguments 'b' and 'c' to " "_testclinic.DeprKwdInitNoInline() is deprecated. Parameters 'b' " - "and 'c' will become positional-only in Python 3.37.", 1)) + "and 'c' will become positional-only in Python 3.14.", 1)) { goto exit; } @@ -682,7 +682,7 @@ PyDoc_STRVAR(depr_star_pos0_len1__doc__, "\n" "Note: Passing positional arguments to depr_star_pos0_len1() is\n" "deprecated. Parameter \'a\' will become a keyword-only parameter in\n" -"Python 3.37.\n" +"Python 3.14.\n" ""); #define DEPR_STAR_POS0_LEN1_METHODDEF \ @@ -691,10 +691,10 @@ PyDoc_STRVAR(depr_star_pos0_len1__doc__, static PyObject * depr_star_pos0_len1_impl(PyObject *module, PyObject *a); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_pos0_len1'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_pos0_len1'.") # else @@ -740,7 +740,7 @@ depr_star_pos0_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing positional arguments to depr_star_pos0_len1() is " "deprecated. Parameter 'a' will become a keyword-only parameter " - "in Python 3.37.", 1)) + "in Python 3.14.", 1)) { goto exit; } @@ -763,7 +763,7 @@ PyDoc_STRVAR(depr_star_pos0_len2__doc__, "\n" "Note: Passing positional arguments to depr_star_pos0_len2() is\n" "deprecated. Parameters \'a\' and \'b\' will become keyword-only parameters\n" -"in Python 3.37.\n" +"in Python 3.14.\n" ""); #define DEPR_STAR_POS0_LEN2_METHODDEF \ @@ -772,10 +772,10 @@ PyDoc_STRVAR(depr_star_pos0_len2__doc__, static PyObject * depr_star_pos0_len2_impl(PyObject *module, PyObject *a, PyObject *b); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_pos0_len2'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_pos0_len2'.") # else @@ -822,7 +822,7 @@ depr_star_pos0_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing positional arguments to depr_star_pos0_len2() is " "deprecated. Parameters 'a' and 'b' will become keyword-only " - "parameters in Python 3.37.", 1)) + "parameters in Python 3.14.", 1)) { goto exit; } @@ -846,7 +846,7 @@ PyDoc_STRVAR(depr_star_pos0_len3_with_kwd__doc__, "\n" "Note: Passing positional arguments to depr_star_pos0_len3_with_kwd()\n" "is deprecated. Parameters \'a\', \'b\' and \'c\' will become keyword-only\n" -"parameters in Python 3.37.\n" +"parameters in Python 3.14.\n" ""); #define DEPR_STAR_POS0_LEN3_WITH_KWD_METHODDEF \ @@ -856,10 +856,10 @@ static PyObject * depr_star_pos0_len3_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_pos0_len3_with_kwd'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_pos0_len3_with_kwd'.") # else @@ -908,7 +908,7 @@ depr_star_pos0_len3_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing positional arguments to depr_star_pos0_len3_with_kwd() " "is deprecated. Parameters 'a', 'b' and 'c' will become " - "keyword-only parameters in Python 3.37.", 1)) + "keyword-only parameters in Python 3.14.", 1)) { goto exit; } @@ -934,7 +934,7 @@ PyDoc_STRVAR(depr_star_pos1_len1_opt__doc__, "\n" "Note: Passing 2 positional arguments to depr_star_pos1_len1_opt() is\n" "deprecated. Parameter \'b\' will become a keyword-only parameter in\n" -"Python 3.37.\n" +"Python 3.14.\n" ""); #define DEPR_STAR_POS1_LEN1_OPT_METHODDEF \ @@ -943,10 +943,10 @@ PyDoc_STRVAR(depr_star_pos1_len1_opt__doc__, static PyObject * depr_star_pos1_len1_opt_impl(PyObject *module, PyObject *a, PyObject *b); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_pos1_len1_opt'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_pos1_len1_opt'.") # else @@ -994,7 +994,7 @@ depr_star_pos1_len1_opt(PyObject *module, PyObject *const *args, Py_ssize_t narg if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing 2 positional arguments to depr_star_pos1_len1_opt() is " "deprecated. Parameter 'b' will become a keyword-only parameter " - "in Python 3.37.", 1)) + "in Python 3.14.", 1)) { goto exit; } @@ -1022,7 +1022,7 @@ PyDoc_STRVAR(depr_star_pos1_len1__doc__, "\n" "Note: Passing 2 positional arguments to depr_star_pos1_len1() is\n" "deprecated. Parameter \'b\' will become a keyword-only parameter in\n" -"Python 3.37.\n" +"Python 3.14.\n" ""); #define DEPR_STAR_POS1_LEN1_METHODDEF \ @@ -1031,10 +1031,10 @@ PyDoc_STRVAR(depr_star_pos1_len1__doc__, static PyObject * depr_star_pos1_len1_impl(PyObject *module, PyObject *a, PyObject *b); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_pos1_len1'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_pos1_len1'.") # else @@ -1081,7 +1081,7 @@ depr_star_pos1_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing 2 positional arguments to depr_star_pos1_len1() is " "deprecated. Parameter 'b' will become a keyword-only parameter " - "in Python 3.37.", 1)) + "in Python 3.14.", 1)) { goto exit; } @@ -1105,7 +1105,7 @@ PyDoc_STRVAR(depr_star_pos1_len2_with_kwd__doc__, "\n" "Note: Passing more than 1 positional argument to\n" "depr_star_pos1_len2_with_kwd() is deprecated. Parameters \'b\' and \'c\'\n" -"will become keyword-only parameters in Python 3.37.\n" +"will become keyword-only parameters in Python 3.14.\n" ""); #define DEPR_STAR_POS1_LEN2_WITH_KWD_METHODDEF \ @@ -1115,10 +1115,10 @@ static PyObject * depr_star_pos1_len2_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_pos1_len2_with_kwd'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_pos1_len2_with_kwd'.") # else @@ -1167,7 +1167,7 @@ depr_star_pos1_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing more than 1 positional argument to " "depr_star_pos1_len2_with_kwd() is deprecated. Parameters 'b' and" - " 'c' will become keyword-only parameters in Python 3.37.", 1)) + " 'c' will become keyword-only parameters in Python 3.14.", 1)) { goto exit; } @@ -1193,7 +1193,7 @@ PyDoc_STRVAR(depr_star_pos2_len1__doc__, "\n" "Note: Passing 3 positional arguments to depr_star_pos2_len1() is\n" "deprecated. Parameter \'c\' will become a keyword-only parameter in\n" -"Python 3.37.\n" +"Python 3.14.\n" ""); #define DEPR_STAR_POS2_LEN1_METHODDEF \ @@ -1203,10 +1203,10 @@ static PyObject * depr_star_pos2_len1_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_pos2_len1'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_pos2_len1'.") # else @@ -1254,7 +1254,7 @@ depr_star_pos2_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing 3 positional arguments to depr_star_pos2_len1() is " "deprecated. Parameter 'c' will become a keyword-only parameter " - "in Python 3.37.", 1)) + "in Python 3.14.", 1)) { goto exit; } @@ -1279,7 +1279,7 @@ PyDoc_STRVAR(depr_star_pos2_len2__doc__, "\n" "Note: Passing more than 2 positional arguments to\n" "depr_star_pos2_len2() is deprecated. Parameters \'c\' and \'d\' will\n" -"become keyword-only parameters in Python 3.37.\n" +"become keyword-only parameters in Python 3.14.\n" ""); #define DEPR_STAR_POS2_LEN2_METHODDEF \ @@ -1289,10 +1289,10 @@ static PyObject * depr_star_pos2_len2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_pos2_len2'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_pos2_len2'.") # else @@ -1341,7 +1341,7 @@ depr_star_pos2_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing more than 2 positional arguments to " "depr_star_pos2_len2() is deprecated. Parameters 'c' and 'd' will" - " become keyword-only parameters in Python 3.37.", 1)) + " become keyword-only parameters in Python 3.14.", 1)) { goto exit; } @@ -1367,7 +1367,7 @@ PyDoc_STRVAR(depr_star_pos2_len2_with_kwd__doc__, "\n" "Note: Passing more than 2 positional arguments to\n" "depr_star_pos2_len2_with_kwd() is deprecated. Parameters \'c\' and \'d\'\n" -"will become keyword-only parameters in Python 3.37.\n" +"will become keyword-only parameters in Python 3.14.\n" ""); #define DEPR_STAR_POS2_LEN2_WITH_KWD_METHODDEF \ @@ -1377,10 +1377,10 @@ static PyObject * depr_star_pos2_len2_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_pos2_len2_with_kwd'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_pos2_len2_with_kwd'.") # else @@ -1430,7 +1430,7 @@ depr_star_pos2_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing more than 2 positional arguments to " "depr_star_pos2_len2_with_kwd() is deprecated. Parameters 'c' and" - " 'd' will become keyword-only parameters in Python 3.37.", 1)) + " 'd' will become keyword-only parameters in Python 3.14.", 1)) { goto exit; } @@ -1457,7 +1457,7 @@ PyDoc_STRVAR(depr_star_noinline__doc__, "\n" "Note: Passing more than 1 positional argument to depr_star_noinline()\n" "is deprecated. Parameters \'b\' and \'c\' will become keyword-only\n" -"parameters in Python 3.37.\n" +"parameters in Python 3.14.\n" ""); #define DEPR_STAR_NOINLINE_METHODDEF \ @@ -1467,10 +1467,10 @@ static PyObject * depr_star_noinline_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, const char *d, Py_ssize_t d_length); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_noinline'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_noinline'.") # else @@ -1519,7 +1519,7 @@ depr_star_noinline(PyObject *module, PyObject *const *args, Py_ssize_t nargs, Py if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing more than 1 positional argument to depr_star_noinline() " "is deprecated. Parameters 'b' and 'c' will become keyword-only " - "parameters in Python 3.37.", 1)) + "parameters in Python 3.14.", 1)) { goto exit; } @@ -1540,9 +1540,9 @@ PyDoc_STRVAR(depr_star_multi__doc__, "\n" "Note: Passing more than 1 positional argument to depr_star_multi() is\n" "deprecated. Parameter \'b\' will become a keyword-only parameter in\n" -"Python 3.39. Parameters \'c\' and \'d\' will become keyword-only\n" -"parameters in Python 3.38. Parameters \'e\', \'f\' and \'g\' will become\n" -"keyword-only parameters in Python 3.37.\n" +"Python 3.16. Parameters \'c\' and \'d\' will become keyword-only\n" +"parameters in Python 3.15. Parameters \'e\', \'f\' and \'g\' will become\n" +"keyword-only parameters in Python 3.14.\n" ""); #define DEPR_STAR_MULTI_METHODDEF \ @@ -1553,10 +1553,10 @@ depr_star_multi_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e, PyObject *f, PyObject *g, PyObject *h); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_star_multi'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_star_multi'.") # else @@ -1609,9 +1609,9 @@ depr_star_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObj if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing more than 1 positional argument to depr_star_multi() is " "deprecated. Parameter 'b' will become a keyword-only parameter " - "in Python 3.39. Parameters 'c' and 'd' will become keyword-only " - "parameters in Python 3.38. Parameters 'e', 'f' and 'g' will " - "become keyword-only parameters in Python 3.37.", 1)) + "in Python 3.16. Parameters 'c' and 'd' will become keyword-only " + "parameters in Python 3.15. Parameters 'e', 'f' and 'g' will " + "become keyword-only parameters in Python 3.14.", 1)) { goto exit; } @@ -1640,7 +1640,7 @@ PyDoc_STRVAR(depr_kwd_required_1__doc__, "--\n" "\n" "Note: Passing keyword argument \'b\' to depr_kwd_required_1() is\n" -"deprecated. Parameter \'b\' will become positional-only in Python 3.37.\n" +"deprecated. Parameter \'b\' will become positional-only in Python 3.14.\n" ""); #define DEPR_KWD_REQUIRED_1_METHODDEF \ @@ -1649,10 +1649,10 @@ PyDoc_STRVAR(depr_kwd_required_1__doc__, static PyObject * depr_kwd_required_1_impl(PyObject *module, PyObject *a, PyObject *b); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_kwd_required_1'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_kwd_required_1'.") # else @@ -1704,7 +1704,7 @@ depr_kwd_required_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword argument 'b' to depr_kwd_required_1() is " "deprecated. Parameter 'b' will become positional-only in Python " - "3.37.", 1)) + "3.14.", 1)) { goto exit; } @@ -1723,7 +1723,7 @@ PyDoc_STRVAR(depr_kwd_required_2__doc__, "\n" "Note: Passing keyword arguments \'b\' and \'c\' to depr_kwd_required_2()\n" "is deprecated. Parameters \'b\' and \'c\' will become positional-only in\n" -"Python 3.37.\n" +"Python 3.14.\n" ""); #define DEPR_KWD_REQUIRED_2_METHODDEF \ @@ -1733,10 +1733,10 @@ static PyObject * depr_kwd_required_2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_kwd_required_2'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_kwd_required_2'.") # else @@ -1789,7 +1789,7 @@ depr_kwd_required_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword arguments 'b' and 'c' to depr_kwd_required_2() " "is deprecated. Parameters 'b' and 'c' will become " - "positional-only in Python 3.37.", 1)) + "positional-only in Python 3.14.", 1)) { goto exit; } @@ -1808,7 +1808,7 @@ PyDoc_STRVAR(depr_kwd_optional_1__doc__, "--\n" "\n" "Note: Passing keyword argument \'b\' to depr_kwd_optional_1() is\n" -"deprecated. Parameter \'b\' will become positional-only in Python 3.37.\n" +"deprecated. Parameter \'b\' will become positional-only in Python 3.14.\n" ""); #define DEPR_KWD_OPTIONAL_1_METHODDEF \ @@ -1817,10 +1817,10 @@ PyDoc_STRVAR(depr_kwd_optional_1__doc__, static PyObject * depr_kwd_optional_1_impl(PyObject *module, PyObject *a, PyObject *b); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_kwd_optional_1'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_kwd_optional_1'.") # else @@ -1873,7 +1873,7 @@ depr_kwd_optional_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword argument 'b' to depr_kwd_optional_1() is " "deprecated. Parameter 'b' will become positional-only in Python " - "3.37.", 1)) + "3.14.", 1)) { goto exit; } @@ -1896,7 +1896,7 @@ PyDoc_STRVAR(depr_kwd_optional_2__doc__, "\n" "Note: Passing keyword arguments \'b\' and \'c\' to depr_kwd_optional_2()\n" "is deprecated. Parameters \'b\' and \'c\' will become positional-only in\n" -"Python 3.37.\n" +"Python 3.14.\n" ""); #define DEPR_KWD_OPTIONAL_2_METHODDEF \ @@ -1906,10 +1906,10 @@ static PyObject * depr_kwd_optional_2_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_kwd_optional_2'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_kwd_optional_2'.") # else @@ -1963,7 +1963,7 @@ depr_kwd_optional_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword arguments 'b' and 'c' to depr_kwd_optional_2() " "is deprecated. Parameters 'b' and 'c' will become " - "positional-only in Python 3.37.", 1)) + "positional-only in Python 3.14.", 1)) { goto exit; } @@ -1992,7 +1992,7 @@ PyDoc_STRVAR(depr_kwd_optional_3__doc__, "\n" "Note: Passing keyword arguments \'a\', \'b\' and \'c\' to\n" "depr_kwd_optional_3() is deprecated. Parameters \'a\', \'b\' and \'c\' will\n" -"become positional-only in Python 3.37.\n" +"become positional-only in Python 3.14.\n" ""); #define DEPR_KWD_OPTIONAL_3_METHODDEF \ @@ -2002,10 +2002,10 @@ static PyObject * depr_kwd_optional_3_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_kwd_optional_3'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_kwd_optional_3'.") # else @@ -2059,7 +2059,7 @@ depr_kwd_optional_3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, P if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword arguments 'a', 'b' and 'c' to " "depr_kwd_optional_3() is deprecated. Parameters 'a', 'b' and 'c'" - " will become positional-only in Python 3.37.", 1)) + " will become positional-only in Python 3.14.", 1)) { goto exit; } @@ -2093,7 +2093,7 @@ PyDoc_STRVAR(depr_kwd_required_optional__doc__, "\n" "Note: Passing keyword arguments \'b\' and \'c\' to\n" "depr_kwd_required_optional() is deprecated. Parameters \'b\' and \'c\'\n" -"will become positional-only in Python 3.37.\n" +"will become positional-only in Python 3.14.\n" ""); #define DEPR_KWD_REQUIRED_OPTIONAL_METHODDEF \ @@ -2103,10 +2103,10 @@ static PyObject * depr_kwd_required_optional_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_kwd_required_optional'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_kwd_required_optional'.") # else @@ -2160,7 +2160,7 @@ depr_kwd_required_optional(PyObject *module, PyObject *const *args, Py_ssize_t n if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword arguments 'b' and 'c' to " "depr_kwd_required_optional() is deprecated. Parameters 'b' and " - "'c' will become positional-only in Python 3.37.", 1)) + "'c' will become positional-only in Python 3.14.", 1)) { goto exit; } @@ -2184,7 +2184,7 @@ PyDoc_STRVAR(depr_kwd_noinline__doc__, "\n" "Note: Passing keyword arguments \'b\' and \'c\' to depr_kwd_noinline() is\n" "deprecated. Parameters \'b\' and \'c\' will become positional-only in\n" -"Python 3.37.\n" +"Python 3.14.\n" ""); #define DEPR_KWD_NOINLINE_METHODDEF \ @@ -2194,10 +2194,10 @@ static PyObject * depr_kwd_noinline_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, const char *d, Py_ssize_t d_length); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_kwd_noinline'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_kwd_noinline'.") # else @@ -2253,7 +2253,7 @@ depr_kwd_noinline(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyO if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword arguments 'b' and 'c' to depr_kwd_noinline() is " "deprecated. Parameters 'b' and 'c' will become positional-only " - "in Python 3.37.", 1)) + "in Python 3.14.", 1)) { goto exit; } @@ -2270,9 +2270,9 @@ PyDoc_STRVAR(depr_kwd_multi__doc__, "\n" "Note: Passing keyword arguments \'b\', \'c\', \'d\', \'e\', \'f\' and \'g\' to\n" "depr_kwd_multi() is deprecated. Parameter \'b\' will become positional-\n" -"only in Python 3.37. Parameters \'c\' and \'d\' will become positional-\n" -"only in Python 3.38. Parameters \'e\', \'f\' and \'g\' will become\n" -"positional-only in Python 3.39.\n" +"only in Python 3.14. Parameters \'c\' and \'d\' will become positional-\n" +"only in Python 3.15. Parameters \'e\', \'f\' and \'g\' will become\n" +"positional-only in Python 3.16.\n" ""); #define DEPR_KWD_MULTI_METHODDEF \ @@ -2283,10 +2283,10 @@ depr_kwd_multi_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e, PyObject *f, PyObject *g, PyObject *h); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_kwd_multi'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_kwd_multi'.") # else @@ -2344,9 +2344,9 @@ depr_kwd_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword arguments 'b', 'c', 'd', 'e', 'f' and 'g' to " "depr_kwd_multi() is deprecated. Parameter 'b' will become " - "positional-only in Python 3.37. Parameters 'c' and 'd' will " - "become positional-only in Python 3.38. Parameters 'e', 'f' and " - "'g' will become positional-only in Python 3.39.", 1)) + "positional-only in Python 3.14. Parameters 'c' and 'd' will " + "become positional-only in Python 3.15. Parameters 'e', 'f' and " + "'g' will become positional-only in Python 3.16.", 1)) { goto exit; } @@ -2370,14 +2370,14 @@ PyDoc_STRVAR(depr_multi__doc__, "--\n" "\n" "Note: Passing keyword arguments \'b\' and \'c\' to depr_multi() is\n" -"deprecated. Parameter \'b\' will become positional-only in Python 3.37.\n" -"Parameter \'c\' will become positional-only in Python 3.38.\n" +"deprecated. Parameter \'b\' will become positional-only in Python 3.14.\n" +"Parameter \'c\' will become positional-only in Python 3.15.\n" "\n" "\n" "Note: Passing more than 4 positional arguments to depr_multi() is\n" "deprecated. Parameter \'e\' will become a keyword-only parameter in\n" -"Python 3.38. Parameter \'f\' will become a keyword-only parameter in\n" -"Python 3.37.\n" +"Python 3.15. Parameter \'f\' will become a keyword-only parameter in\n" +"Python 3.14.\n" ""); #define DEPR_MULTI_METHODDEF \ @@ -2387,10 +2387,10 @@ static PyObject * depr_multi_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c, PyObject *d, PyObject *e, PyObject *f, PyObject *g); -// Emit compiler warnings when we get to Python 3.37. -#if PY_VERSION_HEX >= 0x032500C0 +// Emit compiler warnings when we get to Python 3.14. +#if PY_VERSION_HEX >= 0x030e00C0 # error "Update the clinic input of 'depr_multi'." -#elif PY_VERSION_HEX >= 0x032500A0 +#elif PY_VERSION_HEX >= 0x030e00A0 # ifdef _MSC_VER # pragma message ("Update the clinic input of 'depr_multi'.") # else @@ -2442,8 +2442,8 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing more than 4 positional arguments to depr_multi() is " "deprecated. Parameter 'e' will become a keyword-only parameter " - "in Python 3.38. Parameter 'f' will become a keyword-only " - "parameter in Python 3.37.", 1)) + "in Python 3.15. Parameter 'f' will become a keyword-only " + "parameter in Python 3.14.", 1)) { goto exit; } @@ -2457,7 +2457,7 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * if (PyErr_WarnEx(PyExc_DeprecationWarning, "Passing keyword arguments 'b' and 'c' to depr_multi() is " "deprecated. Parameter 'b' will become positional-only in Python " - "3.37. Parameter 'c' will become positional-only in Python 3.38.", 1)) + "3.14. Parameter 'c' will become positional-only in Python 3.15.", 1)) { goto exit; } @@ -2474,4 +2474,4 @@ depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject * exit: return return_value; } -/*[clinic end generated code: output=517bb49913bafc4a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=4e60af44fd6b7b94 input=a9049054013a1b77]*/ From 523e247453879498eda564584a38c921ab49852d Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 24 Jul 2025 15:02:48 -0500 Subject: [PATCH 4/5] amend! amend! Partially revert 74e2acddf68b31ce16e8e0067b1df8c7b67bd6c8 Partially revert 74e2acddf68b31ce16e8e0067b1df8c7b67bd6c8 This restores Modules/_testclinic.c to match the same file in the 3.14 branch. --- Lib/test/test_clinic.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index b1a81cfc1b124f..88880a529bae48 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -3803,9 +3803,9 @@ def test_depr_star_multi(self): fn("a", b="b", c="c", d="d", e="e", f="f", g="g", h="h") errmsg = ( "Passing more than 1 positional argument to depr_star_multi() is deprecated. " - "Parameter 'b' will become a keyword-only parameter in Python 3.39. " - "Parameters 'c' and 'd' will become keyword-only parameters in Python 3.38. " - "Parameters 'e', 'f' and 'g' will become keyword-only parameters in Python 3.37.") + "Parameter 'b' will become a keyword-only parameter in Python 3.16. " + "Parameters 'c' and 'd' will become keyword-only parameters in Python 3.15. " + "Parameters 'e', 'f' and 'g' will become keyword-only parameters in Python 3.14.") check = partial(self.check_depr, re.escape(errmsg), fn) check("a", "b", c="c", d="d", e="e", f="f", g="g", h="h") check("a", "b", "c", d="d", e="e", f="f", g="g", h="h") @@ -3904,9 +3904,9 @@ def test_depr_kwd_multi(self): fn("a", "b", "c", "d", "e", "f", "g", h="h") errmsg = ( "Passing keyword arguments 'b', 'c', 'd', 'e', 'f' and 'g' to depr_kwd_multi() is deprecated. " - "Parameter 'b' will become positional-only in Python 3.37. " - "Parameters 'c' and 'd' will become positional-only in Python 3.38. " - "Parameters 'e', 'f' and 'g' will become positional-only in Python 3.39.") + "Parameter 'b' will become positional-only in Python 3.14. " + "Parameters 'c' and 'd' will become positional-only in Python 3.15. " + "Parameters 'e', 'f' and 'g' will become positional-only in Python 3.16.") check = partial(self.check_depr, re.escape(errmsg), fn) check("a", "b", "c", "d", "e", "f", g="g", h="h") check("a", "b", "c", "d", "e", f="f", g="g", h="h") @@ -3921,8 +3921,8 @@ def test_depr_multi(self): self.assertRaises(TypeError, fn, "a", "b", "c", "d", "e", "f", "g") errmsg = ( "Passing more than 4 positional arguments to depr_multi() is deprecated. " - "Parameter 'e' will become a keyword-only parameter in Python 3.38. " - "Parameter 'f' will become a keyword-only parameter in Python 3.37.") + "Parameter 'e' will become a keyword-only parameter in Python 3.15. " + "Parameter 'f' will become a keyword-only parameter in Python 3.14.") check = partial(self.check_depr, re.escape(errmsg), fn) check("a", "b", "c", "d", "e", "f", g="g") check("a", "b", "c", "d", "e", f="f", g="g") @@ -3930,8 +3930,8 @@ def test_depr_multi(self): fn("a", "b", "c", d="d", e="e", f="f", g="g") errmsg = ( "Passing keyword arguments 'b' and 'c' to depr_multi() is deprecated. " - "Parameter 'b' will become positional-only in Python 3.37. " - "Parameter 'c' will become positional-only in Python 3.38.") + "Parameter 'b' will become positional-only in Python 3.14. " + "Parameter 'c' will become positional-only in Python 3.15.") check = partial(self.check_depr, re.escape(errmsg), fn) check("a", "b", c="c", d="d", e="e", f="f", g="g") check("a", b="b", c="c", d="d", e="e", f="f", g="g") From ef5a66e37077afcbe8851dd5a2fa7b1aaf641545 Mon Sep 17 00:00:00 2001 From: Zachary Ware Date: Thu, 24 Jul 2025 15:07:57 -0500 Subject: [PATCH 5/5] amend! amend! amend! Partially revert 74e2acddf68b31ce16e8e0067b1df8c7b67bd6c8 Partially revert 74e2acddf68b31ce16e8e0067b1df8c7b67bd6c8 This restores Modules/_testclinic.c to match the same file in the 3.14 branch. --- Lib/test/test_clinic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_clinic.py b/Lib/test/test_clinic.py index 88880a529bae48..f8d9b0af8f92ec 100644 --- a/Lib/test/test_clinic.py +++ b/Lib/test/test_clinic.py @@ -2979,7 +2979,7 @@ def check_depr_star(self, pnames, fn, /, *args, name=None, **kwds): regex = ( fr"Passing( more than)?( [0-9]+)? positional argument(s)? to " fr"{re.escape(name)}\(\) is deprecated. Parameters? {pnames} will " - fr"become( a)? keyword-only parameters? in Python 3\.37" + fr"become( a)? keyword-only parameters? in Python 3\.14" ) self.check_depr(regex, fn, *args, **kwds) @@ -2992,7 +2992,7 @@ def check_depr_kwd(self, pnames, fn, *args, name=None, **kwds): regex = ( fr"Passing keyword argument{pl} {pnames} to " fr"{re.escape(name)}\(\) is deprecated. Parameter{pl} {pnames} " - fr"will become positional-only in Python 3\.37." + fr"will become positional-only in Python 3\.14." ) self.check_depr(regex, fn, *args, **kwds) pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy