cpython/Python
Victor Stinner cab5d0741e
bpo-36763: Add _PyCoreConfig_InitPythonConfig() (GH-13388)
Add new functions to get the Python interpreter behavior:

* _PyPreConfig_InitPythonConfig()
* _PyCoreConfig_InitPythonConfig()

Add new functions to get an isolated configuration:

* _PyPreConfig_InitIsolatedConfig()
* _PyCoreConfig_InitIsolatedConfig()

Replace _PyPreConfig_INIT and _PyCoreConfig_INIT with new functions
_PyPreConfig_Init() and _PyCoreConfig_Init().

_PyCoreConfig: set configure_c_stdio and parse_argv to 0 by default
to behave as Python 3.6 in the default configuration.

_PyCoreConfig_Read() no longer sets coerce_c_locale_warn to 1 if it's
equal to 0. coerce_c_locale_warn must now be set to -1 (ex: using
_PyCoreConfig_InitPythonConfig()) to enable C locale coercion
warning.

Add unit tests for _PyCoreConfig_InitPythonConfig()
and _PyCoreConfig_InitIsolatedConfig().

Changes:

* Rename _PyCoreConfig_GetCoreConfig() to _PyPreConfig_GetCoreConfig()
* Fix core_read_precmdline(): handle parse_argv=0
* Fix _Py_PreInitializeFromCoreConfig(): pass coreconfig.argv
  to _Py_PreInitializeFromPyArgv(), except if parse_argv=0
2019-05-17 19:01:14 +02:00
..
clinic bpo-36127: Argument Clinic: inline parsing code for keyword parameters. (GH-12058) 2019-03-14 10:32:22 +02:00
_warnings.c bpo-36737: Use the module state C-API for warnings. (gh-13159) 2019-05-10 13:29:55 -04:00
asdl.c replace PY_SIZE_MAX with SIZE_MAX 2016-09-07 09:26:18 -07:00
ast_opt.c bpo-33416: Add end positions to Python AST (GH-11605) 2019-01-22 11:18:22 +00:00
ast_unparse.c bpo-36817: Add f-string debugging using '='. (GH-13123) 2019-05-08 16:28:48 -04:00
ast.c bpo-36817: Do not decrement reference for expr_text on fstring = parsing failure (GH-13256) 2019-05-12 01:43:04 +01:00
bltinmodule.c bpo-36791: Safer detection of integer overflow in sum(). (GH-13080) 2019-05-05 14:26:23 +03:00
bootstrap_hash.c bpo-36763: Rework _PyInitError API (GH-13031) 2019-05-01 05:35:33 +02:00
ceval_gil.h bpo-36710: Add 'ceval' local variable to ceval.c (GH-12934) 2019-05-10 23:39:09 +02:00
ceval.c bpo-36728: Remove PyEval_ReInitThreads() from C API (GH-13241) 2019-05-13 12:35:37 +02:00
codecs.c bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112) 2019-02-25 17:59:46 +02:00
compile.c bpo-1875: Raise SyntaxError in invalid blocks that will be optimised away (GH-13332) 2019-05-17 11:37:08 +01:00
condvar.h bpo-12822: use monotonic clock for condvar if possible (GH-11723) 2019-02-20 10:00:09 +09:00
context.c bpo-36101: remove non-ascii characters in docstring (GH-12018) 2019-02-25 08:18:48 +09:00
coreconfig.c bpo-36763: Add _PyCoreConfig_InitPythonConfig() (GH-13388) 2019-05-17 19:01:14 +02:00
dtoa.c bpo-36262: Fix _Py_dg_strtod() memory leak (goto undfl) (GH-12276) 2019-03-13 17:55:01 +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 PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10: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-36900: Replace global conf vars with config (GH-13299) 2019-05-14 17:34:56 +02:00
dynload_shlib.c bpo-36722: Debug build loads libraries built in release mode (GH-12952) 2019-04-26 01:40:00 +02:00
dynload_stub.c
dynload_win.c bpo-36085: Enable better DLL resolution on Windows (GH-12302) 2019-03-29 16:37:16 -07:00
errors.c bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112) 2019-02-25 17:59:46 +02:00
fileutils.c bpo-36775: Add _Py_FORCE_UTF8_FS_ENCODING macro (GH-13056) 2019-05-02 11:28:57 -04:00
formatter_unicode.c bpo-33954: Fix _PyUnicode_InsertThousandsGrouping() (GH-10623) 2018-11-26 13:40:01 +01:00
frozen.c bpo-36540: PEP 570 -- Implementation (GH-12701) 2019-04-29 13:36:57 +01:00
frozenmain.c bpo-36763: Add _PyCoreConfig_InitPythonConfig() (GH-13388) 2019-05-17 19:01:14 +02:00
future.c bpo-34683: Make SyntaxError column offsets consistently 1-indexed (gh-9338) 2018-09-24 14:12:49 -07:00
getargs.c bpo-36381: warn when no PY_SSIZE_T_CLEAN defined (GH-12473) 2019-03-23 21:04:40 +09: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 Bump copyright years to 2019. (GH-11404) 2019-01-02 07:46:53 -08:00
getopt.c bpo-36763: Cleanup precmdline in _PyCoreConfig_Read() (GH-13371) 2019-05-17 03:15:12 +02: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
graminit.c bpo-36540: PEP 570 -- Implementation (GH-12701) 2019-04-29 13:36:57 +01:00
hamt.c bpo-35983: skip trashcan for subclasses (GH-11841) 2019-05-10 19:21:10 +02:00
import.c bpo-36900: import.c uses PyInterpreterState.core_config (GH-13278) 2019-05-13 17:12:45 +02:00
importdl.c bpo-31315: Fix an assertion failure in imp.create_dynamic(), when spec.name is not a string. (#3257) 2017-09-19 14:39:47 +03:00
importdl.h PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
importlib_external.h bpo-36540: PEP 570 -- Implementation (GH-12701) 2019-04-29 13:36:57 +01:00
importlib_zipimport.h bpo-36540: PEP 570 -- Implementation (GH-12701) 2019-04-29 13:36:57 +01:00
importlib.h bpo-36540: PEP 570 -- Implementation (GH-12701) 2019-04-29 13:36:57 +01:00
makeopcodetargets.py makeopcodetargets.py: we need to import Lib/opcode.py 2016-03-26 01:04:37 +01:00
marshal.c bpo-36540: PEP 570 -- Implementation (GH-12701) 2019-04-29 13:36:57 +01:00
modsupport.c bpo-36381: warn when no PY_SSIZE_T_CLEAN defined (GH-12473) 2019-03-23 21:04:40 +09:00
mysnprintf.c
mystrtoul.c bpo-31370: Remove support for threads-less builds (#3385) 2017-09-07 18:56:24 +02:00
opcode_targets.h bpo-33041: Rework compiling an "async for" loop. (#6142) 2018-03-23 14:34:35 +02:00
pathconfig.c bpo-36763: Add _PyCoreConfig_InitPythonConfig() (GH-13388) 2019-05-17 19:01:14 +02:00
peephole.c bpo-1875: Raise SyntaxError in invalid blocks that will be optimised away (GH-13332) 2019-05-17 11:37:08 +01:00
preconfig.c bpo-36763: Add _PyCoreConfig_InitPythonConfig() (GH-13388) 2019-05-17 19:01:14 +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-31849: Fix warning in pyhash.c (GH-6799) 2018-06-04 19:57:08 +09:00
pylifecycle.c bpo-36763: Add _PyCoreConfig_InitPythonConfig() (GH-13388) 2019-05-17 19:01:14 +02:00
pymath.c bpo-35214: Add _Py_ prefix to MEMORY_SANITIZER def. (GH-10503) 2018-11-12 22:01:22 -08:00
pystate.c bpo-36763: Add _PyCoreConfig_InitPythonConfig() (GH-13388) 2019-05-17 19:01:14 +02:00
pystrcmp.c
pystrhex.c closes bpo-34646: Remove PyAPI_* macros from declarations. (GH-9218) 2018-09-12 12:06:42 -07:00
pystrtod.c bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015) 2018-12-07 12:11:30 +02:00
Python-ast.c bpo-36817: Add f-string debugging using '='. (GH-13123) 2019-05-08 16:28:48 -04:00
pythonrun.c bpo-36763: Add _Py_InitializeMain() (GH-13362) 2019-05-16 17:38:16 +02:00
pytime.c bpo-34373: Fix time.mktime() on AIX (GH-12726) 2019-04-09 19:12:26 +02:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
strdup.c bpo-36623: Clean parser headers and include files (GH-12253) 2019-04-13 17:05:14 +01:00
structmember.c Added the const qualifier to char* variables that refer to readonly internal 2016-11-20 10:16:47 +02:00
symtable.c bpo-36540: PEP 570 -- Implementation (GH-12701) 2019-04-29 13:36:57 +01:00
sysmodule.c bpo-36594: Fix incorrect use of %p in format strings (GH-12769) 2019-05-06 12:56:50 -04:00
thread_nt.h bpo-36084: Add native thread ID to threading.Thread objects (GH-11993) 2019-05-12 19:08:24 +02:00
thread_pthread.h bpo-36084: Add native thread ID to threading.Thread objects (GH-11993) 2019-05-12 19:08:24 +02:00
thread.c bpo-35081: Rename internal headers (GH-10275) 2018-11-12 16:53:38 +01:00
traceback.c bpo-35983: skip trashcan for subclasses (GH-11841) 2019-05-10 19:21:10 +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