Debian Codegraph @

Modules/clinic/_testclinic_depr.c.h

raw
1 /*[clinic input]
2 preserve
3 [clinic start generated code]*/
4
5 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
6 # include "pycore_gc.h" // PyGC_Head
7 #endif
8 #include "pycore_abstract.h" // _PyNumber_Index()
9 #include "pycore_long.h" // _PyLong_UnsignedShort_Converter()
10 #include "pycore_modsupport.h" // _PyArg_CheckPositional()
11 #include "pycore_runtime.h" // _Py_ID()
12 #include "pycore_tuple.h" // _PyTuple_FromArray()
13
14 PyDoc_STRVAR(depr_star_new__doc__,
15 "DeprStarNew(a=None)\n"
16 "--\n"
17 "\n"
18 "The deprecation message should use the class name instead of __new__.\n"
19 "\n"
20 "Note: Passing positional arguments to _testclinic.DeprStarNew() is\n"
21 "deprecated. Parameter \'a\' will become a keyword-only parameter in\n"
22 "Python 3.14.\n"
23 "");
24
25 static PyObject *
26 depr_star_new_impl(PyTypeObject *type, PyObject *a);
27
28 // Emit compiler warnings when we get to Python 3.14.
29 #if PY_VERSION_HEX >= 0x030e00C0
30 # error "Update the clinic input of '_testclinic.DeprStarNew.__new__'."
31 #elif PY_VERSION_HEX >= 0x030e00A0
32 # ifdef _MSC_VER
33 # pragma message ("Update the clinic input of '_testclinic.DeprStarNew.__new__'.")
34 # else
35 # warning "Update the clinic input of '_testclinic.DeprStarNew.__new__'."
36 # endif
37 #endif
38
39 static PyObject *
40 depr_star_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
41 {
42 PyObject *return_value = NULL;
43 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
44
45 #define NUM_KEYWORDS 1
46 static struct {
47 PyGC_Head _this_is_not_used;
48 PyObject_VAR_HEAD
49 Py_hash_t ob_hash;
50 PyObject *ob_item[NUM_KEYWORDS];
51 } _kwtuple = {
52 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
53 .ob_hash = -1,
54 .ob_item = { _Py_LATIN1_CHR('a'), },
55 };
56 #undef NUM_KEYWORDS
57 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
58
59 #else // !Py_BUILD_CORE
60 # define KWTUPLE NULL
61 #endif // !Py_BUILD_CORE
62
63 static const char * const _keywords[] = {"a", NULL};
64 static _PyArg_Parser _parser = {
65 .keywords = _keywords,
66 .fname = "DeprStarNew",
67 .kwtuple = KWTUPLE,
68 };
69 #undef KWTUPLE
70 PyObject *argsbuf[1];
71 PyObject * const *fastargs;
72 Py_ssize_t nargs = PyTuple_GET_SIZE(args);
73 Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0;
74 PyObject *a = Py_None;
75
76 if (nargs == 1) {
77 if (PyErr_WarnEx(PyExc_DeprecationWarning,
78 "Passing positional arguments to _testclinic.DeprStarNew() is "
79 "deprecated. Parameter 'a' will become a keyword-only parameter "
80 "in Python 3.14.", 1))
81 {
82 goto exit;
83 }
84 }
85 fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser,
86 /*minpos*/ 0, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
87 if (!fastargs) {
88 goto exit;
89 }
90 if (!noptargs) {
91 goto skip_optional_pos;
92 }
93 a = fastargs[0];
94 skip_optional_pos:
95 return_value = depr_star_new_impl(type, a);
96
97 exit:
98 return return_value;
99 }
100
101 PyDoc_STRVAR(depr_star_new_clone__doc__,
102 "cloned($self, /, a=None)\n"
103 "--\n"
104 "\n"
105 "Note: Passing positional arguments to _testclinic.DeprStarNew.cloned()\n"
106 "is deprecated. Parameter \'a\' will become a keyword-only parameter in\n"
107 "Python 3.14.\n"
108 "");
109
110 #define DEPR_STAR_NEW_CLONE_METHODDEF \
111 {"cloned", _PyCFunction_CAST(depr_star_new_clone), METH_FASTCALL|METH_KEYWORDS, depr_star_new_clone__doc__},
112
113 static PyObject *
114 depr_star_new_clone_impl(PyObject *type, PyObject *a);
115
116 // Emit compiler warnings when we get to Python 3.14.
117 #if PY_VERSION_HEX >= 0x030e00C0
118 # error "Update the clinic input of '_testclinic.DeprStarNew.cloned'."
119 #elif PY_VERSION_HEX >= 0x030e00A0
120 # ifdef _MSC_VER
121 # pragma message ("Update the clinic input of '_testclinic.DeprStarNew.cloned'.")
122 # else
123 # warning "Update the clinic input of '_testclinic.DeprStarNew.cloned'."
124 # endif
125 #endif
126
127 static PyObject *
128 depr_star_new_clone(PyObject *type, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
129 {
130 PyObject *return_value = NULL;
131 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
132
133 #define NUM_KEYWORDS 1
134 static struct {
135 PyGC_Head _this_is_not_used;
136 PyObject_VAR_HEAD
137 Py_hash_t ob_hash;
138 PyObject *ob_item[NUM_KEYWORDS];
139 } _kwtuple = {
140 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
141 .ob_hash = -1,
142 .ob_item = { _Py_LATIN1_CHR('a'), },
143 };
144 #undef NUM_KEYWORDS
145 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
146
147 #else // !Py_BUILD_CORE
148 # define KWTUPLE NULL
149 #endif // !Py_BUILD_CORE
150
151 static const char * const _keywords[] = {"a", NULL};
152 static _PyArg_Parser _parser = {
153 .keywords = _keywords,
154 .fname = "cloned",
155 .kwtuple = KWTUPLE,
156 };
157 #undef KWTUPLE
158 PyObject *argsbuf[1];
159 Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
160 PyObject *a = Py_None;
161
162 if (nargs == 1) {
163 if (PyErr_WarnEx(PyExc_DeprecationWarning,
164 "Passing positional arguments to _testclinic.DeprStarNew.cloned()"
165 " is deprecated. Parameter 'a' will become a keyword-only "
166 "parameter in Python 3.14.", 1))
167 {
168 goto exit;
169 }
170 }
171 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
172 /*minpos*/ 0, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
173 if (!args) {
174 goto exit;
175 }
176 if (!noptargs) {
177 goto skip_optional_pos;
178 }
179 a = args[0];
180 skip_optional_pos:
181 return_value = depr_star_new_clone_impl(type, a);
182
183 exit:
184 return return_value;
185 }
186
187 PyDoc_STRVAR(depr_star_init__doc__,
188 "DeprStarInit(a=None)\n"
189 "--\n"
190 "\n"
191 "The deprecation message should use the class name instead of __init__.\n"
192 "\n"
193 "Note: Passing positional arguments to _testclinic.DeprStarInit() is\n"
194 "deprecated. Parameter \'a\' will become a keyword-only parameter in\n"
195 "Python 3.14.\n"
196 "");
197
198 static int
199 depr_star_init_impl(PyObject *self, PyObject *a);
200
201 // Emit compiler warnings when we get to Python 3.14.
202 #if PY_VERSION_HEX >= 0x030e00C0
203 # error "Update the clinic input of '_testclinic.DeprStarInit.__init__'."
204 #elif PY_VERSION_HEX >= 0x030e00A0
205 # ifdef _MSC_VER
206 # pragma message ("Update the clinic input of '_testclinic.DeprStarInit.__init__'.")
207 # else
208 # warning "Update the clinic input of '_testclinic.DeprStarInit.__init__'."
209 # endif
210 #endif
211
212 static int
213 depr_star_init(PyObject *self, PyObject *args, PyObject *kwargs)
214 {
215 int return_value = -1;
216 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
217
218 #define NUM_KEYWORDS 1
219 static struct {
220 PyGC_Head _this_is_not_used;
221 PyObject_VAR_HEAD
222 Py_hash_t ob_hash;
223 PyObject *ob_item[NUM_KEYWORDS];
224 } _kwtuple = {
225 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
226 .ob_hash = -1,
227 .ob_item = { _Py_LATIN1_CHR('a'), },
228 };
229 #undef NUM_KEYWORDS
230 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
231
232 #else // !Py_BUILD_CORE
233 # define KWTUPLE NULL
234 #endif // !Py_BUILD_CORE
235
236 static const char * const _keywords[] = {"a", NULL};
237 static _PyArg_Parser _parser = {
238 .keywords = _keywords,
239 .fname = "DeprStarInit",
240 .kwtuple = KWTUPLE,
241 };
242 #undef KWTUPLE
243 PyObject *argsbuf[1];
244 PyObject * const *fastargs;
245 Py_ssize_t nargs = PyTuple_GET_SIZE(args);
246 Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0;
247 PyObject *a = Py_None;
248
249 if (nargs == 1) {
250 if (PyErr_WarnEx(PyExc_DeprecationWarning,
251 "Passing positional arguments to _testclinic.DeprStarInit() is "
252 "deprecated. Parameter 'a' will become a keyword-only parameter "
253 "in Python 3.14.", 1))
254 {
255 goto exit;
256 }
257 }
258 fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser,
259 /*minpos*/ 0, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
260 if (!fastargs) {
261 goto exit;
262 }
263 if (!noptargs) {
264 goto skip_optional_pos;
265 }
266 a = fastargs[0];
267 skip_optional_pos:
268 return_value = depr_star_init_impl(self, a);
269
270 exit:
271 return return_value;
272 }
273
274 PyDoc_STRVAR(depr_star_init_clone__doc__,
275 "cloned($self, /, a=None)\n"
276 "--\n"
277 "\n"
278 "Note: Passing positional arguments to\n"
279 "_testclinic.DeprStarInit.cloned() is deprecated. Parameter \'a\' will\n"
280 "become a keyword-only parameter in Python 3.14.\n"
281 "");
282
283 #define DEPR_STAR_INIT_CLONE_METHODDEF \
284 {"cloned", _PyCFunction_CAST(depr_star_init_clone), METH_FASTCALL|METH_KEYWORDS, depr_star_init_clone__doc__},
285
286 static PyObject *
287 depr_star_init_clone_impl(PyObject *self, PyObject *a);
288
289 // Emit compiler warnings when we get to Python 3.14.
290 #if PY_VERSION_HEX >= 0x030e00C0
291 # error "Update the clinic input of '_testclinic.DeprStarInit.cloned'."
292 #elif PY_VERSION_HEX >= 0x030e00A0
293 # ifdef _MSC_VER
294 # pragma message ("Update the clinic input of '_testclinic.DeprStarInit.cloned'.")
295 # else
296 # warning "Update the clinic input of '_testclinic.DeprStarInit.cloned'."
297 # endif
298 #endif
299
300 static PyObject *
301 depr_star_init_clone(PyObject *self, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
302 {
303 PyObject *return_value = NULL;
304 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
305
306 #define NUM_KEYWORDS 1
307 static struct {
308 PyGC_Head _this_is_not_used;
309 PyObject_VAR_HEAD
310 Py_hash_t ob_hash;
311 PyObject *ob_item[NUM_KEYWORDS];
312 } _kwtuple = {
313 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
314 .ob_hash = -1,
315 .ob_item = { _Py_LATIN1_CHR('a'), },
316 };
317 #undef NUM_KEYWORDS
318 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
319
320 #else // !Py_BUILD_CORE
321 # define KWTUPLE NULL
322 #endif // !Py_BUILD_CORE
323
324 static const char * const _keywords[] = {"a", NULL};
325 static _PyArg_Parser _parser = {
326 .keywords = _keywords,
327 .fname = "cloned",
328 .kwtuple = KWTUPLE,
329 };
330 #undef KWTUPLE
331 PyObject *argsbuf[1];
332 Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
333 PyObject *a = Py_None;
334
335 if (nargs == 1) {
336 if (PyErr_WarnEx(PyExc_DeprecationWarning,
337 "Passing positional arguments to "
338 "_testclinic.DeprStarInit.cloned() is deprecated. Parameter 'a' "
339 "will become a keyword-only parameter in Python 3.14.", 1))
340 {
341 goto exit;
342 }
343 }
344 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
345 /*minpos*/ 0, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
346 if (!args) {
347 goto exit;
348 }
349 if (!noptargs) {
350 goto skip_optional_pos;
351 }
352 a = args[0];
353 skip_optional_pos:
354 return_value = depr_star_init_clone_impl(self, a);
355
356 exit:
357 return return_value;
358 }
359
360 static int
361 depr_star_init_noinline_impl(PyObject *self, PyObject *a, PyObject *b,
362 PyObject *c, const char *d, Py_ssize_t d_length);
363
364 // Emit compiler warnings when we get to Python 3.14.
365 #if PY_VERSION_HEX >= 0x030e00C0
366 # error "Update the clinic input of '_testclinic.DeprStarInitNoInline.__init__'."
367 #elif PY_VERSION_HEX >= 0x030e00A0
368 # ifdef _MSC_VER
369 # pragma message ("Update the clinic input of '_testclinic.DeprStarInitNoInline.__init__'.")
370 # else
371 # warning "Update the clinic input of '_testclinic.DeprStarInitNoInline.__init__'."
372 # endif
373 #endif
374
375 static int
376 depr_star_init_noinline(PyObject *self, PyObject *args, PyObject *kwargs)
377 {
378 int return_value = -1;
379 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
380
381 #define NUM_KEYWORDS 4
382 static struct {
383 PyGC_Head _this_is_not_used;
384 PyObject_VAR_HEAD
385 Py_hash_t ob_hash;
386 PyObject *ob_item[NUM_KEYWORDS];
387 } _kwtuple = {
388 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
389 .ob_hash = -1,
390 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), },
391 };
392 #undef NUM_KEYWORDS
393 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
394
395 #else // !Py_BUILD_CORE
396 # define KWTUPLE NULL
397 #endif // !Py_BUILD_CORE
398
399 static const char * const _keywords[] = {"a", "b", "c", "d", NULL};
400 static _PyArg_Parser _parser = {
401 .keywords = _keywords,
402 .format = "OO|O$s#:DeprStarInitNoInline",
403 .kwtuple = KWTUPLE,
404 };
405 #undef KWTUPLE
406 Py_ssize_t nargs = PyTuple_GET_SIZE(args);
407 PyObject *a;
408 PyObject *b;
409 PyObject *c = Py_None;
410 const char *d = "";
411 Py_ssize_t d_length;
412
413 if (nargs > 1 && nargs <= 3) {
414 if (PyErr_WarnEx(PyExc_DeprecationWarning,
415 "Passing more than 1 positional argument to "
416 "_testclinic.DeprStarInitNoInline() is deprecated. Parameters 'b'"
417 " and 'c' will become keyword-only parameters in Python 3.14.", 1))
418 {
419 goto exit;
420 }
421 }
422 if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
423 &a, &b, &c, &d, &d_length)) {
424 goto exit;
425 }
426 return_value = depr_star_init_noinline_impl(self, a, b, c, d, d_length);
427
428 exit:
429 return return_value;
430 }
431
432 PyDoc_STRVAR(depr_kwd_new__doc__,
433 "DeprKwdNew(a=None)\n"
434 "--\n"
435 "\n"
436 "The deprecation message should use the class name instead of __new__.\n"
437 "\n"
438 "Note: Passing keyword argument \'a\' to _testclinic.DeprKwdNew() is\n"
439 "deprecated. Parameter \'a\' will become positional-only in Python 3.14.\n"
440 "");
441
442 static PyObject *
443 depr_kwd_new_impl(PyTypeObject *type, PyObject *a);
444
445 // Emit compiler warnings when we get to Python 3.14.
446 #if PY_VERSION_HEX >= 0x030e00C0
447 # error "Update the clinic input of '_testclinic.DeprKwdNew.__new__'."
448 #elif PY_VERSION_HEX >= 0x030e00A0
449 # ifdef _MSC_VER
450 # pragma message ("Update the clinic input of '_testclinic.DeprKwdNew.__new__'.")
451 # else
452 # warning "Update the clinic input of '_testclinic.DeprKwdNew.__new__'."
453 # endif
454 #endif
455
456 static PyObject *
457 depr_kwd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
458 {
459 PyObject *return_value = NULL;
460 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
461
462 #define NUM_KEYWORDS 1
463 static struct {
464 PyGC_Head _this_is_not_used;
465 PyObject_VAR_HEAD
466 Py_hash_t ob_hash;
467 PyObject *ob_item[NUM_KEYWORDS];
468 } _kwtuple = {
469 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
470 .ob_hash = -1,
471 .ob_item = { _Py_LATIN1_CHR('a'), },
472 };
473 #undef NUM_KEYWORDS
474 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
475
476 #else // !Py_BUILD_CORE
477 # define KWTUPLE NULL
478 #endif // !Py_BUILD_CORE
479
480 static const char * const _keywords[] = {"a", NULL};
481 static _PyArg_Parser _parser = {
482 .keywords = _keywords,
483 .fname = "DeprKwdNew",
484 .kwtuple = KWTUPLE,
485 };
486 #undef KWTUPLE
487 PyObject *argsbuf[1];
488 PyObject * const *fastargs;
489 Py_ssize_t nargs = PyTuple_GET_SIZE(args);
490 Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0;
491 PyObject *a = Py_None;
492
493 fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser,
494 /*minpos*/ 0, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
495 if (!fastargs) {
496 goto exit;
497 }
498 if (kwargs && PyDict_GET_SIZE(kwargs) && nargs < 1 && fastargs[0]) {
499 if (PyErr_WarnEx(PyExc_DeprecationWarning,
500 "Passing keyword argument 'a' to _testclinic.DeprKwdNew() is "
501 "deprecated. Parameter 'a' will become positional-only in Python "
502 "3.14.", 1))
503 {
504 goto exit;
505 }
506 }
507 if (!noptargs) {
508 goto skip_optional_pos;
509 }
510 a = fastargs[0];
511 skip_optional_pos:
512 return_value = depr_kwd_new_impl(type, a);
513
514 exit:
515 return return_value;
516 }
517
518 PyDoc_STRVAR(depr_kwd_init__doc__,
519 "DeprKwdInit(a=None)\n"
520 "--\n"
521 "\n"
522 "The deprecation message should use the class name instead of __init__.\n"
523 "\n"
524 "Note: Passing keyword argument \'a\' to _testclinic.DeprKwdInit() is\n"
525 "deprecated. Parameter \'a\' will become positional-only in Python 3.14.\n"
526 "");
527
528 static int
529 depr_kwd_init_impl(PyObject *self, PyObject *a);
530
531 // Emit compiler warnings when we get to Python 3.14.
532 #if PY_VERSION_HEX >= 0x030e00C0
533 # error "Update the clinic input of '_testclinic.DeprKwdInit.__init__'."
534 #elif PY_VERSION_HEX >= 0x030e00A0
535 # ifdef _MSC_VER
536 # pragma message ("Update the clinic input of '_testclinic.DeprKwdInit.__init__'.")
537 # else
538 # warning "Update the clinic input of '_testclinic.DeprKwdInit.__init__'."
539 # endif
540 #endif
541
542 static int
543 depr_kwd_init(PyObject *self, PyObject *args, PyObject *kwargs)
544 {
545 int return_value = -1;
546 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
547
548 #define NUM_KEYWORDS 1
549 static struct {
550 PyGC_Head _this_is_not_used;
551 PyObject_VAR_HEAD
552 Py_hash_t ob_hash;
553 PyObject *ob_item[NUM_KEYWORDS];
554 } _kwtuple = {
555 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
556 .ob_hash = -1,
557 .ob_item = { _Py_LATIN1_CHR('a'), },
558 };
559 #undef NUM_KEYWORDS
560 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
561
562 #else // !Py_BUILD_CORE
563 # define KWTUPLE NULL
564 #endif // !Py_BUILD_CORE
565
566 static const char * const _keywords[] = {"a", NULL};
567 static _PyArg_Parser _parser = {
568 .keywords = _keywords,
569 .fname = "DeprKwdInit",
570 .kwtuple = KWTUPLE,
571 };
572 #undef KWTUPLE
573 PyObject *argsbuf[1];
574 PyObject * const *fastargs;
575 Py_ssize_t nargs = PyTuple_GET_SIZE(args);
576 Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0;
577 PyObject *a = Py_None;
578
579 fastargs = _PyArg_UnpackKeywords(_PyTuple_CAST(args)->ob_item, nargs, kwargs, NULL, &_parser,
580 /*minpos*/ 0, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
581 if (!fastargs) {
582 goto exit;
583 }
584 if (kwargs && PyDict_GET_SIZE(kwargs) && nargs < 1 && fastargs[0]) {
585 if (PyErr_WarnEx(PyExc_DeprecationWarning,
586 "Passing keyword argument 'a' to _testclinic.DeprKwdInit() is "
587 "deprecated. Parameter 'a' will become positional-only in Python "
588 "3.14.", 1))
589 {
590 goto exit;
591 }
592 }
593 if (!noptargs) {
594 goto skip_optional_pos;
595 }
596 a = fastargs[0];
597 skip_optional_pos:
598 return_value = depr_kwd_init_impl(self, a);
599
600 exit:
601 return return_value;
602 }
603
604 static int
605 depr_kwd_init_noinline_impl(PyObject *self, PyObject *a, PyObject *b,
606 PyObject *c, const char *d, Py_ssize_t d_length);
607
608 // Emit compiler warnings when we get to Python 3.14.
609 #if PY_VERSION_HEX >= 0x030e00C0
610 # error "Update the clinic input of '_testclinic.DeprKwdInitNoInline.__init__'."
611 #elif PY_VERSION_HEX >= 0x030e00A0
612 # ifdef _MSC_VER
613 # pragma message ("Update the clinic input of '_testclinic.DeprKwdInitNoInline.__init__'.")
614 # else
615 # warning "Update the clinic input of '_testclinic.DeprKwdInitNoInline.__init__'."
616 # endif
617 #endif
618
619 static int
620 depr_kwd_init_noinline(PyObject *self, PyObject *args, PyObject *kwargs)
621 {
622 int return_value = -1;
623 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
624
625 #define NUM_KEYWORDS 3
626 static struct {
627 PyGC_Head _this_is_not_used;
628 PyObject_VAR_HEAD
629 Py_hash_t ob_hash;
630 PyObject *ob_item[NUM_KEYWORDS];
631 } _kwtuple = {
632 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
633 .ob_hash = -1,
634 .ob_item = { _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), },
635 };
636 #undef NUM_KEYWORDS
637 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
638
639 #else // !Py_BUILD_CORE
640 # define KWTUPLE NULL
641 #endif // !Py_BUILD_CORE
642
643 static const char * const _keywords[] = {"", "b", "c", "d", NULL};
644 static _PyArg_Parser _parser = {
645 .keywords = _keywords,
646 .format = "OO|Os#:DeprKwdInitNoInline",
647 .kwtuple = KWTUPLE,
648 };
649 #undef KWTUPLE
650 Py_ssize_t nargs = PyTuple_GET_SIZE(args);
651 PyObject *a;
652 PyObject *b;
653 PyObject *c = Py_None;
654 const char *d = "";
655 Py_ssize_t d_length;
656
657 if (!_PyArg_ParseTupleAndKeywordsFast(args, kwargs, &_parser,
658 &a, &b, &c, &d, &d_length)) {
659 goto exit;
660 }
661 if (kwargs && PyDict_GET_SIZE(kwargs) && ((nargs < 2) || (nargs < 3 && PyDict_Contains(kwargs, _Py_LATIN1_CHR('c'))))) {
662 if (PyErr_Occurred()) { // PyDict_Contains() above can fail
663 goto exit;
664 }
665 if (PyErr_WarnEx(PyExc_DeprecationWarning,
666 "Passing keyword arguments 'b' and 'c' to "
667 "_testclinic.DeprKwdInitNoInline() is deprecated. Parameters 'b' "
668 "and 'c' will become positional-only in Python 3.14.", 1))
669 {
670 goto exit;
671 }
672 }
673 return_value = depr_kwd_init_noinline_impl(self, a, b, c, d, d_length);
674
675 exit:
676 return return_value;
677 }
678
679 PyDoc_STRVAR(depr_star_pos0_len1__doc__,
680 "depr_star_pos0_len1($module, /, a)\n"
681 "--\n"
682 "\n"
683 "Note: Passing positional arguments to depr_star_pos0_len1() is\n"
684 "deprecated. Parameter \'a\' will become a keyword-only parameter in\n"
685 "Python 3.14.\n"
686 "");
687
688 #define DEPR_STAR_POS0_LEN1_METHODDEF \
689 {"depr_star_pos0_len1", _PyCFunction_CAST(depr_star_pos0_len1), METH_FASTCALL|METH_KEYWORDS, depr_star_pos0_len1__doc__},
690
691 static PyObject *
692 depr_star_pos0_len1_impl(PyObject *module, PyObject *a);
693
694 // Emit compiler warnings when we get to Python 3.14.
695 #if PY_VERSION_HEX >= 0x030e00C0
696 # error "Update the clinic input of 'depr_star_pos0_len1'."
697 #elif PY_VERSION_HEX >= 0x030e00A0
698 # ifdef _MSC_VER
699 # pragma message ("Update the clinic input of 'depr_star_pos0_len1'.")
700 # else
701 # warning "Update the clinic input of 'depr_star_pos0_len1'."
702 # endif
703 #endif
704
705 static PyObject *
706 depr_star_pos0_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
707 {
708 PyObject *return_value = NULL;
709 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
710
711 #define NUM_KEYWORDS 1
712 static struct {
713 PyGC_Head _this_is_not_used;
714 PyObject_VAR_HEAD
715 Py_hash_t ob_hash;
716 PyObject *ob_item[NUM_KEYWORDS];
717 } _kwtuple = {
718 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
719 .ob_hash = -1,
720 .ob_item = { _Py_LATIN1_CHR('a'), },
721 };
722 #undef NUM_KEYWORDS
723 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
724
725 #else // !Py_BUILD_CORE
726 # define KWTUPLE NULL
727 #endif // !Py_BUILD_CORE
728
729 static const char * const _keywords[] = {"a", NULL};
730 static _PyArg_Parser _parser = {
731 .keywords = _keywords,
732 .fname = "depr_star_pos0_len1",
733 .kwtuple = KWTUPLE,
734 };
735 #undef KWTUPLE
736 PyObject *argsbuf[1];
737 PyObject *a;
738
739 if (nargs == 1) {
740 if (PyErr_WarnEx(PyExc_DeprecationWarning,
741 "Passing positional arguments to depr_star_pos0_len1() is "
742 "deprecated. Parameter 'a' will become a keyword-only parameter "
743 "in Python 3.14.", 1))
744 {
745 goto exit;
746 }
747 }
748 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
749 /*minpos*/ 1, /*maxpos*/ 1, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
750 if (!args) {
751 goto exit;
752 }
753 a = args[0];
754 return_value = depr_star_pos0_len1_impl(module, a);
755
756 exit:
757 return return_value;
758 }
759
760 PyDoc_STRVAR(depr_star_pos0_len2__doc__,
761 "depr_star_pos0_len2($module, /, a, b)\n"
762 "--\n"
763 "\n"
764 "Note: Passing positional arguments to depr_star_pos0_len2() is\n"
765 "deprecated. Parameters \'a\' and \'b\' will become keyword-only parameters\n"
766 "in Python 3.14.\n"
767 "");
768
769 #define DEPR_STAR_POS0_LEN2_METHODDEF \
770 {"depr_star_pos0_len2", _PyCFunction_CAST(depr_star_pos0_len2), METH_FASTCALL|METH_KEYWORDS, depr_star_pos0_len2__doc__},
771
772 static PyObject *
773 depr_star_pos0_len2_impl(PyObject *module, PyObject *a, PyObject *b);
774
775 // Emit compiler warnings when we get to Python 3.14.
776 #if PY_VERSION_HEX >= 0x030e00C0
777 # error "Update the clinic input of 'depr_star_pos0_len2'."
778 #elif PY_VERSION_HEX >= 0x030e00A0
779 # ifdef _MSC_VER
780 # pragma message ("Update the clinic input of 'depr_star_pos0_len2'.")
781 # else
782 # warning "Update the clinic input of 'depr_star_pos0_len2'."
783 # endif
784 #endif
785
786 static PyObject *
787 depr_star_pos0_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
788 {
789 PyObject *return_value = NULL;
790 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
791
792 #define NUM_KEYWORDS 2
793 static struct {
794 PyGC_Head _this_is_not_used;
795 PyObject_VAR_HEAD
796 Py_hash_t ob_hash;
797 PyObject *ob_item[NUM_KEYWORDS];
798 } _kwtuple = {
799 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
800 .ob_hash = -1,
801 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), },
802 };
803 #undef NUM_KEYWORDS
804 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
805
806 #else // !Py_BUILD_CORE
807 # define KWTUPLE NULL
808 #endif // !Py_BUILD_CORE
809
810 static const char * const _keywords[] = {"a", "b", NULL};
811 static _PyArg_Parser _parser = {
812 .keywords = _keywords,
813 .fname = "depr_star_pos0_len2",
814 .kwtuple = KWTUPLE,
815 };
816 #undef KWTUPLE
817 PyObject *argsbuf[2];
818 PyObject *a;
819 PyObject *b;
820
821 if (nargs > 0 && nargs <= 2) {
822 if (PyErr_WarnEx(PyExc_DeprecationWarning,
823 "Passing positional arguments to depr_star_pos0_len2() is "
824 "deprecated. Parameters 'a' and 'b' will become keyword-only "
825 "parameters in Python 3.14.", 1))
826 {
827 goto exit;
828 }
829 }
830 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
831 /*minpos*/ 2, /*maxpos*/ 2, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
832 if (!args) {
833 goto exit;
834 }
835 a = args[0];
836 b = args[1];
837 return_value = depr_star_pos0_len2_impl(module, a, b);
838
839 exit:
840 return return_value;
841 }
842
843 PyDoc_STRVAR(depr_star_pos0_len3_with_kwd__doc__,
844 "depr_star_pos0_len3_with_kwd($module, /, a, b, c, *, d)\n"
845 "--\n"
846 "\n"
847 "Note: Passing positional arguments to depr_star_pos0_len3_with_kwd()\n"
848 "is deprecated. Parameters \'a\', \'b\' and \'c\' will become keyword-only\n"
849 "parameters in Python 3.14.\n"
850 "");
851
852 #define DEPR_STAR_POS0_LEN3_WITH_KWD_METHODDEF \
853 {"depr_star_pos0_len3_with_kwd", _PyCFunction_CAST(depr_star_pos0_len3_with_kwd), METH_FASTCALL|METH_KEYWORDS, depr_star_pos0_len3_with_kwd__doc__},
854
855 static PyObject *
856 depr_star_pos0_len3_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b,
857 PyObject *c, PyObject *d);
858
859 // Emit compiler warnings when we get to Python 3.14.
860 #if PY_VERSION_HEX >= 0x030e00C0
861 # error "Update the clinic input of 'depr_star_pos0_len3_with_kwd'."
862 #elif PY_VERSION_HEX >= 0x030e00A0
863 # ifdef _MSC_VER
864 # pragma message ("Update the clinic input of 'depr_star_pos0_len3_with_kwd'.")
865 # else
866 # warning "Update the clinic input of 'depr_star_pos0_len3_with_kwd'."
867 # endif
868 #endif
869
870 static PyObject *
871 depr_star_pos0_len3_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
872 {
873 PyObject *return_value = NULL;
874 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
875
876 #define NUM_KEYWORDS 4
877 static struct {
878 PyGC_Head _this_is_not_used;
879 PyObject_VAR_HEAD
880 Py_hash_t ob_hash;
881 PyObject *ob_item[NUM_KEYWORDS];
882 } _kwtuple = {
883 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
884 .ob_hash = -1,
885 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), },
886 };
887 #undef NUM_KEYWORDS
888 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
889
890 #else // !Py_BUILD_CORE
891 # define KWTUPLE NULL
892 #endif // !Py_BUILD_CORE
893
894 static const char * const _keywords[] = {"a", "b", "c", "d", NULL};
895 static _PyArg_Parser _parser = {
896 .keywords = _keywords,
897 .fname = "depr_star_pos0_len3_with_kwd",
898 .kwtuple = KWTUPLE,
899 };
900 #undef KWTUPLE
901 PyObject *argsbuf[4];
902 PyObject *a;
903 PyObject *b;
904 PyObject *c;
905 PyObject *d;
906
907 if (nargs > 0 && nargs <= 3) {
908 if (PyErr_WarnEx(PyExc_DeprecationWarning,
909 "Passing positional arguments to depr_star_pos0_len3_with_kwd() "
910 "is deprecated. Parameters 'a', 'b' and 'c' will become "
911 "keyword-only parameters in Python 3.14.", 1))
912 {
913 goto exit;
914 }
915 }
916 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
917 /*minpos*/ 3, /*maxpos*/ 3, /*minkw*/ 1, /*varpos*/ 0, argsbuf);
918 if (!args) {
919 goto exit;
920 }
921 a = args[0];
922 b = args[1];
923 c = args[2];
924 d = args[3];
925 return_value = depr_star_pos0_len3_with_kwd_impl(module, a, b, c, d);
926
927 exit:
928 return return_value;
929 }
930
931 PyDoc_STRVAR(depr_star_pos1_len1_opt__doc__,
932 "depr_star_pos1_len1_opt($module, /, a, b=None)\n"
933 "--\n"
934 "\n"
935 "Note: Passing 2 positional arguments to depr_star_pos1_len1_opt() is\n"
936 "deprecated. Parameter \'b\' will become a keyword-only parameter in\n"
937 "Python 3.14.\n"
938 "");
939
940 #define DEPR_STAR_POS1_LEN1_OPT_METHODDEF \
941 {"depr_star_pos1_len1_opt", _PyCFunction_CAST(depr_star_pos1_len1_opt), METH_FASTCALL|METH_KEYWORDS, depr_star_pos1_len1_opt__doc__},
942
943 static PyObject *
944 depr_star_pos1_len1_opt_impl(PyObject *module, PyObject *a, PyObject *b);
945
946 // Emit compiler warnings when we get to Python 3.14.
947 #if PY_VERSION_HEX >= 0x030e00C0
948 # error "Update the clinic input of 'depr_star_pos1_len1_opt'."
949 #elif PY_VERSION_HEX >= 0x030e00A0
950 # ifdef _MSC_VER
951 # pragma message ("Update the clinic input of 'depr_star_pos1_len1_opt'.")
952 # else
953 # warning "Update the clinic input of 'depr_star_pos1_len1_opt'."
954 # endif
955 #endif
956
957 static PyObject *
958 depr_star_pos1_len1_opt(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
959 {
960 PyObject *return_value = NULL;
961 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
962
963 #define NUM_KEYWORDS 2
964 static struct {
965 PyGC_Head _this_is_not_used;
966 PyObject_VAR_HEAD
967 Py_hash_t ob_hash;
968 PyObject *ob_item[NUM_KEYWORDS];
969 } _kwtuple = {
970 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
971 .ob_hash = -1,
972 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), },
973 };
974 #undef NUM_KEYWORDS
975 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
976
977 #else // !Py_BUILD_CORE
978 # define KWTUPLE NULL
979 #endif // !Py_BUILD_CORE
980
981 static const char * const _keywords[] = {"a", "b", NULL};
982 static _PyArg_Parser _parser = {
983 .keywords = _keywords,
984 .fname = "depr_star_pos1_len1_opt",
985 .kwtuple = KWTUPLE,
986 };
987 #undef KWTUPLE
988 PyObject *argsbuf[2];
989 Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
990 PyObject *a;
991 PyObject *b = Py_None;
992
993 if (nargs == 2) {
994 if (PyErr_WarnEx(PyExc_DeprecationWarning,
995 "Passing 2 positional arguments to depr_star_pos1_len1_opt() is "
996 "deprecated. Parameter 'b' will become a keyword-only parameter "
997 "in Python 3.14.", 1))
998 {
999 goto exit;
1000 }
1001 }
1002 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1003 /*minpos*/ 1, /*maxpos*/ 2, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
1004 if (!args) {
1005 goto exit;
1006 }
1007 a = args[0];
1008 if (!noptargs) {
1009 goto skip_optional_pos;
1010 }
1011 b = args[1];
1012 skip_optional_pos:
1013 return_value = depr_star_pos1_len1_opt_impl(module, a, b);
1014
1015 exit:
1016 return return_value;
1017 }
1018
1019 PyDoc_STRVAR(depr_star_pos1_len1__doc__,
1020 "depr_star_pos1_len1($module, /, a, b)\n"
1021 "--\n"
1022 "\n"
1023 "Note: Passing 2 positional arguments to depr_star_pos1_len1() is\n"
1024 "deprecated. Parameter \'b\' will become a keyword-only parameter in\n"
1025 "Python 3.14.\n"
1026 "");
1027
1028 #define DEPR_STAR_POS1_LEN1_METHODDEF \
1029 {"depr_star_pos1_len1", _PyCFunction_CAST(depr_star_pos1_len1), METH_FASTCALL|METH_KEYWORDS, depr_star_pos1_len1__doc__},
1030
1031 static PyObject *
1032 depr_star_pos1_len1_impl(PyObject *module, PyObject *a, PyObject *b);
1033
1034 // Emit compiler warnings when we get to Python 3.14.
1035 #if PY_VERSION_HEX >= 0x030e00C0
1036 # error "Update the clinic input of 'depr_star_pos1_len1'."
1037 #elif PY_VERSION_HEX >= 0x030e00A0
1038 # ifdef _MSC_VER
1039 # pragma message ("Update the clinic input of 'depr_star_pos1_len1'.")
1040 # else
1041 # warning "Update the clinic input of 'depr_star_pos1_len1'."
1042 # endif
1043 #endif
1044
1045 static PyObject *
1046 depr_star_pos1_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1047 {
1048 PyObject *return_value = NULL;
1049 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1050
1051 #define NUM_KEYWORDS 2
1052 static struct {
1053 PyGC_Head _this_is_not_used;
1054 PyObject_VAR_HEAD
1055 Py_hash_t ob_hash;
1056 PyObject *ob_item[NUM_KEYWORDS];
1057 } _kwtuple = {
1058 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1059 .ob_hash = -1,
1060 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), },
1061 };
1062 #undef NUM_KEYWORDS
1063 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1064
1065 #else // !Py_BUILD_CORE
1066 # define KWTUPLE NULL
1067 #endif // !Py_BUILD_CORE
1068
1069 static const char * const _keywords[] = {"a", "b", NULL};
1070 static _PyArg_Parser _parser = {
1071 .keywords = _keywords,
1072 .fname = "depr_star_pos1_len1",
1073 .kwtuple = KWTUPLE,
1074 };
1075 #undef KWTUPLE
1076 PyObject *argsbuf[2];
1077 PyObject *a;
1078 PyObject *b;
1079
1080 if (nargs == 2) {
1081 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1082 "Passing 2 positional arguments to depr_star_pos1_len1() is "
1083 "deprecated. Parameter 'b' will become a keyword-only parameter "
1084 "in Python 3.14.", 1))
1085 {
1086 goto exit;
1087 }
1088 }
1089 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1090 /*minpos*/ 2, /*maxpos*/ 2, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
1091 if (!args) {
1092 goto exit;
1093 }
1094 a = args[0];
1095 b = args[1];
1096 return_value = depr_star_pos1_len1_impl(module, a, b);
1097
1098 exit:
1099 return return_value;
1100 }
1101
1102 PyDoc_STRVAR(depr_star_pos1_len2_with_kwd__doc__,
1103 "depr_star_pos1_len2_with_kwd($module, /, a, b, c, *, d)\n"
1104 "--\n"
1105 "\n"
1106 "Note: Passing more than 1 positional argument to\n"
1107 "depr_star_pos1_len2_with_kwd() is deprecated. Parameters \'b\' and \'c\'\n"
1108 "will become keyword-only parameters in Python 3.14.\n"
1109 "");
1110
1111 #define DEPR_STAR_POS1_LEN2_WITH_KWD_METHODDEF \
1112 {"depr_star_pos1_len2_with_kwd", _PyCFunction_CAST(depr_star_pos1_len2_with_kwd), METH_FASTCALL|METH_KEYWORDS, depr_star_pos1_len2_with_kwd__doc__},
1113
1114 static PyObject *
1115 depr_star_pos1_len2_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b,
1116 PyObject *c, PyObject *d);
1117
1118 // Emit compiler warnings when we get to Python 3.14.
1119 #if PY_VERSION_HEX >= 0x030e00C0
1120 # error "Update the clinic input of 'depr_star_pos1_len2_with_kwd'."
1121 #elif PY_VERSION_HEX >= 0x030e00A0
1122 # ifdef _MSC_VER
1123 # pragma message ("Update the clinic input of 'depr_star_pos1_len2_with_kwd'.")
1124 # else
1125 # warning "Update the clinic input of 'depr_star_pos1_len2_with_kwd'."
1126 # endif
1127 #endif
1128
1129 static PyObject *
1130 depr_star_pos1_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1131 {
1132 PyObject *return_value = NULL;
1133 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1134
1135 #define NUM_KEYWORDS 4
1136 static struct {
1137 PyGC_Head _this_is_not_used;
1138 PyObject_VAR_HEAD
1139 Py_hash_t ob_hash;
1140 PyObject *ob_item[NUM_KEYWORDS];
1141 } _kwtuple = {
1142 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1143 .ob_hash = -1,
1144 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), },
1145 };
1146 #undef NUM_KEYWORDS
1147 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1148
1149 #else // !Py_BUILD_CORE
1150 # define KWTUPLE NULL
1151 #endif // !Py_BUILD_CORE
1152
1153 static const char * const _keywords[] = {"a", "b", "c", "d", NULL};
1154 static _PyArg_Parser _parser = {
1155 .keywords = _keywords,
1156 .fname = "depr_star_pos1_len2_with_kwd",
1157 .kwtuple = KWTUPLE,
1158 };
1159 #undef KWTUPLE
1160 PyObject *argsbuf[4];
1161 PyObject *a;
1162 PyObject *b;
1163 PyObject *c;
1164 PyObject *d;
1165
1166 if (nargs > 1 && nargs <= 3) {
1167 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1168 "Passing more than 1 positional argument to "
1169 "depr_star_pos1_len2_with_kwd() is deprecated. Parameters 'b' and"
1170 " 'c' will become keyword-only parameters in Python 3.14.", 1))
1171 {
1172 goto exit;
1173 }
1174 }
1175 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1176 /*minpos*/ 3, /*maxpos*/ 3, /*minkw*/ 1, /*varpos*/ 0, argsbuf);
1177 if (!args) {
1178 goto exit;
1179 }
1180 a = args[0];
1181 b = args[1];
1182 c = args[2];
1183 d = args[3];
1184 return_value = depr_star_pos1_len2_with_kwd_impl(module, a, b, c, d);
1185
1186 exit:
1187 return return_value;
1188 }
1189
1190 PyDoc_STRVAR(depr_star_pos2_len1__doc__,
1191 "depr_star_pos2_len1($module, /, a, b, c)\n"
1192 "--\n"
1193 "\n"
1194 "Note: Passing 3 positional arguments to depr_star_pos2_len1() is\n"
1195 "deprecated. Parameter \'c\' will become a keyword-only parameter in\n"
1196 "Python 3.14.\n"
1197 "");
1198
1199 #define DEPR_STAR_POS2_LEN1_METHODDEF \
1200 {"depr_star_pos2_len1", _PyCFunction_CAST(depr_star_pos2_len1), METH_FASTCALL|METH_KEYWORDS, depr_star_pos2_len1__doc__},
1201
1202 static PyObject *
1203 depr_star_pos2_len1_impl(PyObject *module, PyObject *a, PyObject *b,
1204 PyObject *c);
1205
1206 // Emit compiler warnings when we get to Python 3.14.
1207 #if PY_VERSION_HEX >= 0x030e00C0
1208 # error "Update the clinic input of 'depr_star_pos2_len1'."
1209 #elif PY_VERSION_HEX >= 0x030e00A0
1210 # ifdef _MSC_VER
1211 # pragma message ("Update the clinic input of 'depr_star_pos2_len1'.")
1212 # else
1213 # warning "Update the clinic input of 'depr_star_pos2_len1'."
1214 # endif
1215 #endif
1216
1217 static PyObject *
1218 depr_star_pos2_len1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1219 {
1220 PyObject *return_value = NULL;
1221 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1222
1223 #define NUM_KEYWORDS 3
1224 static struct {
1225 PyGC_Head _this_is_not_used;
1226 PyObject_VAR_HEAD
1227 Py_hash_t ob_hash;
1228 PyObject *ob_item[NUM_KEYWORDS];
1229 } _kwtuple = {
1230 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1231 .ob_hash = -1,
1232 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), },
1233 };
1234 #undef NUM_KEYWORDS
1235 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1236
1237 #else // !Py_BUILD_CORE
1238 # define KWTUPLE NULL
1239 #endif // !Py_BUILD_CORE
1240
1241 static const char * const _keywords[] = {"a", "b", "c", NULL};
1242 static _PyArg_Parser _parser = {
1243 .keywords = _keywords,
1244 .fname = "depr_star_pos2_len1",
1245 .kwtuple = KWTUPLE,
1246 };
1247 #undef KWTUPLE
1248 PyObject *argsbuf[3];
1249 PyObject *a;
1250 PyObject *b;
1251 PyObject *c;
1252
1253 if (nargs == 3) {
1254 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1255 "Passing 3 positional arguments to depr_star_pos2_len1() is "
1256 "deprecated. Parameter 'c' will become a keyword-only parameter "
1257 "in Python 3.14.", 1))
1258 {
1259 goto exit;
1260 }
1261 }
1262 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1263 /*minpos*/ 3, /*maxpos*/ 3, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
1264 if (!args) {
1265 goto exit;
1266 }
1267 a = args[0];
1268 b = args[1];
1269 c = args[2];
1270 return_value = depr_star_pos2_len1_impl(module, a, b, c);
1271
1272 exit:
1273 return return_value;
1274 }
1275
1276 PyDoc_STRVAR(depr_star_pos2_len2__doc__,
1277 "depr_star_pos2_len2($module, /, a, b, c, d)\n"
1278 "--\n"
1279 "\n"
1280 "Note: Passing more than 2 positional arguments to\n"
1281 "depr_star_pos2_len2() is deprecated. Parameters \'c\' and \'d\' will\n"
1282 "become keyword-only parameters in Python 3.14.\n"
1283 "");
1284
1285 #define DEPR_STAR_POS2_LEN2_METHODDEF \
1286 {"depr_star_pos2_len2", _PyCFunction_CAST(depr_star_pos2_len2), METH_FASTCALL|METH_KEYWORDS, depr_star_pos2_len2__doc__},
1287
1288 static PyObject *
1289 depr_star_pos2_len2_impl(PyObject *module, PyObject *a, PyObject *b,
1290 PyObject *c, PyObject *d);
1291
1292 // Emit compiler warnings when we get to Python 3.14.
1293 #if PY_VERSION_HEX >= 0x030e00C0
1294 # error "Update the clinic input of 'depr_star_pos2_len2'."
1295 #elif PY_VERSION_HEX >= 0x030e00A0
1296 # ifdef _MSC_VER
1297 # pragma message ("Update the clinic input of 'depr_star_pos2_len2'.")
1298 # else
1299 # warning "Update the clinic input of 'depr_star_pos2_len2'."
1300 # endif
1301 #endif
1302
1303 static PyObject *
1304 depr_star_pos2_len2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1305 {
1306 PyObject *return_value = NULL;
1307 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1308
1309 #define NUM_KEYWORDS 4
1310 static struct {
1311 PyGC_Head _this_is_not_used;
1312 PyObject_VAR_HEAD
1313 Py_hash_t ob_hash;
1314 PyObject *ob_item[NUM_KEYWORDS];
1315 } _kwtuple = {
1316 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1317 .ob_hash = -1,
1318 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), },
1319 };
1320 #undef NUM_KEYWORDS
1321 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1322
1323 #else // !Py_BUILD_CORE
1324 # define KWTUPLE NULL
1325 #endif // !Py_BUILD_CORE
1326
1327 static const char * const _keywords[] = {"a", "b", "c", "d", NULL};
1328 static _PyArg_Parser _parser = {
1329 .keywords = _keywords,
1330 .fname = "depr_star_pos2_len2",
1331 .kwtuple = KWTUPLE,
1332 };
1333 #undef KWTUPLE
1334 PyObject *argsbuf[4];
1335 PyObject *a;
1336 PyObject *b;
1337 PyObject *c;
1338 PyObject *d;
1339
1340 if (nargs > 2 && nargs <= 4) {
1341 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1342 "Passing more than 2 positional arguments to "
1343 "depr_star_pos2_len2() is deprecated. Parameters 'c' and 'd' will"
1344 " become keyword-only parameters in Python 3.14.", 1))
1345 {
1346 goto exit;
1347 }
1348 }
1349 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1350 /*minpos*/ 4, /*maxpos*/ 4, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
1351 if (!args) {
1352 goto exit;
1353 }
1354 a = args[0];
1355 b = args[1];
1356 c = args[2];
1357 d = args[3];
1358 return_value = depr_star_pos2_len2_impl(module, a, b, c, d);
1359
1360 exit:
1361 return return_value;
1362 }
1363
1364 PyDoc_STRVAR(depr_star_pos2_len2_with_kwd__doc__,
1365 "depr_star_pos2_len2_with_kwd($module, /, a, b, c, d, *, e)\n"
1366 "--\n"
1367 "\n"
1368 "Note: Passing more than 2 positional arguments to\n"
1369 "depr_star_pos2_len2_with_kwd() is deprecated. Parameters \'c\' and \'d\'\n"
1370 "will become keyword-only parameters in Python 3.14.\n"
1371 "");
1372
1373 #define DEPR_STAR_POS2_LEN2_WITH_KWD_METHODDEF \
1374 {"depr_star_pos2_len2_with_kwd", _PyCFunction_CAST(depr_star_pos2_len2_with_kwd), METH_FASTCALL|METH_KEYWORDS, depr_star_pos2_len2_with_kwd__doc__},
1375
1376 static PyObject *
1377 depr_star_pos2_len2_with_kwd_impl(PyObject *module, PyObject *a, PyObject *b,
1378 PyObject *c, PyObject *d, PyObject *e);
1379
1380 // Emit compiler warnings when we get to Python 3.14.
1381 #if PY_VERSION_HEX >= 0x030e00C0
1382 # error "Update the clinic input of 'depr_star_pos2_len2_with_kwd'."
1383 #elif PY_VERSION_HEX >= 0x030e00A0
1384 # ifdef _MSC_VER
1385 # pragma message ("Update the clinic input of 'depr_star_pos2_len2_with_kwd'.")
1386 # else
1387 # warning "Update the clinic input of 'depr_star_pos2_len2_with_kwd'."
1388 # endif
1389 #endif
1390
1391 static PyObject *
1392 depr_star_pos2_len2_with_kwd(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1393 {
1394 PyObject *return_value = NULL;
1395 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1396
1397 #define NUM_KEYWORDS 5
1398 static struct {
1399 PyGC_Head _this_is_not_used;
1400 PyObject_VAR_HEAD
1401 Py_hash_t ob_hash;
1402 PyObject *ob_item[NUM_KEYWORDS];
1403 } _kwtuple = {
1404 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1405 .ob_hash = -1,
1406 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), _Py_LATIN1_CHR('e'), },
1407 };
1408 #undef NUM_KEYWORDS
1409 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1410
1411 #else // !Py_BUILD_CORE
1412 # define KWTUPLE NULL
1413 #endif // !Py_BUILD_CORE
1414
1415 static const char * const _keywords[] = {"a", "b", "c", "d", "e", NULL};
1416 static _PyArg_Parser _parser = {
1417 .keywords = _keywords,
1418 .fname = "depr_star_pos2_len2_with_kwd",
1419 .kwtuple = KWTUPLE,
1420 };
1421 #undef KWTUPLE
1422 PyObject *argsbuf[5];
1423 PyObject *a;
1424 PyObject *b;
1425 PyObject *c;
1426 PyObject *d;
1427 PyObject *e;
1428
1429 if (nargs > 2 && nargs <= 4) {
1430 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1431 "Passing more than 2 positional arguments to "
1432 "depr_star_pos2_len2_with_kwd() is deprecated. Parameters 'c' and"
1433 " 'd' will become keyword-only parameters in Python 3.14.", 1))
1434 {
1435 goto exit;
1436 }
1437 }
1438 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1439 /*minpos*/ 4, /*maxpos*/ 4, /*minkw*/ 1, /*varpos*/ 0, argsbuf);
1440 if (!args) {
1441 goto exit;
1442 }
1443 a = args[0];
1444 b = args[1];
1445 c = args[2];
1446 d = args[3];
1447 e = args[4];
1448 return_value = depr_star_pos2_len2_with_kwd_impl(module, a, b, c, d, e);
1449
1450 exit:
1451 return return_value;
1452 }
1453
1454 PyDoc_STRVAR(depr_star_noinline__doc__,
1455 "depr_star_noinline($module, /, a, b, c=None, *, d=\'\')\n"
1456 "--\n"
1457 "\n"
1458 "Note: Passing more than 1 positional argument to depr_star_noinline()\n"
1459 "is deprecated. Parameters \'b\' and \'c\' will become keyword-only\n"
1460 "parameters in Python 3.14.\n"
1461 "");
1462
1463 #define DEPR_STAR_NOINLINE_METHODDEF \
1464 {"depr_star_noinline", _PyCFunction_CAST(depr_star_noinline), METH_FASTCALL|METH_KEYWORDS, depr_star_noinline__doc__},
1465
1466 static PyObject *
1467 depr_star_noinline_impl(PyObject *module, PyObject *a, PyObject *b,
1468 PyObject *c, const char *d, Py_ssize_t d_length);
1469
1470 // Emit compiler warnings when we get to Python 3.14.
1471 #if PY_VERSION_HEX >= 0x030e00C0
1472 # error "Update the clinic input of 'depr_star_noinline'."
1473 #elif PY_VERSION_HEX >= 0x030e00A0
1474 # ifdef _MSC_VER
1475 # pragma message ("Update the clinic input of 'depr_star_noinline'.")
1476 # else
1477 # warning "Update the clinic input of 'depr_star_noinline'."
1478 # endif
1479 #endif
1480
1481 static PyObject *
1482 depr_star_noinline(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1483 {
1484 PyObject *return_value = NULL;
1485 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1486
1487 #define NUM_KEYWORDS 4
1488 static struct {
1489 PyGC_Head _this_is_not_used;
1490 PyObject_VAR_HEAD
1491 Py_hash_t ob_hash;
1492 PyObject *ob_item[NUM_KEYWORDS];
1493 } _kwtuple = {
1494 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1495 .ob_hash = -1,
1496 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), },
1497 };
1498 #undef NUM_KEYWORDS
1499 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1500
1501 #else // !Py_BUILD_CORE
1502 # define KWTUPLE NULL
1503 #endif // !Py_BUILD_CORE
1504
1505 static const char * const _keywords[] = {"a", "b", "c", "d", NULL};
1506 static _PyArg_Parser _parser = {
1507 .keywords = _keywords,
1508 .format = "OO|O$s#:depr_star_noinline",
1509 .kwtuple = KWTUPLE,
1510 };
1511 #undef KWTUPLE
1512 PyObject *a;
1513 PyObject *b;
1514 PyObject *c = Py_None;
1515 const char *d = "";
1516 Py_ssize_t d_length;
1517
1518 if (nargs > 1 && nargs <= 3) {
1519 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1520 "Passing more than 1 positional argument to depr_star_noinline() "
1521 "is deprecated. Parameters 'b' and 'c' will become keyword-only "
1522 "parameters in Python 3.14.", 1))
1523 {
1524 goto exit;
1525 }
1526 }
1527 if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
1528 &a, &b, &c, &d, &d_length)) {
1529 goto exit;
1530 }
1531 return_value = depr_star_noinline_impl(module, a, b, c, d, d_length);
1532
1533 exit:
1534 return return_value;
1535 }
1536
1537 PyDoc_STRVAR(depr_star_multi__doc__,
1538 "depr_star_multi($module, /, a, b, c, d, e, f, g, *, h)\n"
1539 "--\n"
1540 "\n"
1541 "Note: Passing more than 1 positional argument to depr_star_multi() is\n"
1542 "deprecated. Parameter \'b\' will become a keyword-only parameter in\n"
1543 "Python 3.16. Parameters \'c\' and \'d\' will become keyword-only\n"
1544 "parameters in Python 3.15. Parameters \'e\', \'f\' and \'g\' will become\n"
1545 "keyword-only parameters in Python 3.14.\n"
1546 "");
1547
1548 #define DEPR_STAR_MULTI_METHODDEF \
1549 {"depr_star_multi", _PyCFunction_CAST(depr_star_multi), METH_FASTCALL|METH_KEYWORDS, depr_star_multi__doc__},
1550
1551 static PyObject *
1552 depr_star_multi_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c,
1553 PyObject *d, PyObject *e, PyObject *f, PyObject *g,
1554 PyObject *h);
1555
1556 // Emit compiler warnings when we get to Python 3.14.
1557 #if PY_VERSION_HEX >= 0x030e00C0
1558 # error "Update the clinic input of 'depr_star_multi'."
1559 #elif PY_VERSION_HEX >= 0x030e00A0
1560 # ifdef _MSC_VER
1561 # pragma message ("Update the clinic input of 'depr_star_multi'.")
1562 # else
1563 # warning "Update the clinic input of 'depr_star_multi'."
1564 # endif
1565 #endif
1566
1567 static PyObject *
1568 depr_star_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1569 {
1570 PyObject *return_value = NULL;
1571 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1572
1573 #define NUM_KEYWORDS 8
1574 static struct {
1575 PyGC_Head _this_is_not_used;
1576 PyObject_VAR_HEAD
1577 Py_hash_t ob_hash;
1578 PyObject *ob_item[NUM_KEYWORDS];
1579 } _kwtuple = {
1580 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1581 .ob_hash = -1,
1582 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), _Py_LATIN1_CHR('e'), _Py_LATIN1_CHR('f'), _Py_LATIN1_CHR('g'), _Py_LATIN1_CHR('h'), },
1583 };
1584 #undef NUM_KEYWORDS
1585 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1586
1587 #else // !Py_BUILD_CORE
1588 # define KWTUPLE NULL
1589 #endif // !Py_BUILD_CORE
1590
1591 static const char * const _keywords[] = {"a", "b", "c", "d", "e", "f", "g", "h", NULL};
1592 static _PyArg_Parser _parser = {
1593 .keywords = _keywords,
1594 .fname = "depr_star_multi",
1595 .kwtuple = KWTUPLE,
1596 };
1597 #undef KWTUPLE
1598 PyObject *argsbuf[8];
1599 PyObject *a;
1600 PyObject *b;
1601 PyObject *c;
1602 PyObject *d;
1603 PyObject *e;
1604 PyObject *f;
1605 PyObject *g;
1606 PyObject *h;
1607
1608 if (nargs > 1 && nargs <= 7) {
1609 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1610 "Passing more than 1 positional argument to depr_star_multi() is "
1611 "deprecated. Parameter 'b' will become a keyword-only parameter "
1612 "in Python 3.16. Parameters 'c' and 'd' will become keyword-only "
1613 "parameters in Python 3.15. Parameters 'e', 'f' and 'g' will "
1614 "become keyword-only parameters in Python 3.14.", 1))
1615 {
1616 goto exit;
1617 }
1618 }
1619 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1620 /*minpos*/ 7, /*maxpos*/ 7, /*minkw*/ 1, /*varpos*/ 0, argsbuf);
1621 if (!args) {
1622 goto exit;
1623 }
1624 a = args[0];
1625 b = args[1];
1626 c = args[2];
1627 d = args[3];
1628 e = args[4];
1629 f = args[5];
1630 g = args[6];
1631 h = args[7];
1632 return_value = depr_star_multi_impl(module, a, b, c, d, e, f, g, h);
1633
1634 exit:
1635 return return_value;
1636 }
1637
1638 PyDoc_STRVAR(depr_kwd_required_1__doc__,
1639 "depr_kwd_required_1($module, a, /, b)\n"
1640 "--\n"
1641 "\n"
1642 "Note: Passing keyword argument \'b\' to depr_kwd_required_1() is\n"
1643 "deprecated. Parameter \'b\' will become positional-only in Python 3.14.\n"
1644 "");
1645
1646 #define DEPR_KWD_REQUIRED_1_METHODDEF \
1647 {"depr_kwd_required_1", _PyCFunction_CAST(depr_kwd_required_1), METH_FASTCALL|METH_KEYWORDS, depr_kwd_required_1__doc__},
1648
1649 static PyObject *
1650 depr_kwd_required_1_impl(PyObject *module, PyObject *a, PyObject *b);
1651
1652 // Emit compiler warnings when we get to Python 3.14.
1653 #if PY_VERSION_HEX >= 0x030e00C0
1654 # error "Update the clinic input of 'depr_kwd_required_1'."
1655 #elif PY_VERSION_HEX >= 0x030e00A0
1656 # ifdef _MSC_VER
1657 # pragma message ("Update the clinic input of 'depr_kwd_required_1'.")
1658 # else
1659 # warning "Update the clinic input of 'depr_kwd_required_1'."
1660 # endif
1661 #endif
1662
1663 static PyObject *
1664 depr_kwd_required_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1665 {
1666 PyObject *return_value = NULL;
1667 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1668
1669 #define NUM_KEYWORDS 1
1670 static struct {
1671 PyGC_Head _this_is_not_used;
1672 PyObject_VAR_HEAD
1673 Py_hash_t ob_hash;
1674 PyObject *ob_item[NUM_KEYWORDS];
1675 } _kwtuple = {
1676 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1677 .ob_hash = -1,
1678 .ob_item = { _Py_LATIN1_CHR('b'), },
1679 };
1680 #undef NUM_KEYWORDS
1681 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1682
1683 #else // !Py_BUILD_CORE
1684 # define KWTUPLE NULL
1685 #endif // !Py_BUILD_CORE
1686
1687 static const char * const _keywords[] = {"", "b", NULL};
1688 static _PyArg_Parser _parser = {
1689 .keywords = _keywords,
1690 .fname = "depr_kwd_required_1",
1691 .kwtuple = KWTUPLE,
1692 };
1693 #undef KWTUPLE
1694 PyObject *argsbuf[2];
1695 PyObject *a;
1696 PyObject *b;
1697
1698 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1699 /*minpos*/ 2, /*maxpos*/ 2, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
1700 if (!args) {
1701 goto exit;
1702 }
1703 if (nargs < 2) {
1704 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1705 "Passing keyword argument 'b' to depr_kwd_required_1() is "
1706 "deprecated. Parameter 'b' will become positional-only in Python "
1707 "3.14.", 1))
1708 {
1709 goto exit;
1710 }
1711 }
1712 a = args[0];
1713 b = args[1];
1714 return_value = depr_kwd_required_1_impl(module, a, b);
1715
1716 exit:
1717 return return_value;
1718 }
1719
1720 PyDoc_STRVAR(depr_kwd_required_2__doc__,
1721 "depr_kwd_required_2($module, a, /, b, c)\n"
1722 "--\n"
1723 "\n"
1724 "Note: Passing keyword arguments \'b\' and \'c\' to depr_kwd_required_2()\n"
1725 "is deprecated. Parameters \'b\' and \'c\' will become positional-only in\n"
1726 "Python 3.14.\n"
1727 "");
1728
1729 #define DEPR_KWD_REQUIRED_2_METHODDEF \
1730 {"depr_kwd_required_2", _PyCFunction_CAST(depr_kwd_required_2), METH_FASTCALL|METH_KEYWORDS, depr_kwd_required_2__doc__},
1731
1732 static PyObject *
1733 depr_kwd_required_2_impl(PyObject *module, PyObject *a, PyObject *b,
1734 PyObject *c);
1735
1736 // Emit compiler warnings when we get to Python 3.14.
1737 #if PY_VERSION_HEX >= 0x030e00C0
1738 # error "Update the clinic input of 'depr_kwd_required_2'."
1739 #elif PY_VERSION_HEX >= 0x030e00A0
1740 # ifdef _MSC_VER
1741 # pragma message ("Update the clinic input of 'depr_kwd_required_2'.")
1742 # else
1743 # warning "Update the clinic input of 'depr_kwd_required_2'."
1744 # endif
1745 #endif
1746
1747 static PyObject *
1748 depr_kwd_required_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1749 {
1750 PyObject *return_value = NULL;
1751 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1752
1753 #define NUM_KEYWORDS 2
1754 static struct {
1755 PyGC_Head _this_is_not_used;
1756 PyObject_VAR_HEAD
1757 Py_hash_t ob_hash;
1758 PyObject *ob_item[NUM_KEYWORDS];
1759 } _kwtuple = {
1760 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1761 .ob_hash = -1,
1762 .ob_item = { _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), },
1763 };
1764 #undef NUM_KEYWORDS
1765 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1766
1767 #else // !Py_BUILD_CORE
1768 # define KWTUPLE NULL
1769 #endif // !Py_BUILD_CORE
1770
1771 static const char * const _keywords[] = {"", "b", "c", NULL};
1772 static _PyArg_Parser _parser = {
1773 .keywords = _keywords,
1774 .fname = "depr_kwd_required_2",
1775 .kwtuple = KWTUPLE,
1776 };
1777 #undef KWTUPLE
1778 PyObject *argsbuf[3];
1779 PyObject *a;
1780 PyObject *b;
1781 PyObject *c;
1782
1783 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1784 /*minpos*/ 3, /*maxpos*/ 3, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
1785 if (!args) {
1786 goto exit;
1787 }
1788 if (nargs < 3) {
1789 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1790 "Passing keyword arguments 'b' and 'c' to depr_kwd_required_2() "
1791 "is deprecated. Parameters 'b' and 'c' will become "
1792 "positional-only in Python 3.14.", 1))
1793 {
1794 goto exit;
1795 }
1796 }
1797 a = args[0];
1798 b = args[1];
1799 c = args[2];
1800 return_value = depr_kwd_required_2_impl(module, a, b, c);
1801
1802 exit:
1803 return return_value;
1804 }
1805
1806 PyDoc_STRVAR(depr_kwd_optional_1__doc__,
1807 "depr_kwd_optional_1($module, a, /, b=None)\n"
1808 "--\n"
1809 "\n"
1810 "Note: Passing keyword argument \'b\' to depr_kwd_optional_1() is\n"
1811 "deprecated. Parameter \'b\' will become positional-only in Python 3.14.\n"
1812 "");
1813
1814 #define DEPR_KWD_OPTIONAL_1_METHODDEF \
1815 {"depr_kwd_optional_1", _PyCFunction_CAST(depr_kwd_optional_1), METH_FASTCALL|METH_KEYWORDS, depr_kwd_optional_1__doc__},
1816
1817 static PyObject *
1818 depr_kwd_optional_1_impl(PyObject *module, PyObject *a, PyObject *b);
1819
1820 // Emit compiler warnings when we get to Python 3.14.
1821 #if PY_VERSION_HEX >= 0x030e00C0
1822 # error "Update the clinic input of 'depr_kwd_optional_1'."
1823 #elif PY_VERSION_HEX >= 0x030e00A0
1824 # ifdef _MSC_VER
1825 # pragma message ("Update the clinic input of 'depr_kwd_optional_1'.")
1826 # else
1827 # warning "Update the clinic input of 'depr_kwd_optional_1'."
1828 # endif
1829 #endif
1830
1831 static PyObject *
1832 depr_kwd_optional_1(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1833 {
1834 PyObject *return_value = NULL;
1835 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1836
1837 #define NUM_KEYWORDS 1
1838 static struct {
1839 PyGC_Head _this_is_not_used;
1840 PyObject_VAR_HEAD
1841 Py_hash_t ob_hash;
1842 PyObject *ob_item[NUM_KEYWORDS];
1843 } _kwtuple = {
1844 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1845 .ob_hash = -1,
1846 .ob_item = { _Py_LATIN1_CHR('b'), },
1847 };
1848 #undef NUM_KEYWORDS
1849 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1850
1851 #else // !Py_BUILD_CORE
1852 # define KWTUPLE NULL
1853 #endif // !Py_BUILD_CORE
1854
1855 static const char * const _keywords[] = {"", "b", NULL};
1856 static _PyArg_Parser _parser = {
1857 .keywords = _keywords,
1858 .fname = "depr_kwd_optional_1",
1859 .kwtuple = KWTUPLE,
1860 };
1861 #undef KWTUPLE
1862 PyObject *argsbuf[2];
1863 Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
1864 PyObject *a;
1865 PyObject *b = Py_None;
1866
1867 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1868 /*minpos*/ 1, /*maxpos*/ 2, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
1869 if (!args) {
1870 goto exit;
1871 }
1872 if (kwnames && PyTuple_GET_SIZE(kwnames) && nargs < 2 && args[1]) {
1873 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1874 "Passing keyword argument 'b' to depr_kwd_optional_1() is "
1875 "deprecated. Parameter 'b' will become positional-only in Python "
1876 "3.14.", 1))
1877 {
1878 goto exit;
1879 }
1880 }
1881 a = args[0];
1882 if (!noptargs) {
1883 goto skip_optional_pos;
1884 }
1885 b = args[1];
1886 skip_optional_pos:
1887 return_value = depr_kwd_optional_1_impl(module, a, b);
1888
1889 exit:
1890 return return_value;
1891 }
1892
1893 PyDoc_STRVAR(depr_kwd_optional_2__doc__,
1894 "depr_kwd_optional_2($module, a, /, b=None, c=None)\n"
1895 "--\n"
1896 "\n"
1897 "Note: Passing keyword arguments \'b\' and \'c\' to depr_kwd_optional_2()\n"
1898 "is deprecated. Parameters \'b\' and \'c\' will become positional-only in\n"
1899 "Python 3.14.\n"
1900 "");
1901
1902 #define DEPR_KWD_OPTIONAL_2_METHODDEF \
1903 {"depr_kwd_optional_2", _PyCFunction_CAST(depr_kwd_optional_2), METH_FASTCALL|METH_KEYWORDS, depr_kwd_optional_2__doc__},
1904
1905 static PyObject *
1906 depr_kwd_optional_2_impl(PyObject *module, PyObject *a, PyObject *b,
1907 PyObject *c);
1908
1909 // Emit compiler warnings when we get to Python 3.14.
1910 #if PY_VERSION_HEX >= 0x030e00C0
1911 # error "Update the clinic input of 'depr_kwd_optional_2'."
1912 #elif PY_VERSION_HEX >= 0x030e00A0
1913 # ifdef _MSC_VER
1914 # pragma message ("Update the clinic input of 'depr_kwd_optional_2'.")
1915 # else
1916 # warning "Update the clinic input of 'depr_kwd_optional_2'."
1917 # endif
1918 #endif
1919
1920 static PyObject *
1921 depr_kwd_optional_2(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
1922 {
1923 PyObject *return_value = NULL;
1924 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
1925
1926 #define NUM_KEYWORDS 2
1927 static struct {
1928 PyGC_Head _this_is_not_used;
1929 PyObject_VAR_HEAD
1930 Py_hash_t ob_hash;
1931 PyObject *ob_item[NUM_KEYWORDS];
1932 } _kwtuple = {
1933 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
1934 .ob_hash = -1,
1935 .ob_item = { _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), },
1936 };
1937 #undef NUM_KEYWORDS
1938 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
1939
1940 #else // !Py_BUILD_CORE
1941 # define KWTUPLE NULL
1942 #endif // !Py_BUILD_CORE
1943
1944 static const char * const _keywords[] = {"", "b", "c", NULL};
1945 static _PyArg_Parser _parser = {
1946 .keywords = _keywords,
1947 .fname = "depr_kwd_optional_2",
1948 .kwtuple = KWTUPLE,
1949 };
1950 #undef KWTUPLE
1951 PyObject *argsbuf[3];
1952 Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 1;
1953 PyObject *a;
1954 PyObject *b = Py_None;
1955 PyObject *c = Py_None;
1956
1957 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
1958 /*minpos*/ 1, /*maxpos*/ 3, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
1959 if (!args) {
1960 goto exit;
1961 }
1962 if (kwnames && PyTuple_GET_SIZE(kwnames) && ((nargs < 2 && args[1]) || (nargs < 3 && args[2]))) {
1963 if (PyErr_WarnEx(PyExc_DeprecationWarning,
1964 "Passing keyword arguments 'b' and 'c' to depr_kwd_optional_2() "
1965 "is deprecated. Parameters 'b' and 'c' will become "
1966 "positional-only in Python 3.14.", 1))
1967 {
1968 goto exit;
1969 }
1970 }
1971 a = args[0];
1972 if (!noptargs) {
1973 goto skip_optional_pos;
1974 }
1975 if (args[1]) {
1976 b = args[1];
1977 if (!--noptargs) {
1978 goto skip_optional_pos;
1979 }
1980 }
1981 c = args[2];
1982 skip_optional_pos:
1983 return_value = depr_kwd_optional_2_impl(module, a, b, c);
1984
1985 exit:
1986 return return_value;
1987 }
1988
1989 PyDoc_STRVAR(depr_kwd_optional_3__doc__,
1990 "depr_kwd_optional_3($module, /, a=None, b=None, c=None)\n"
1991 "--\n"
1992 "\n"
1993 "Note: Passing keyword arguments \'a\', \'b\' and \'c\' to\n"
1994 "depr_kwd_optional_3() is deprecated. Parameters \'a\', \'b\' and \'c\' will\n"
1995 "become positional-only in Python 3.14.\n"
1996 "");
1997
1998 #define DEPR_KWD_OPTIONAL_3_METHODDEF \
1999 {"depr_kwd_optional_3", _PyCFunction_CAST(depr_kwd_optional_3), METH_FASTCALL|METH_KEYWORDS, depr_kwd_optional_3__doc__},
2000
2001 static PyObject *
2002 depr_kwd_optional_3_impl(PyObject *module, PyObject *a, PyObject *b,
2003 PyObject *c);
2004
2005 // Emit compiler warnings when we get to Python 3.14.
2006 #if PY_VERSION_HEX >= 0x030e00C0
2007 # error "Update the clinic input of 'depr_kwd_optional_3'."
2008 #elif PY_VERSION_HEX >= 0x030e00A0
2009 # ifdef _MSC_VER
2010 # pragma message ("Update the clinic input of 'depr_kwd_optional_3'.")
2011 # else
2012 # warning "Update the clinic input of 'depr_kwd_optional_3'."
2013 # endif
2014 #endif
2015
2016 static PyObject *
2017 depr_kwd_optional_3(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2018 {
2019 PyObject *return_value = NULL;
2020 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
2021
2022 #define NUM_KEYWORDS 3
2023 static struct {
2024 PyGC_Head _this_is_not_used;
2025 PyObject_VAR_HEAD
2026 Py_hash_t ob_hash;
2027 PyObject *ob_item[NUM_KEYWORDS];
2028 } _kwtuple = {
2029 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
2030 .ob_hash = -1,
2031 .ob_item = { _Py_LATIN1_CHR('a'), _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), },
2032 };
2033 #undef NUM_KEYWORDS
2034 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
2035
2036 #else // !Py_BUILD_CORE
2037 # define KWTUPLE NULL
2038 #endif // !Py_BUILD_CORE
2039
2040 static const char * const _keywords[] = {"a", "b", "c", NULL};
2041 static _PyArg_Parser _parser = {
2042 .keywords = _keywords,
2043 .fname = "depr_kwd_optional_3",
2044 .kwtuple = KWTUPLE,
2045 };
2046 #undef KWTUPLE
2047 PyObject *argsbuf[3];
2048 Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 0;
2049 PyObject *a = Py_None;
2050 PyObject *b = Py_None;
2051 PyObject *c = Py_None;
2052
2053 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
2054 /*minpos*/ 0, /*maxpos*/ 3, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
2055 if (!args) {
2056 goto exit;
2057 }
2058 if (kwnames && PyTuple_GET_SIZE(kwnames) && ((nargs < 1 && args[0]) || (nargs < 2 && args[1]) || (nargs < 3 && args[2]))) {
2059 if (PyErr_WarnEx(PyExc_DeprecationWarning,
2060 "Passing keyword arguments 'a', 'b' and 'c' to "
2061 "depr_kwd_optional_3() is deprecated. Parameters 'a', 'b' and 'c'"
2062 " will become positional-only in Python 3.14.", 1))
2063 {
2064 goto exit;
2065 }
2066 }
2067 if (!noptargs) {
2068 goto skip_optional_pos;
2069 }
2070 if (args[0]) {
2071 a = args[0];
2072 if (!--noptargs) {
2073 goto skip_optional_pos;
2074 }
2075 }
2076 if (args[1]) {
2077 b = args[1];
2078 if (!--noptargs) {
2079 goto skip_optional_pos;
2080 }
2081 }
2082 c = args[2];
2083 skip_optional_pos:
2084 return_value = depr_kwd_optional_3_impl(module, a, b, c);
2085
2086 exit:
2087 return return_value;
2088 }
2089
2090 PyDoc_STRVAR(depr_kwd_required_optional__doc__,
2091 "depr_kwd_required_optional($module, a, /, b, c=None)\n"
2092 "--\n"
2093 "\n"
2094 "Note: Passing keyword arguments \'b\' and \'c\' to\n"
2095 "depr_kwd_required_optional() is deprecated. Parameters \'b\' and \'c\'\n"
2096 "will become positional-only in Python 3.14.\n"
2097 "");
2098
2099 #define DEPR_KWD_REQUIRED_OPTIONAL_METHODDEF \
2100 {"depr_kwd_required_optional", _PyCFunction_CAST(depr_kwd_required_optional), METH_FASTCALL|METH_KEYWORDS, depr_kwd_required_optional__doc__},
2101
2102 static PyObject *
2103 depr_kwd_required_optional_impl(PyObject *module, PyObject *a, PyObject *b,
2104 PyObject *c);
2105
2106 // Emit compiler warnings when we get to Python 3.14.
2107 #if PY_VERSION_HEX >= 0x030e00C0
2108 # error "Update the clinic input of 'depr_kwd_required_optional'."
2109 #elif PY_VERSION_HEX >= 0x030e00A0
2110 # ifdef _MSC_VER
2111 # pragma message ("Update the clinic input of 'depr_kwd_required_optional'.")
2112 # else
2113 # warning "Update the clinic input of 'depr_kwd_required_optional'."
2114 # endif
2115 #endif
2116
2117 static PyObject *
2118 depr_kwd_required_optional(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2119 {
2120 PyObject *return_value = NULL;
2121 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
2122
2123 #define NUM_KEYWORDS 2
2124 static struct {
2125 PyGC_Head _this_is_not_used;
2126 PyObject_VAR_HEAD
2127 Py_hash_t ob_hash;
2128 PyObject *ob_item[NUM_KEYWORDS];
2129 } _kwtuple = {
2130 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
2131 .ob_hash = -1,
2132 .ob_item = { _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), },
2133 };
2134 #undef NUM_KEYWORDS
2135 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
2136
2137 #else // !Py_BUILD_CORE
2138 # define KWTUPLE NULL
2139 #endif // !Py_BUILD_CORE
2140
2141 static const char * const _keywords[] = {"", "b", "c", NULL};
2142 static _PyArg_Parser _parser = {
2143 .keywords = _keywords,
2144 .fname = "depr_kwd_required_optional",
2145 .kwtuple = KWTUPLE,
2146 };
2147 #undef KWTUPLE
2148 PyObject *argsbuf[3];
2149 Py_ssize_t noptargs = nargs + (kwnames ? PyTuple_GET_SIZE(kwnames) : 0) - 2;
2150 PyObject *a;
2151 PyObject *b;
2152 PyObject *c = Py_None;
2153
2154 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
2155 /*minpos*/ 2, /*maxpos*/ 3, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
2156 if (!args) {
2157 goto exit;
2158 }
2159 if (kwnames && PyTuple_GET_SIZE(kwnames) && ((nargs < 2) || (nargs < 3 && args[2]))) {
2160 if (PyErr_WarnEx(PyExc_DeprecationWarning,
2161 "Passing keyword arguments 'b' and 'c' to "
2162 "depr_kwd_required_optional() is deprecated. Parameters 'b' and "
2163 "'c' will become positional-only in Python 3.14.", 1))
2164 {
2165 goto exit;
2166 }
2167 }
2168 a = args[0];
2169 b = args[1];
2170 if (!noptargs) {
2171 goto skip_optional_pos;
2172 }
2173 c = args[2];
2174 skip_optional_pos:
2175 return_value = depr_kwd_required_optional_impl(module, a, b, c);
2176
2177 exit:
2178 return return_value;
2179 }
2180
2181 PyDoc_STRVAR(depr_kwd_noinline__doc__,
2182 "depr_kwd_noinline($module, a, /, b, c=None, d=\'\')\n"
2183 "--\n"
2184 "\n"
2185 "Note: Passing keyword arguments \'b\' and \'c\' to depr_kwd_noinline() is\n"
2186 "deprecated. Parameters \'b\' and \'c\' will become positional-only in\n"
2187 "Python 3.14.\n"
2188 "");
2189
2190 #define DEPR_KWD_NOINLINE_METHODDEF \
2191 {"depr_kwd_noinline", _PyCFunction_CAST(depr_kwd_noinline), METH_FASTCALL|METH_KEYWORDS, depr_kwd_noinline__doc__},
2192
2193 static PyObject *
2194 depr_kwd_noinline_impl(PyObject *module, PyObject *a, PyObject *b,
2195 PyObject *c, const char *d, Py_ssize_t d_length);
2196
2197 // Emit compiler warnings when we get to Python 3.14.
2198 #if PY_VERSION_HEX >= 0x030e00C0
2199 # error "Update the clinic input of 'depr_kwd_noinline'."
2200 #elif PY_VERSION_HEX >= 0x030e00A0
2201 # ifdef _MSC_VER
2202 # pragma message ("Update the clinic input of 'depr_kwd_noinline'.")
2203 # else
2204 # warning "Update the clinic input of 'depr_kwd_noinline'."
2205 # endif
2206 #endif
2207
2208 static PyObject *
2209 depr_kwd_noinline(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2210 {
2211 PyObject *return_value = NULL;
2212 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
2213
2214 #define NUM_KEYWORDS 3
2215 static struct {
2216 PyGC_Head _this_is_not_used;
2217 PyObject_VAR_HEAD
2218 Py_hash_t ob_hash;
2219 PyObject *ob_item[NUM_KEYWORDS];
2220 } _kwtuple = {
2221 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
2222 .ob_hash = -1,
2223 .ob_item = { _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), },
2224 };
2225 #undef NUM_KEYWORDS
2226 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
2227
2228 #else // !Py_BUILD_CORE
2229 # define KWTUPLE NULL
2230 #endif // !Py_BUILD_CORE
2231
2232 static const char * const _keywords[] = {"", "b", "c", "d", NULL};
2233 static _PyArg_Parser _parser = {
2234 .keywords = _keywords,
2235 .format = "OO|Os#:depr_kwd_noinline",
2236 .kwtuple = KWTUPLE,
2237 };
2238 #undef KWTUPLE
2239 PyObject *a;
2240 PyObject *b;
2241 PyObject *c = Py_None;
2242 const char *d = "";
2243 Py_ssize_t d_length;
2244
2245 if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
2246 &a, &b, &c, &d, &d_length)) {
2247 goto exit;
2248 }
2249 if (kwnames && PyTuple_GET_SIZE(kwnames) && ((nargs < 2) || (nargs < 3 && PySequence_Contains(kwnames, _Py_LATIN1_CHR('c'))))) {
2250 if (PyErr_Occurred()) { // PySequence_Contains() above can fail
2251 goto exit;
2252 }
2253 if (PyErr_WarnEx(PyExc_DeprecationWarning,
2254 "Passing keyword arguments 'b' and 'c' to depr_kwd_noinline() is "
2255 "deprecated. Parameters 'b' and 'c' will become positional-only "
2256 "in Python 3.14.", 1))
2257 {
2258 goto exit;
2259 }
2260 }
2261 return_value = depr_kwd_noinline_impl(module, a, b, c, d, d_length);
2262
2263 exit:
2264 return return_value;
2265 }
2266
2267 PyDoc_STRVAR(depr_kwd_multi__doc__,
2268 "depr_kwd_multi($module, a, /, b, c, d, e, f, g, h)\n"
2269 "--\n"
2270 "\n"
2271 "Note: Passing keyword arguments \'b\', \'c\', \'d\', \'e\', \'f\' and \'g\' to\n"
2272 "depr_kwd_multi() is deprecated. Parameter \'b\' will become positional-\n"
2273 "only in Python 3.14. Parameters \'c\' and \'d\' will become positional-\n"
2274 "only in Python 3.15. Parameters \'e\', \'f\' and \'g\' will become\n"
2275 "positional-only in Python 3.16.\n"
2276 "");
2277
2278 #define DEPR_KWD_MULTI_METHODDEF \
2279 {"depr_kwd_multi", _PyCFunction_CAST(depr_kwd_multi), METH_FASTCALL|METH_KEYWORDS, depr_kwd_multi__doc__},
2280
2281 static PyObject *
2282 depr_kwd_multi_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c,
2283 PyObject *d, PyObject *e, PyObject *f, PyObject *g,
2284 PyObject *h);
2285
2286 // Emit compiler warnings when we get to Python 3.14.
2287 #if PY_VERSION_HEX >= 0x030e00C0
2288 # error "Update the clinic input of 'depr_kwd_multi'."
2289 #elif PY_VERSION_HEX >= 0x030e00A0
2290 # ifdef _MSC_VER
2291 # pragma message ("Update the clinic input of 'depr_kwd_multi'.")
2292 # else
2293 # warning "Update the clinic input of 'depr_kwd_multi'."
2294 # endif
2295 #endif
2296
2297 static PyObject *
2298 depr_kwd_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2299 {
2300 PyObject *return_value = NULL;
2301 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
2302
2303 #define NUM_KEYWORDS 7
2304 static struct {
2305 PyGC_Head _this_is_not_used;
2306 PyObject_VAR_HEAD
2307 Py_hash_t ob_hash;
2308 PyObject *ob_item[NUM_KEYWORDS];
2309 } _kwtuple = {
2310 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
2311 .ob_hash = -1,
2312 .ob_item = { _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), _Py_LATIN1_CHR('e'), _Py_LATIN1_CHR('f'), _Py_LATIN1_CHR('g'), _Py_LATIN1_CHR('h'), },
2313 };
2314 #undef NUM_KEYWORDS
2315 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
2316
2317 #else // !Py_BUILD_CORE
2318 # define KWTUPLE NULL
2319 #endif // !Py_BUILD_CORE
2320
2321 static const char * const _keywords[] = {"", "b", "c", "d", "e", "f", "g", "h", NULL};
2322 static _PyArg_Parser _parser = {
2323 .keywords = _keywords,
2324 .fname = "depr_kwd_multi",
2325 .kwtuple = KWTUPLE,
2326 };
2327 #undef KWTUPLE
2328 PyObject *argsbuf[8];
2329 PyObject *a;
2330 PyObject *b;
2331 PyObject *c;
2332 PyObject *d;
2333 PyObject *e;
2334 PyObject *f;
2335 PyObject *g;
2336 PyObject *h;
2337
2338 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
2339 /*minpos*/ 8, /*maxpos*/ 8, /*minkw*/ 0, /*varpos*/ 0, argsbuf);
2340 if (!args) {
2341 goto exit;
2342 }
2343 if (nargs < 7) {
2344 if (PyErr_WarnEx(PyExc_DeprecationWarning,
2345 "Passing keyword arguments 'b', 'c', 'd', 'e', 'f' and 'g' to "
2346 "depr_kwd_multi() is deprecated. Parameter 'b' will become "
2347 "positional-only in Python 3.14. Parameters 'c' and 'd' will "
2348 "become positional-only in Python 3.15. Parameters 'e', 'f' and "
2349 "'g' will become positional-only in Python 3.16.", 1))
2350 {
2351 goto exit;
2352 }
2353 }
2354 a = args[0];
2355 b = args[1];
2356 c = args[2];
2357 d = args[3];
2358 e = args[4];
2359 f = args[5];
2360 g = args[6];
2361 h = args[7];
2362 return_value = depr_kwd_multi_impl(module, a, b, c, d, e, f, g, h);
2363
2364 exit:
2365 return return_value;
2366 }
2367
2368 PyDoc_STRVAR(depr_multi__doc__,
2369 "depr_multi($module, a, /, b, c, d, e, f, *, g)\n"
2370 "--\n"
2371 "\n"
2372 "Note: Passing keyword arguments \'b\' and \'c\' to depr_multi() is\n"
2373 "deprecated. Parameter \'b\' will become positional-only in Python 3.14.\n"
2374 "Parameter \'c\' will become positional-only in Python 3.15.\n"
2375 "\n"
2376 "\n"
2377 "Note: Passing more than 4 positional arguments to depr_multi() is\n"
2378 "deprecated. Parameter \'e\' will become a keyword-only parameter in\n"
2379 "Python 3.15. Parameter \'f\' will become a keyword-only parameter in\n"
2380 "Python 3.14.\n"
2381 "");
2382
2383 #define DEPR_MULTI_METHODDEF \
2384 {"depr_multi", _PyCFunction_CAST(depr_multi), METH_FASTCALL|METH_KEYWORDS, depr_multi__doc__},
2385
2386 static PyObject *
2387 depr_multi_impl(PyObject *module, PyObject *a, PyObject *b, PyObject *c,
2388 PyObject *d, PyObject *e, PyObject *f, PyObject *g);
2389
2390 // Emit compiler warnings when we get to Python 3.14.
2391 #if PY_VERSION_HEX >= 0x030e00C0
2392 # error "Update the clinic input of 'depr_multi'."
2393 #elif PY_VERSION_HEX >= 0x030e00A0
2394 # ifdef _MSC_VER
2395 # pragma message ("Update the clinic input of 'depr_multi'.")
2396 # else
2397 # warning "Update the clinic input of 'depr_multi'."
2398 # endif
2399 #endif
2400
2401 static PyObject *
2402 depr_multi(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
2403 {
2404 PyObject *return_value = NULL;
2405 #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
2406
2407 #define NUM_KEYWORDS 6
2408 static struct {
2409 PyGC_Head _this_is_not_used;
2410 PyObject_VAR_HEAD
2411 Py_hash_t ob_hash;
2412 PyObject *ob_item[NUM_KEYWORDS];
2413 } _kwtuple = {
2414 .ob_base = PyVarObject_HEAD_INIT(&PyTuple_Type, NUM_KEYWORDS)
2415 .ob_hash = -1,
2416 .ob_item = { _Py_LATIN1_CHR('b'), _Py_LATIN1_CHR('c'), _Py_LATIN1_CHR('d'), _Py_LATIN1_CHR('e'), _Py_LATIN1_CHR('f'), _Py_LATIN1_CHR('g'), },
2417 };
2418 #undef NUM_KEYWORDS
2419 #define KWTUPLE (&_kwtuple.ob_base.ob_base)
2420
2421 #else // !Py_BUILD_CORE
2422 # define KWTUPLE NULL
2423 #endif // !Py_BUILD_CORE
2424
2425 static const char * const _keywords[] = {"", "b", "c", "d", "e", "f", "g", NULL};
2426 static _PyArg_Parser _parser = {
2427 .keywords = _keywords,
2428 .fname = "depr_multi",
2429 .kwtuple = KWTUPLE,
2430 };
2431 #undef KWTUPLE
2432 PyObject *argsbuf[7];
2433 PyObject *a;
2434 PyObject *b;
2435 PyObject *c;
2436 PyObject *d;
2437 PyObject *e;
2438 PyObject *f;
2439 PyObject *g;
2440
2441 if (nargs > 4 && nargs <= 6) {
2442 if (PyErr_WarnEx(PyExc_DeprecationWarning,
2443 "Passing more than 4 positional arguments to depr_multi() is "
2444 "deprecated. Parameter 'e' will become a keyword-only parameter "
2445 "in Python 3.15. Parameter 'f' will become a keyword-only "
2446 "parameter in Python 3.14.", 1))
2447 {
2448 goto exit;
2449 }
2450 }
2451 args = _PyArg_UnpackKeywords(args, nargs, NULL, kwnames, &_parser,
2452 /*minpos*/ 6, /*maxpos*/ 6, /*minkw*/ 1, /*varpos*/ 0, argsbuf);
2453 if (!args) {
2454 goto exit;
2455 }
2456 if (nargs < 3) {
2457 if (PyErr_WarnEx(PyExc_DeprecationWarning,
2458 "Passing keyword arguments 'b' and 'c' to depr_multi() is "
2459 "deprecated. Parameter 'b' will become positional-only in Python "
2460 "3.14. Parameter 'c' will become positional-only in Python 3.15.", 1))
2461 {
2462 goto exit;
2463 }
2464 }
2465 a = args[0];
2466 b = args[1];
2467 c = args[2];
2468 d = args[3];
2469 e = args[4];
2470 f = args[5];
2471 g = args[6];
2472 return_value = depr_multi_impl(module, a, b, c, d, e, f, g);
2473
2474 exit:
2475 return return_value;
2476 }
2477 /*[clinic end generated code: output=4e60af44fd6b7b94 input=a9049054013a1b77]*/