cpython/Python
Victor Stinner be5e8a0103
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
2023-10-17 14:30:31 +02:00
..
clinic gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +02:00
deepfreeze
frozen_modules
_warnings.c
abstract_interp_cases.c.h GH-109214: Convert _SAVE_CURRENT_IP to _SET_IP in tier 2 trace creation. (GH-110755) 2023-10-12 10:34:32 +01:00
adaptive.md
asdl.c
asm_trampoline.S
assemble.c
ast.c gh-109341: Fix crash on compiling invalid AST including TypeAlias (#109349) 2023-09-13 09:00:39 -07:00
ast_opt.c
ast_unparse.c
bltinmodule.c gh-110014: Include explicitly <unistd.h> header (#110155) 2023-09-30 20:06:45 +00:00
bootstrap_hash.c gh-110014: Fix bootstrap_hash.c: remove debug code (#110161) 2023-09-30 22:21:20 +00:00
bytecodes.c gh-109094: remove redundant arg to _PyFrame_PushTrampolineUnchecked (GH-110759) 2023-10-12 11:02:42 +01:00
ceval.c gh-110237: Check PyList_Append for errors in _PyEval_MatchClass (#110238) 2023-10-07 17:04:51 -07:00
ceval_gil.c gh-109693: Update _gil_runtime_state.locked to use pyatomic.h (gh-110836) 2023-10-17 07:32:50 +09:00
ceval_macros.h GH-109214: Convert _SAVE_CURRENT_IP to _SET_IP in tier 2 trace creation. (GH-110755) 2023-10-12 10:34:32 +01:00
codecs.c
compile.c gh-105658: fix excess trace events for except block ending with a conditional block (#109384) 2023-09-14 17:06:08 +01:00
condvar.h gh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (#110139) 2023-09-30 19:25:54 +02:00
context.c
dtoa.c gh-110079: Remove extern "C" { ...} in C code (#110080) 2023-09-29 10:56:49 +02:00
dup2.c
dynamic_annotations.c
dynload_hpux.c gh-88402: Add new sysconfig variables on Windows (GH-110049) 2023-10-04 22:50:29 +00:00
dynload_shlib.c gh-88402: Add new sysconfig variables on Windows (GH-110049) 2023-10-04 22:50:29 +00:00
dynload_stub.c gh-88402: Add new sysconfig variables on Windows (GH-110049) 2023-10-04 22:50:29 +00:00
dynload_win.c gh-88402: Add new sysconfig variables on Windows (GH-110049) 2023-10-04 22:50:29 +00:00
emscripten_signal.c
emscripten_trampoline.c gh-106213: Make Emscripten trampolines work with JSPI (GH-106219) 2023-09-15 15:04:21 -07:00
errors.c gh-110079: Remove extern "C" { ...} in C code (#110080) 2023-09-29 10:56:49 +02:00
executor.c Remove an old macro from executor.c (#110597) 2023-10-10 08:45:23 +00:00
executor_cases.c.h GH-109214: Convert _SAVE_CURRENT_IP to _SET_IP in tier 2 trace creation. (GH-110755) 2023-10-12 10:34:32 +01:00
fileutils.c gh-110014: Include explicitly <unistd.h> header (#110155) 2023-09-30 20:06:45 +00:00
flowgraph.c gh-109889: fix compiler's redundant NOP detection to look past NOPs with no lineno when looking for the next instruction's lineno (#109987) 2023-09-28 20:33:28 +01:00
formatter_unicode.c
frame.c
frozen.c
frozenmain.c gh-110014: Include explicitly <unistd.h> header (#110155) 2023-09-30 20:06:45 +00:00
future.c
generated_cases.c.h gh-109094: remove redundant arg to _PyFrame_PushTrampolineUnchecked (GH-110759) 2023-10-12 11:02:42 +01:00
getargs.c gh-110964: Remove private _PyArg functions (#110966) 2023-10-17 14:30:31 +02:00
getcompiler.c
getcopyright.c
getopt.c gh-110079: Remove extern "C" { ...} in C code (#110080) 2023-09-29 10:56:49 +02:00
getplatform.c
getversion.c
hamt.c
hashtable.c
import.c gh-88402: Add new sysconfig variables on Windows (GH-110049) 2023-10-04 22:50:29 +00:00
importdl.c gh-88402: Add new sysconfig variables on Windows (GH-110049) 2023-10-04 22:50:29 +00:00
initconfig.c gh-110722: Add PYTHON_PRESITE to import a module before site.py is run (#110769) 2023-10-14 23:32:57 +02:00
instrumentation.c GH-109369: Merge all eval-breaker flags and monitoring version into one word. (GH-109846) 2023-10-04 16:09:48 +01:00
intrinsics.c
legacy_tracing.c gh-110514: Add PY_THROW to sys.setprofile events (GH-110524) 2023-10-09 09:38:45 +01:00
lock.c gh-108724: Add PyMutex and _PyParkingLot APIs (gh-109344) 2023-09-19 09:54:29 -06:00
marshal.c
modsupport.c gh-84489: Properly handle trailing spaces in Py_BuildValue() format strings (GH-21158) 2023-10-11 14:44:06 +03:00
mysnprintf.c
mystrtoul.c
opcode_targets.h GH-105848: Replace KW_NAMES + CALL with LOAD_CONST + CALL_KW (GH-109300) 2023-09-13 10:25:45 -07:00
optimizer.c GH-109214: Convert _SAVE_CURRENT_IP to _SET_IP in tier 2 trace creation. (GH-110755) 2023-10-12 10:34:32 +01:00
optimizer_analysis.c
parking_lot.c gh-108724: Add PyMutex and _PyParkingLot APIs (gh-109344) 2023-09-19 09:54:29 -06:00
pathconfig.c gh-110079: Remove extern "C" { ...} in C code (#110080) 2023-09-29 10:56:49 +02:00
perf_trampoline.c
preconfig.c
pyarena.c
pyctype.c
pyfpe.c
pyhash.c gh-110079: Remove extern "C" { ...} in C code (#110080) 2023-09-29 10:56:49 +02:00
pylifecycle.c gh-110722: Add PYTHON_PRESITE to import a module before site.py is run (#110769) 2023-10-14 23:32:57 +02:00
pymath.c
pystate.c gh-110752: Reset ceval.eval_breaker to 0 in interpreter_clear (GH-110753) 2023-10-12 15:10:21 +01:00
pystrcmp.c
pystrhex.c
pystrtod.c
Python-ast.c
Python-tokenize.c gh-104169: Refactor tokenizer into lexer and wrappers (#110684) 2023-10-11 15:14:44 +00:00
pythonrun.c gh-110912: Correctly display tracebacks for MemoryError exceptions using the traceback module (#110921) 2023-10-16 15:39:23 +01:00
pytime.c gh-108277: Add os.timerfd_create() function (#108382) 2023-10-07 19:33:22 +02:00
README
specialize.c gh-109329: Add stat for "trace too short" (GH-110402) 2023-10-05 16:12:06 +01:00
stdlib_module_names.h gh-88402: Add new sysconfig variables on Windows (GH-110049) 2023-10-04 22:50:29 +00:00
structmember.c
suggestions.c gh-108511: Add C API functions which do not silently ignore errors (GH-109025) 2023-09-17 14:23:31 +03:00
symtable.c gh-109390: add dump_symtable utility under #if 0 (#109391) 2023-09-20 10:55:56 -06:00
sysmodule.c gh-109595: Add -Xcpu_count=<n> cmdline for container users (#109667) 2023-10-10 19:00:09 +09:00
thread.c gh-110014: Fix _POSIX_THREADS and _POSIX_SEMAPHORES usage (#110139) 2023-09-30 19:25:54 +02:00
thread_nt.h
thread_pthread.h gh-109693: Update _gil_runtime_state.locked to use pyatomic.h (gh-110836) 2023-10-17 07:32:50 +09:00
thread_pthread_stubs.h
traceback.c gh-110721: Use the traceback module for PyErr_Display() and fallback to the C implementation (#110702) 2023-10-12 14:52:14 +00:00
tracemalloc.c

Miscellaneous source files for the main Python shared library