cpython/Python
Victor Stinner e5fbe0cbd4
bpo-41631: _ast module uses again a global state (#21961)
Partially revert commit ac46eb4ad6:
"bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957)".

Using a module state per module instance is causing subtle practical
problems.

For example, the Mercurial project replaces the __import__() function
to implement lazy import, whereas Python expected that "import _ast"
always return a fully initialized _ast module.

Add _PyAST_Fini() to clear the state at exit.

The _ast module has no state (set _astmodule.m_size to 0). Remove
astmodule_traverse(), astmodule_clear() and astmodule_free()
functions.
2020-09-15 18:03:34 +02:00
..
clinic bpo-40471: Fix grammar typo in 'issubclass' docstring (GH-19847) 2020-06-03 06:19:45 -07:00
_warnings.c bpo-39465: Use _PyInterpreterState_GET() (GH-20788) 2020-06-10 20:08:26 +02:00
asdl.c replace PY_SIZE_MAX with SIZE_MAX 2016-09-07 09:26:18 -07:00
ast.c bpo-40939: Remove the old parser (Part 2) (GH-21005) 2020-06-20 19:07:25 +01:00
ast_opt.c bpo-40334: PEP 617 implementation: New PEG parser for CPython (GH-19503) 2020-04-22 23:29:27 +01:00
ast_unparse.c bpo-40663: Correctly handle annotations with subscripts in ast_unparse.c (GH-20156) 2020-05-18 19:23:48 +01:00
bltinmodule.c bpo-41078: Fix bltinmodule.c with Py_TRACE_REFS (GH-21058) 2020-06-22 18:02:49 +02:00
bootstrap_hash.c bpo-40910: Export Py_GetArgcArgv() function (GH-20721) 2020-06-08 18:12:59 +02:00
ceval.c bpo-40941: Unify implicit and explicit state in the frame and generator objects into a single value. (GH-20803) 2020-07-17 11:44:23 +01:00
ceval_gil.h bpo-40513: Per-interpreter GIL (GH-19943) 2020-05-05 20:27:47 +02:00
codecs.c bpo-40268: Remove a few pycore_pystate.h includes (GH-19510) 2020-04-14 17:52:15 +02:00
compile.c bpo-41531: Fix compilation of dict literals with more than 0xFFFF elements (GH-21850) 2020-08-13 09:48:41 +01:00
condvar.h Typo fix: "throuhgh" should be "through". (GH-16704) 2019-10-10 20:43:13 -07:00
context.c bpo-40521: Fix _PyContext_Fini() (GH-21103) 2020-06-24 03:21:15 +02:00
dtoa.c bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435) 2020-05-29 14:23:57 +01:00
dup2.c bpo-32150: Expand tabs to spaces in C files. (#4583) 2017-11-28 17:56:10 +02:00
dynamic_annotations.c bpo-32241: Add the const qualifire to declarations of umodifiable strings. (#4748) 2017-12-12 13:55:04 +02:00
dynload_aix.c bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095) 2019-09-10 17:04:08 +01:00
dynload_dl.c Issue #24268: Fix import naming when loading extension modules. Patch by Petr Viktorin. 2015-05-23 14:13:41 -07:00
dynload_hpux.c bpo-40268: Add _PyInterpreterState_GetConfig() (GH-19492) 2020-04-13 03:04:28 +02:00
dynload_shlib.c bpo-40268: Rename _PyInterpreterState_GET_UNSAFE() (GH-19509) 2020-04-14 15:14:01 +02:00
dynload_stub.c Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py. 2012-05-04 15:20:40 -04:00
dynload_win.c bpo-36346: Make using the legacy Unicode C API optional (GH-21437) 2020-07-10 23:26:06 +03:00
errors.c bpo-40985: Show correct SyntaxError text when last line has a LINECONT (GH-20888) 2020-06-16 01:27:33 +01:00
fileutils.c bpo-36346: Make using the legacy Unicode C API optional (GH-21437) 2020-07-10 23:26:06 +03:00
formatter_unicode.c bpo-41681: Fix for f-string/str.format error description when using 2 , in format specifier (GH-22036) 2020-09-01 10:34:29 -04:00
frozen.c bpo-36540: PEP 570 -- Implementation (GH-12701) 2019-04-29 13:36:57 +01:00
frozenmain.c bpo-40268: Remove a few pycore_pystate.h includes (GH-19510) 2020-04-14 17:52:15 +02:00
future.c bpo-40939: Remove the old parser (Part 2) (GH-21005) 2020-06-20 19:07:25 +01:00
getargs.c bpo-41078: Rename pycore_tupleobject.h to pycore_tuple.h (GH-21056) 2020-06-22 17:27:35 +02:00
getcompiler.c closes bpo-31696: don't mention GCC in sys.version when building with clang (#3891) 2017-10-05 21:15:14 -07:00
getcopyright.c Bring Python into the next decade. (GH-17801) 2020-01-02 18:56:34 -08:00
getopt.c bpo-40527: Fix command line argument parsing (GH-19955) 2020-05-06 22:22:17 +09:00
getplatform.c bpo-32150: Expand tabs to spaces in C files. (#4583) 2017-11-28 17:56:10 +02:00
getversion.c bpo-32150: Expand tabs to spaces in C files. (#4583) 2017-11-28 17:56:10 +02:00
hamt.c bpo-29882: Add _Py_popcount32() function (GH-20518) 2020-06-08 16:30:33 +02:00
hashtable.c bpo-41061: Fix incorrect expressions in hashtable (GH-21028) 2020-06-22 00:41:48 -07:00
import.c bpo-40232: _PyImport_ReInitLock() can now safely use its lock (GH-20597) 2020-06-02 17:13:49 +02:00
importdl.c bpo-39573: Finish converting to new Py_IS_TYPE() macro (GH-18601) 2020-03-04 14:15:20 +01:00
importdl.h PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
importlib.h bpo-41323: Perform 'peephole' optimizations directly on the CFG. (GH-21517) 2020-07-30 10:03:00 +01:00
importlib_external.h bpo-41323: Perform 'peephole' optimizations directly on the CFG. (GH-21517) 2020-07-30 10:03:00 +01:00
importlib_zipimport.h bpo-41323: Perform 'peephole' optimizations directly on the CFG. (GH-21517) 2020-07-30 10:03:00 +01:00
initconfig.c Fix compiler warnings in init_dump_ascii_wstr() (GH-22150) 2020-09-09 12:07:17 +02:00
makeopcodetargets.py makeopcodetargets.py: we need to import Lib/opcode.py 2016-03-26 01:04:37 +01:00
marshal.c bpo-1635741: Port mashal module to multi-phase init (#22149) 2020-09-08 15:33:52 +02:00
modsupport.c closes bpo-41533: Fix a potential memory leak when allocating a stack (GH-21847) 2020-08-29 23:53:08 -05:00
mysnprintf.c bpo-36020: Require vsnprintf() to build Python (GH-20899) 2020-06-16 00:54:44 +02:00
mystrtoul.c bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095) 2019-09-10 17:04:08 +01:00
opcode_targets.h bpo-39320: Handle unpacking of **values in compiler (GH-18141) 2020-01-27 09:57:45 +00:00
pathconfig.c bpo-29778: test_embed tests the path configuration (GH-21306) 2020-07-08 00:20:37 +02:00
preconfig.c _PyPreConfig_Read() decodes argv at each iteration (GH-20786) 2020-06-10 19:33:11 +02:00
pyarena.c bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264) 2019-03-13 22:59:55 +02:00
pyctype.c
pyfpe.c bpo-29137: Remove fpectl module (#4789) 2018-01-05 23:15:34 -08:00
pyhash.c bpo-40943: Replace PY_FORMAT_SIZE_T with "z" (GH-20781) 2020-06-10 18:38:05 +02:00
pylifecycle.c bpo-41631: _ast module uses again a global state (#21961) 2020-09-15 18:03:34 +02:00
pymath.c bpo-29782: Consolidate _Py_Bit_Length() (GH-20739) 2020-06-15 14:33:48 +02:00
pystate.c bpo-1635741: Clean sysdict and builtins of interpreter at exit (GH-21605) 2020-08-12 23:23:30 +02:00
pystrcmp.c bpo-41524: fix pointer bug in PyOS_mystr{n}icmp (GH-21845) 2020-08-27 14:45:25 +09:00
pystrhex.c bpo-40313: speed up bytes.hex() (GH-19594) 2020-04-20 17:17:52 -07:00
pystrtod.c bpo-35081: Move dtoa.h header to the internal C API (GH-18489) 2020-02-12 22:54:42 +01:00
Python-ast.c bpo-41631: _ast module uses again a global state (#21961) 2020-09-15 18:03:34 +02:00
pythonrun.c bpo-40939: Rename PyPegen* functions to PyParser* (GH-21016) 2020-06-22 00:47:46 +01:00
pytime.c bpo-40650: Include winsock2.h in pytime.c, instead of a full windows.h (GH-20137) 2020-05-18 17:22:53 +01:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
structmember.c bpo-40268: Remove unused structmember.h includes (GH-19530) 2020-04-15 02:35:41 +02:00
symtable.c bpo-40268: Remove unused structmember.h includes (GH-19530) 2020-04-15 02:35:41 +02:00
sysmodule.c bpo-23427: Add sys.orig_argv attribute (GH-20729) 2020-06-30 00:49:03 +02:00
thread.c bpo-40268: Remove explicit pythread.h includes (#19529) 2020-04-15 02:04:42 +02:00
thread_nt.h bpo-40268: Rename _PyInterpreterState_GET_UNSAFE() (GH-19509) 2020-04-14 15:14:01 +02:00
thread_pthread.h Fix -Wstrict-prototypes warning in thread_pthread.h. (GH-21477) 2020-07-15 08:12:05 -05:00
traceback.c bpo-40421: Add PyFrame_GetBack() function (GH-19765) 2020-04-29 03:28:46 +02:00
wordcode_helpers.h bpo-31338 (#3374) 2017-09-14 18:13:16 -07:00

Miscellaneous source files for the main Python shared library