cpython/Include/cpython
Eric Snow 4702552885
gh-98610: Adjust the Optional Restrictions on Subinterpreters (GH-98618)
Previously, the optional restrictions on subinterpreters were: disallow fork, subprocess, and threads.  By default, we were disallowing all three for "isolated" interpreters.  We always allowed all three for the main interpreter and those created through the legacy `Py_NewInterpreter()` API.

Those settings were a bit conservative, so here we've adjusted the optional restrictions to: fork, exec, threads, and daemon threads.  The default for "isolated" interpreters disables fork, exec, and daemon threads.  Regular threads are allowed by default.  We continue always allowing everything For the main interpreter and the legacy API.

In the code, we add `_PyInterpreterConfig.allow_exec` and  `_PyInterpreterConfig.allow_daemon_threads`.  We also add `Py_RTFLAGS_DAEMON_THREADS` and `Py_RTFLAGS_EXEC`.
2022-10-31 12:35:54 -07:00
..
abstract.h gh-98586: Add vector call APIs to the Limited API (GH-98587) 2022-10-27 11:45:42 +02:00
bytearrayobject.h gh-89653: PEP 670: Macros always cast arguments in cpython/ (#93766) 2022-06-13 20:09:40 +02:00
bytesobject.h gh-89653: PEP 670: Macros always cast arguments in cpython/ (#93766) 2022-06-13 20:09:40 +02:00
cellobject.h gh-87347: Add parenthesis around PyXXX_Check() arguments (#92815) 2022-06-16 13:49:43 +02:00
ceval.h GH-93503: Add thread-specific APIs to set profiling and tracing functions in the C-API (#93504) 2022-08-24 23:21:39 +01:00
classobject.h gh-87347: Add parenthesis around macro arguments (#93915) 2022-06-20 16:04:52 +02:00
code.h gh-95756: Lazily created cached co_* attrs (GH-97791) 2022-10-11 11:26:08 +08:00
compile.h gh-98811: use full source location to simplify __future__ imports error checking. This also fixes an incorrect error offset. (GH-98812) 2022-10-31 13:08:03 +00:00
complexobject.h bpo-35134: Add Include/cpython/complexobject.h header (GH-32383) 2022-04-07 01:05:27 +02:00
context.h gh-87347: Add parenthesis around PyXXX_Check() arguments (#92815) 2022-06-16 13:49:43 +02:00
descrobject.h bpo-45459: C API uses type names rather than structure names (GH-31528) 2022-02-24 17:51:59 +01:00
dictobject.h gh-91052: Add PyDict_Unwatch for unwatching a dictionary (#98055) 2022-10-07 17:37:46 -07:00
fileobject.h gh-96670: Raise SyntaxError when parsing NULL bytes (#97594) 2022-09-27 23:23:42 +01:00
fileutils.h bpo-46303: Move fileutils.h private functions to internal C API (GH-30484) 2022-01-11 11:56:16 +01:00
floatobject.h bpo-46906: Add PyFloat_Pack8() to the C API (GH-31657) 2022-03-12 00:10:02 +01:00
frameobject.h gh-93937, C API: Move PyFrame_GetBack() to Python.h (#93938) 2022-06-19 12:02:33 +02:00
funcobject.h GH-91049: Introduce set vectorcall field API for PyFunctionObject (GH-92257) 2022-09-15 16:42:37 +01:00
genobject.h gh-87347: Add parenthesis around PyXXX_Check() arguments (#92815) 2022-06-16 13:49:43 +02:00
import.h gh-93741: Add private C API _PyImport_GetModuleAttrString() (GH-93742) 2022-06-14 07:15:26 +03:00
initconfig.h gh-98610: Adjust the Optional Restrictions on Subinterpreters (GH-98618) 2022-10-31 12:35:54 -07:00
listobject.h gh-87347: Add parenthesis around macro arguments (#93915) 2022-06-20 16:04:52 +02:00
longintrepr.h bpo-46218: Change long_pow() to sliding window algorithm (GH-30319) 2022-01-02 13:18:20 -06:00
longobject.h bpo-35134: Add Include/cpython/longobject.h (GH-29044) 2021-10-19 02:04:52 +02:00
methodobject.h gh-87347: Add parenthesis around PyXXX_Check() arguments (#92815) 2022-06-16 13:49:43 +02:00
modsupport.h gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code (gh-95860) 2022-08-11 15:25:49 -06:00
object.h gh-98410: move getbufferproc and releasebufferproc to buffer.h (#31158) 2022-10-31 15:01:32 +01:00
objimpl.h bpo-40170: Remove _Py_GetAllocatedBlocks() function (GH-30940) 2022-01-27 03:35:51 +01:00
odictobject.h gh-87347: Add parenthesis around macro arguments (#93915) 2022-06-20 16:04:52 +02:00
picklebufobject.h gh-87347: Add parenthesis around PyXXX_Check() arguments (#92815) 2022-06-16 13:49:43 +02:00
pthread_stubs.h gh-95174: Add pthread stubs for WASI (GH-95234) 2022-07-27 20:28:06 +02:00
pyctype.h bpo-43816: Add extern "C" to Include/cpython/pyctype.h (GH-25365) 2021-04-13 13:27:21 +02:00
pydebug.h gh-77782: Deprecate global configuration variable (#93943) 2022-06-17 16:12:00 +02:00
pyerrors.h gh-91058: Add error suggestions to 'import from' import errors (#98305) 2022-10-25 23:56:59 +01:00
pyfpe.h bpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561) 2021-02-19 15:55:46 +01:00
pyframe.h gh-93937, C API: Move PyFrame_GetBack() to Python.h (#93938) 2022-06-19 12:02:33 +02:00
pylifecycle.h gh-98608: Change _Py_NewInterpreter() to _Py_NewInterpreterFromConfig() (gh-98609) 2022-10-26 11:16:30 -06:00
pymem.h bpo-43795: PEP-652: Clean up the stable ABI/limited API (GH-25482) 2021-04-23 14:17:58 +02:00
pystate.h gh-98610: Adjust the Optional Restrictions on Subinterpreters (GH-98618) 2022-10-31 12:35:54 -07:00
pythonrun.h gh-87347: Add parenthesis around macro arguments (#93915) 2022-06-20 16:04:52 +02:00
pythread.h gh-95174: Add pthread stubs for WASI (GH-95234) 2022-07-27 20:28:06 +02:00
pytime.h gh-74953: Add _PyTime_FromMicrosecondsClamp() function (#93942) 2022-06-17 16:11:13 +02:00
setobject.h bpo-35134: Add Include/cpython/setobject.h header (GH-32384) 2022-04-07 01:26:24 +02:00
sysmodule.h bpo-46987: Remove _PySys_GetObjectId / _PySys_GetObjectId (GH-31835) 2022-03-14 21:48:00 +09:00
traceback.h bpo-45459: C API uses type names rather than structure names (GH-31528) 2022-02-24 17:51:59 +01:00
tupleobject.h gh-87347: Add parenthesis around macro arguments (#93915) 2022-06-20 16:04:52 +02:00
unicodeobject.h gh-98783: Fix crashes when str subclasses are used in _PyUnicode_Equal (#98806) 2022-10-30 02:23:20 -04:00
warnings.h gh-87347: Add parenthesis around macro arguments (#93915) 2022-06-20 16:04:52 +02:00
weakrefobject.h gh-89653: PEP 670: Macros always cast arguments in cpython/ (#93766) 2022-06-13 20:09:40 +02:00