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
ast_opt.c
ast_unparse.c
bltinmodule.c
bootstrap_hash.c
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
condvar.h
context.c
dtoa.c
dup2.c
dynamic_annotations.c
dynload_hpux.c
dynload_shlib.c
dynload_stub.c
dynload_win.c
emscripten_signal.c
emscripten_trampoline.c
errors.c
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
flowgraph.c
formatter_unicode.c
frame.c
frozen.c
frozenmain.c
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
getplatform.c
getversion.c
hamt.c
hashtable.c
import.c
importdl.c
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
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
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
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
pathconfig.c
perf_trampoline.c
preconfig.c
pyarena.c
pyctype.c
pyfpe.c
pyhash.c
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
README
specialize.c
stdlib_module_names.h
structmember.c
suggestions.c
symtable.c
sysmodule.c gh-109595: Add -Xcpu_count=<n> cmdline for container users (#109667) 2023-10-10 19:00:09 +09:00
thread.c
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