mirror of
https://github.com/python/cpython.git
synced 2025-07-27 05:04:15 +00:00

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
31 lines
1.3 KiB
C
Generated
31 lines
1.3 KiB
C
Generated
/*[clinic input]
|
|
preserve
|
|
[clinic start generated code]*/
|
|
|
|
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
|
|
# include "pycore_gc.h" // PyGC_Head
|
|
# include "pycore_runtime.h" // _Py_ID()
|
|
#endif
|
|
#include "pycore_modsupport.h" // _PyArg_UnpackKeywords()
|
|
|
|
PyDoc_STRVAR(pysqlite_connect__doc__,
|
|
"connect($module, /, database, timeout=5.0, detect_types=0,\n"
|
|
" isolation_level=\'\', check_same_thread=True,\n"
|
|
" factory=ConnectionType, cached_statements=128, uri=False, *,\n"
|
|
" autocommit=sqlite3.LEGACY_TRANSACTION_CONTROL)\n"
|
|
"--\n"
|
|
"\n"
|
|
"Open a connection to the SQLite database file \'database\'.\n"
|
|
"\n"
|
|
"You can use \":memory:\" to open a database connection to a database that\n"
|
|
"resides in RAM instead of on disk.\n"
|
|
"\n"
|
|
"Note: Passing more than 1 positional argument to _sqlite3.connect() is\n"
|
|
"deprecated. Parameters \'timeout\', \'detect_types\', \'isolation_level\',\n"
|
|
"\'check_same_thread\', \'factory\', \'cached_statements\' and \'uri\' will\n"
|
|
"become keyword-only parameters in Python 3.15.\n"
|
|
"");
|
|
|
|
#define PYSQLITE_CONNECT_METHODDEF \
|
|
{"connect", _PyCFunction_CAST(pysqlite_connect), METH_FASTCALL|METH_KEYWORDS, pysqlite_connect__doc__},
|
|
/*[clinic end generated code: output=69b9b00da71c3c0a input=a9049054013a1b77]*/
|