summaryrefslogtreecommitdiffstats
path: root/Modules/_interpretersmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* gh-76785: Improved Subinterpreters Compatibility with 3.12 (2/2) (gh-126707)Eric Snow2024-11-121-4/+13
| | | | | | | | | These changes makes it easier to backport the _interpreters, _interpqueues, and _interpchannels modules to Python 3.12. This involves the following: * add the _PyXI_GET_STATE() and _PyXI_GET_GLOBAL_STATE() macros * add _PyXIData_lookup_context_t and _PyXIData_GetLookupContext() * add _Py_xi_state_init() and _Py_xi_state_fini()
* gh-76785: Minor Cleanup of Exception-related Cross-interpreter State (gh-126602)Eric Snow2024-11-111-1/+1
| | | This change makes it easier to backport the _interpreters, _interpqueues, and _interpchannels modules to Python 3.12.
* gh-126654: Fix crash in several functions in `_interpreters` module (#126678)sobolevn2024-11-111-0/+5
|
* gh-76785: Minor Cleanup of "Cross-interpreter" Code (gh-126457)Eric Snow2024-11-071-13/+11
| | | | | | | | The primary objective here is to allow some later changes to be cleaner. Mostly this involves renaming things and moving a few things around. * CrossInterpreterData -> XIData * crossinterpdatafunc -> xidatafunc * split out pycore_crossinterp_data_registry.h * add _PyXIData_lookup_t
* gh-126223: Propagate unicode errors in `_interpreters.create()` (#126224)Peter Bierma2024-10-311-1/+5
| | | | Co-authored-by: sobolevn <mail@sobolevn.me> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Use _PyLong_IsNegative instead of _PyLong_Sign if appropriate. (GH-120493)Serhiy Storchaka2024-06-241-1/+0
| | | It is faster and more obvious.
* Remove almost all unpaired backticks in docstrings (#119231)Geoffrey Thomas2024-05-221-1/+1
| | | | | | | | | | | | | | | | | | As reported in #117847 and #115366, an unpaired backtick in a docstring tends to confuse e.g. Sphinx running on subclasses of standard library objects, and the typographic style of using a backtick as an opening quote is no longer in favor. Convert almost all uses of the form The variable `foo' should do xyz to The variable 'foo' should do xyz and also fix up miscellaneous other unpaired backticks (extraneous / missing characters). No functional change is intended here other than in human-readable docstrings.
* gh-116322: Add Py_mod_gil module slot (#116882)Brett Simmers2024-05-031-0/+1
| | | | | | | | | | | | | | This PR adds the ability to enable the GIL if it was disabled at interpreter startup, and modifies the multi-phase module initialization path to enable the GIL when loading a module, unless that module's spec includes a slot indicating it can run safely without the GIL. PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went with `Py_MOD_GIL_NOT_USED` for consistency with gh-104148. A warning will be issued up to once per interpreter for the first GIL-using module that is loaded. If `-v` is given, a shorter message will be printed to stderr every time a GIL-using module is loaded (including the first one that issues a warning).
* gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)Eric Snow2024-04-241-0/+1567
See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26.