summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-10-17 12:30:31 (GMT)
committerGitHub <noreply@github.com>2023-10-17 12:30:31 (GMT)
commitbe5e8a010341c4d2d28ef53a1baed402ee06466e (patch)
tree6372a45676c7d5b8d07c69b67e889bbaf8f307e1 /Objects
parent054f496bd45cf94eac4158fd60ac95ab5f8e45c4 (diff)
downloadcpython-be5e8a010341c4d2d28ef53a1baed402ee06466e.zip
cpython-be5e8a010341c4d2d28ef53a1baed402ee06466e.tar.gz
cpython-be5e8a010341c4d2d28ef53a1baed402ee06466e.tar.bz2
gh-110964: Remove private _PyArg functions (#110966)
Move the following private functions and structures to pycore_modsupport.h internal C API: * _PyArg_BadArgument() * _PyArg_CheckPositional() * _PyArg_NoKeywords() * _PyArg_NoPositional() * _PyArg_ParseStack() * _PyArg_ParseStackAndKeywords() * _PyArg_Parser structure * _PyArg_UnpackKeywords() * _PyArg_UnpackKeywordsWithVararg() * _PyArg_UnpackStack() * _Py_ANY_VARARGS() Changes: * Python/getargs.h now includes pycore_modsupport.h to export functions. * clinic.py now adds pycore_modsupport.h when one of these functions is used. * Add pycore_modsupport.h includes when a C extension uses one of these functions. * Define Py_BUILD_CORE_MODULE in C extensions which now include directly or indirectly (via code generated by Argument Clinic) pycore_modsupport.h: * _csv * _curses_panel * _dbm * _gdbm * _multiprocessing.posixshmem * _sqlite.row * _statistics * grp * resource * syslog * _testcapi: bad_get() no longer uses METH_FASTCALL calling convention but METH_VARARGS. Replace _PyArg_UnpackStack() with PyArg_ParseTuple(). * _testcapi: add PYTESTCAPI_NEED_INTERNAL_API macro which is defined by _testcapi sub-modules which need the internal C API (pycore_modsupport.h): exceptions.c, float.c, vectorcall.c, watchers.c. * Remove Include/cpython/modsupport.h header file. Include/modsupport.h no longer includes the removed header file. * Fix mypy clinic.py
Diffstat (limited to 'Objects')
-rw-r--r--Objects/cellobject.c1
-rw-r--r--Objects/clinic/bytearrayobject.c.h3
-rw-r--r--Objects/clinic/bytesobject.c.h3
-rw-r--r--Objects/clinic/classobject.c.h4
-rw-r--r--Objects/clinic/codeobject.c.h3
-rw-r--r--Objects/clinic/complexobject.c.h3
-rw-r--r--Objects/clinic/descrobject.c.h3
-rw-r--r--Objects/clinic/dictobject.c.h4
-rw-r--r--Objects/clinic/enumobject.c.h3
-rw-r--r--Objects/clinic/floatobject.c.h4
-rw-r--r--Objects/clinic/funcobject.c.h3
-rw-r--r--Objects/clinic/listobject.c.h3
-rw-r--r--Objects/clinic/longobject.c.h3
-rw-r--r--Objects/clinic/memoryobject.c.h3
-rw-r--r--Objects/clinic/moduleobject.c.h3
-rw-r--r--Objects/clinic/odictobject.c.h3
-rw-r--r--Objects/clinic/structseq.c.h3
-rw-r--r--Objects/clinic/tupleobject.c.h4
-rw-r--r--Objects/clinic/typeobject.c.h4
-rw-r--r--Objects/clinic/typevarobject.c.h3
-rw-r--r--Objects/clinic/unicodeobject.c.h3
-rw-r--r--Objects/descrobject.c1
-rw-r--r--Objects/exceptions.c3
-rw-r--r--Objects/funcobject.c1
-rw-r--r--Objects/genericaliasobject.c1
-rw-r--r--Objects/genobject.c1
-rw-r--r--Objects/namespaceobject.c2
-rw-r--r--Objects/sliceobject.c1
-rw-r--r--Objects/stringlib/clinic/transmogrify.h.h3
-rw-r--r--Objects/structseq.c6
30 files changed, 59 insertions, 26 deletions
diff --git a/Objects/cellobject.c b/Objects/cellobject.c
index f516707..f1a43be 100644
--- a/Objects/cellobject.c
+++ b/Objects/cellobject.c
@@ -1,6 +1,7 @@
/* Cell object implementation */
#include "Python.h"
+#include "pycore_modsupport.h" // _PyArg_NoKeywords()
#include "pycore_object.h"
PyObject *
diff --git a/Objects/clinic/bytearrayobject.c.h b/Objects/clinic/bytearrayobject.c.h
index 7039db0..02b9b57 100644
--- a/Objects/clinic/bytearrayobject.c.h
+++ b/Objects/clinic/bytearrayobject.c.h
@@ -7,6 +7,7 @@ preserve
# include "pycore_runtime.h" // _Py_ID()
#endif
#include "pycore_abstract.h" // _PyNumber_Index()
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
static int
bytearray___init___impl(PyByteArrayObject *self, PyObject *arg,
@@ -1284,4 +1285,4 @@ bytearray_sizeof(PyByteArrayObject *self, PyObject *Py_UNUSED(ignored))
{
return bytearray_sizeof_impl(self);
}
-/*[clinic end generated code: output=94b9b5f492b5fed6 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=fc2b9ccabe0e6782 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/bytesobject.c.h b/Objects/clinic/bytesobject.c.h
index e2f9ba6..8b08f8e 100644
--- a/Objects/clinic/bytesobject.c.h
+++ b/Objects/clinic/bytesobject.c.h
@@ -7,6 +7,7 @@ preserve
# include "pycore_runtime.h" // _Py_ID()
#endif
#include "pycore_abstract.h" // _PyNumber_Index()
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(bytes___bytes____doc__,
"__bytes__($self, /)\n"
@@ -1060,4 +1061,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=8a9f5c28cbfe7592 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=da013a7e257f5c6e input=a9049054013a1b77]*/
diff --git a/Objects/clinic/classobject.c.h b/Objects/clinic/classobject.c.h
index 48cfd6c..3e149c9 100644
--- a/Objects/clinic/classobject.c.h
+++ b/Objects/clinic/classobject.c.h
@@ -2,6 +2,8 @@
preserve
[clinic start generated code]*/
+#include "pycore_modsupport.h" // _PyArg_CheckPositional()
+
PyDoc_STRVAR(method___reduce____doc__,
"__reduce__($self, /)\n"
"--\n"
@@ -80,4 +82,4 @@ instancemethod_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=a0d17bad3b0734d9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5a5e3f2d0726f189 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/codeobject.c.h b/Objects/clinic/codeobject.c.h
index b20b066..68e2d7f 100644
--- a/Objects/clinic/codeobject.c.h
+++ b/Objects/clinic/codeobject.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_CheckPositional()
PyDoc_STRVAR(code_new__doc__,
"code(argcount, posonlyargcount, kwonlyargcount, nlocals, stacksize,\n"
@@ -463,4 +464,4 @@ code__varname_from_oparg(PyCodeObject *self, PyObject *const *args, Py_ssize_t n
exit:
return return_value;
}
-/*[clinic end generated code: output=b9ccfbfabe1a5f46 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d604263a3ca72a0f input=a9049054013a1b77]*/
diff --git a/Objects/clinic/complexobject.c.h b/Objects/clinic/complexobject.c.h
index 788f30d..49b5030 100644
--- a/Objects/clinic/complexobject.c.h
+++ b/Objects/clinic/complexobject.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_BadArgument()
PyDoc_STRVAR(complex_conjugate__doc__,
"conjugate($self, /)\n"
@@ -156,4 +157,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=002c74f8a33b6697 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=04e6261649967b30 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/descrobject.c.h b/Objects/clinic/descrobject.c.h
index 4f18fd7..02fb440 100644
--- a/Objects/clinic/descrobject.c.h
+++ b/Objects/clinic/descrobject.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
static PyObject *
mappingproxy_new_impl(PyTypeObject *type, PyObject *mapping);
@@ -166,4 +167,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=a97dc44d12f9f9b6 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a4664ccf3da10f5a input=a9049054013a1b77]*/
diff --git a/Objects/clinic/dictobject.c.h b/Objects/clinic/dictobject.c.h
index eda86c3..6415142 100644
--- a/Objects/clinic/dictobject.c.h
+++ b/Objects/clinic/dictobject.c.h
@@ -2,6 +2,8 @@
preserve
[clinic start generated code]*/
+#include "pycore_modsupport.h" // _PyArg_CheckPositional()
+
PyDoc_STRVAR(dict_fromkeys__doc__,
"fromkeys($type, iterable, value=None, /)\n"
"--\n"
@@ -191,4 +193,4 @@ dict___reversed__(PyDictObject *self, PyObject *Py_UNUSED(ignored))
{
return dict___reversed___impl(self);
}
-/*[clinic end generated code: output=582766ac0154c8bf input=a9049054013a1b77]*/
+/*[clinic end generated code: output=17c3c4cf9a9b95a7 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/enumobject.c.h b/Objects/clinic/enumobject.c.h
index 97f20c6..09774a7 100644
--- a/Objects/clinic/enumobject.c.h
+++ b/Objects/clinic/enumobject.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(enum_new__doc__,
"enumerate(iterable, start=0)\n"
@@ -106,4 +107,4 @@ reversed_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
exit:
return return_value;
}
-/*[clinic end generated code: output=661b29708f501d19 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5c48a9a482a52e91 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/floatobject.c.h b/Objects/clinic/floatobject.c.h
index c40eff8..10f6149 100644
--- a/Objects/clinic/floatobject.c.h
+++ b/Objects/clinic/floatobject.c.h
@@ -2,6 +2,8 @@
preserve
[clinic start generated code]*/
+#include "pycore_modsupport.h" // _PyArg_CheckPositional()
+
PyDoc_STRVAR(float_is_integer__doc__,
"is_integer($self, /)\n"
"--\n"
@@ -316,4 +318,4 @@ float___format__(PyObject *self, PyObject *arg)
exit:
return return_value;
}
-/*[clinic end generated code: output=eb093cc601cc5426 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=c79743c8551c30d9 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/funcobject.c.h b/Objects/clinic/funcobject.c.h
index 1be4567..138f877 100644
--- a/Objects/clinic/funcobject.c.h
+++ b/Objects/clinic/funcobject.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(func_new__doc__,
"function(code, globals, name=None, argdefs=None, closure=None)\n"
@@ -103,4 +104,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=b2d676ff51c992d0 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=ff7b995500d2bee6 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/listobject.c.h b/Objects/clinic/listobject.c.h
index b6f0c5c..b2178cd 100644
--- a/Objects/clinic/listobject.c.h
+++ b/Objects/clinic/listobject.c.h
@@ -7,6 +7,7 @@ preserve
# include "pycore_runtime.h" // _Py_ID()
#endif
#include "pycore_abstract.h" // _PyNumber_Index()
+#include "pycore_modsupport.h" // _PyArg_CheckPositional()
PyDoc_STRVAR(list_insert__doc__,
"insert($self, index, object, /)\n"
@@ -383,4 +384,4 @@ list___reversed__(PyListObject *self, PyObject *Py_UNUSED(ignored))
{
return list___reversed___impl(self);
}
-/*[clinic end generated code: output=e2d9f4092498a5ca input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5dea9dd3bb219a7f input=a9049054013a1b77]*/
diff --git a/Objects/clinic/longobject.c.h b/Objects/clinic/longobject.c.h
index 9288648..4a3d71c 100644
--- a/Objects/clinic/longobject.c.h
+++ b/Objects/clinic/longobject.c.h
@@ -7,6 +7,7 @@ preserve
# include "pycore_runtime.h" // _Py_ID()
#endif
#include "pycore_abstract.h" // _PyNumber_Index()
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
static PyObject *
long_new_impl(PyTypeObject *type, PyObject *x, PyObject *obase);
@@ -475,4 +476,4 @@ int_is_integer(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return int_is_integer_impl(self);
}
-/*[clinic end generated code: output=009a537ab558763c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7e6e57246e55911f input=a9049054013a1b77]*/
diff --git a/Objects/clinic/memoryobject.c.h b/Objects/clinic/memoryobject.c.h
index 74c749e..f199434 100644
--- a/Objects/clinic/memoryobject.c.h
+++ b/Objects/clinic/memoryobject.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(memoryview__doc__,
"memoryview(object)\n"
@@ -412,4 +413,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=7ebdadda3b0fcd35 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=7e76a09106921ba2 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/moduleobject.c.h b/Objects/clinic/moduleobject.c.h
index ce21e47..3c0bbe2 100644
--- a/Objects/clinic/moduleobject.c.h
+++ b/Objects/clinic/moduleobject.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(module___init____doc__,
"module(name, doc=None)\n"
@@ -73,4 +74,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=9d3d7854d17a033c input=a9049054013a1b77]*/
+/*[clinic end generated code: output=e8a71bfbed774c15 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/odictobject.c.h b/Objects/clinic/odictobject.c.h
index 643f504..5ef5380 100644
--- a/Objects/clinic/odictobject.c.h
+++ b/Objects/clinic/odictobject.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(OrderedDict_fromkeys__doc__,
"fromkeys($type, /, iterable, value=None)\n"
@@ -331,4 +332,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=6d7ae9fb552c6108 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=eff78d2a3f9379bd input=a9049054013a1b77]*/
diff --git a/Objects/clinic/structseq.c.h b/Objects/clinic/structseq.c.h
index 2571888..cec49eb 100644
--- a/Objects/clinic/structseq.c.h
+++ b/Objects/clinic/structseq.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
static PyObject *
structseq_new_impl(PyTypeObject *type, PyObject *arg, PyObject *dict);
@@ -61,4 +62,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=2f88fe2a6f5c13a8 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5bf39b3f06a34ce4 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/tupleobject.c.h b/Objects/clinic/tupleobject.c.h
index f217127..5d6a2c4 100644
--- a/Objects/clinic/tupleobject.c.h
+++ b/Objects/clinic/tupleobject.c.h
@@ -2,6 +2,8 @@
preserve
[clinic start generated code]*/
+#include "pycore_modsupport.h" // _PyArg_CheckPositional()
+
PyDoc_STRVAR(tuple_index__doc__,
"index($self, value, start=0, stop=sys.maxsize, /)\n"
"--\n"
@@ -112,4 +114,4 @@ tuple___getnewargs__(PyTupleObject *self, PyObject *Py_UNUSED(ignored))
{
return tuple___getnewargs___impl(self);
}
-/*[clinic end generated code: output=7c5d9d12e0cf6a83 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a6a9abba5d121f4c input=a9049054013a1b77]*/
diff --git a/Objects/clinic/typeobject.c.h b/Objects/clinic/typeobject.c.h
index eb0b22a..1fa1535 100644
--- a/Objects/clinic/typeobject.c.h
+++ b/Objects/clinic/typeobject.c.h
@@ -2,6 +2,8 @@
preserve
[clinic start generated code]*/
+#include "pycore_modsupport.h" // _PyArg_BadArgument()
+
PyDoc_STRVAR(type___instancecheck____doc__,
"__instancecheck__($self, instance, /)\n"
"--\n"
@@ -260,4 +262,4 @@ object___dir__(PyObject *self, PyObject *Py_UNUSED(ignored))
{
return object___dir___impl(self);
}
-/*[clinic end generated code: output=943f639f264362d9 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b56c87f9cace1921 input=a9049054013a1b77]*/
diff --git a/Objects/clinic/typevarobject.c.h b/Objects/clinic/typevarobject.c.h
index 22090b1..2bb0a98 100644
--- a/Objects/clinic/typevarobject.c.h
+++ b/Objects/clinic/typevarobject.c.h
@@ -6,6 +6,7 @@ preserve
# include "pycore_gc.h" // PyGC_Head
# include "pycore_runtime.h" // _Py_ID()
#endif
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywordsWithVararg()
PyDoc_STRVAR(typevar_new__doc__,
"typevar(name, *constraints, bound=None, covariant=False,\n"
@@ -590,4 +591,4 @@ skip_optional_kwonly:
exit:
return return_value;
}
-/*[clinic end generated code: output=027fb8cbef6e5015 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=5a582d9d89ad787b input=a9049054013a1b77]*/
diff --git a/Objects/clinic/unicodeobject.c.h b/Objects/clinic/unicodeobject.c.h
index 42b8a3c..7711434 100644
--- a/Objects/clinic/unicodeobject.c.h
+++ b/Objects/clinic/unicodeobject.c.h
@@ -7,6 +7,7 @@ preserve
# include "pycore_runtime.h" // _Py_ID()
#endif
#include "pycore_abstract.h" // _PyNumber_Index()
+#include "pycore_modsupport.h" // _PyArg_CheckPositional()
PyDoc_STRVAR(EncodingMap_size__doc__,
"size($self, /)\n"
@@ -1504,4 +1505,4 @@ skip_optional_pos:
exit:
return return_value;
}
-/*[clinic end generated code: output=4acdcfdc93f2a0f6 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=873d8b3d09af3095 input=a9049054013a1b77]*/
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 56ce34f..7f9f03d 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -6,6 +6,7 @@
#include "pycore_ceval.h" // _Py_EnterRecursiveCallTstate()
#include "pycore_emscripten_trampoline.h" // descr_set_trampoline_call(), descr_get_trampoline_call()
#include "pycore_descrobject.h" // _PyMethodWrapper_Type
+#include "pycore_modsupport.h" // _PyArg_UnpackStack()
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_tuple.h" // _PyTuple_ITEMS()
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 62a4423..4862345 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -8,10 +8,11 @@
#include <stdbool.h>
#include "pycore_abstract.h" // _PyObject_RealIsSubclass()
#include "pycore_ceval.h" // _Py_EnterRecursiveCall
-#include "pycore_pyerrors.h" // struct _PyErr_SetRaisedException
#include "pycore_exceptions.h" // struct _Py_exc_state
#include "pycore_initconfig.h"
+#include "pycore_modsupport.h" // _PyArg_NoKeywords()
#include "pycore_object.h"
+#include "pycore_pyerrors.h" // struct _PyErr_SetRaisedException
#include "osdefs.h" // SEP
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index e8ad486..8665c77 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -3,6 +3,7 @@
#include "Python.h"
#include "pycore_ceval.h" // _PyEval_BuiltinsFromGlobals()
+#include "pycore_modsupport.h" // _PyArg_NoKeywords()
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
#include "pycore_pyerrors.h" // _PyErr_Occurred()
diff --git a/Objects/genericaliasobject.c b/Objects/genericaliasobject.c
index bf13ed3..c045d49 100644
--- a/Objects/genericaliasobject.c
+++ b/Objects/genericaliasobject.c
@@ -2,6 +2,7 @@
#include "Python.h"
#include "pycore_ceval.h" // _PyEval_GetBuiltin()
+#include "pycore_modsupport.h" // _PyArg_NoKeywords()
#include "pycore_object.h"
#include "pycore_unionobject.h" // _Py_union_type_or, _PyGenericAlias_Check
diff --git a/Objects/genobject.c b/Objects/genobject.c
index 40033d1..491e631 100644
--- a/Objects/genobject.c
+++ b/Objects/genobject.c
@@ -7,6 +7,7 @@
#include "pycore_ceval.h" // _PyEval_EvalFrame()
#include "pycore_frame.h" // _PyInterpreterFrame
#include "pycore_genobject.h" // struct _Py_async_gen_state
+#include "pycore_modsupport.h" // _PyArg_CheckPositional()
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
#include "pycore_pyerrors.h" // _PyErr_ClearExcState()
#include "pycore_pystate.h" // _PyThreadState_GET()
diff --git a/Objects/namespaceobject.c b/Objects/namespaceobject.c
index 204c114..b975bcf 100644
--- a/Objects/namespaceobject.c
+++ b/Objects/namespaceobject.c
@@ -1,12 +1,12 @@
// namespace object implementation
#include "Python.h"
+#include "pycore_modsupport.h" // _PyArg_NoPositional()
#include "pycore_namespace.h" // _PyNamespace_Type
#include <stddef.h> // offsetof()
-
typedef struct {
PyObject_HEAD
PyObject *ns_dict;
diff --git a/Objects/sliceobject.c b/Objects/sliceobject.c
index 5ffc52a..1513f3e 100644
--- a/Objects/sliceobject.c
+++ b/Objects/sliceobject.c
@@ -16,6 +16,7 @@ this type and there is exactly one in existence.
#include "Python.h"
#include "pycore_abstract.h" // _PyIndex_Check()
#include "pycore_long.h" // _PyLong_GetZero()
+#include "pycore_modsupport.h" // _PyArg_NoKeywords()
#include "pycore_object.h" // _PyObject_GC_TRACK()
diff --git a/Objects/stringlib/clinic/transmogrify.h.h b/Objects/stringlib/clinic/transmogrify.h.h
index e81c591..3a985ab 100644
--- a/Objects/stringlib/clinic/transmogrify.h.h
+++ b/Objects/stringlib/clinic/transmogrify.h.h
@@ -7,6 +7,7 @@ preserve
# include "pycore_runtime.h" // _Py_ID()
#endif
#include "pycore_abstract.h" // _PyNumber_Index()
+#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
PyDoc_STRVAR(stringlib_expandtabs__doc__,
"expandtabs($self, /, tabsize=8)\n"
@@ -278,4 +279,4 @@ stringlib_zfill(PyObject *self, PyObject *arg)
exit:
return return_value;
}
-/*[clinic end generated code: output=39cd1ee983137188 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=b409bdf9ab68d5a6 input=a9049054013a1b77]*/
diff --git a/Objects/structseq.c b/Objects/structseq.c
index e4a4b45..db4aebe 100644
--- a/Objects/structseq.c
+++ b/Objects/structseq.c
@@ -9,11 +9,11 @@
#include "Python.h"
#include "pycore_dict.h" // _PyDict_Pop()
-#include "pycore_tuple.h" // _PyTuple_FromArray()
+#include "pycore_initconfig.h" // _PyStatus_OK()
+#include "pycore_modsupport.h" // _PyArg_NoPositional()
#include "pycore_object.h" // _PyObject_GC_TRACK()
-
#include "pycore_structseq.h" // PyStructSequence_InitType()
-#include "pycore_initconfig.h" // _PyStatus_OK()
+#include "pycore_tuple.h" // _PyTuple_FromArray()
static const char visible_length_key[] = "n_sequence_fields";
static const char real_length_key[] = "n_fields";