cpython/Modules/_io
Brett Simmers c2627d6eea
gh-116322: Add Py_mod_gil module slot (#116882)
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).
2024-05-03 11:30:55 -04:00
..
clinic gh-115015: Argument Clinic: fix generated code for METH_METHOD methods without params (#115016) 2024-02-05 21:49:17 +01:00
_iomodule.c gh-116322: Add Py_mod_gil module slot (#116882) 2024-05-03 11:30:55 -04:00
_iomodule.h gh-101819: Isolate `_io` (#101948) 2023-05-15 09:26:27 +00:00
bufferedio.c gh-117151: optimize BufferedWriter(), do not buffer writes that are the buffer size (GH-118037) 2024-04-23 18:51:20 +03:00
bytesio.c gh-117068: Remove useless code in bytesio.c:resize_buffer() (GH-117069) 2024-03-22 11:25:38 +00:00
fileio.c gh-117764: Add signatures for __reduce__ and __reduce_ex__ in the _io module (GH-117773) 2024-04-12 12:22:17 +03:00
iobase.c Fix an incorrect comment in iobase_is_closed (GH-102952) 2024-01-16 18:27:17 +02:00
stringio.c gh-112205: Support `@setter` annotation from AC (gh-112922) 2023-12-13 14:00:34 +00:00
textio.c gh-117764: Add signatures for __reduce__ and __reduce_ex__ in the _io module (GH-117773) 2024-04-12 12:22:17 +03:00
winconsoleio.c gh-115538: Emit warning when use bool as fd in _io.WindowsConsoleIO (GH-116925) 2024-03-18 11:48:50 +00:00