Closed
Description
Isolate the _io
extension module by moving all global variables to module state, porting static types to heap types, and implementing multi-phase init. All global variables in the _io
module are static types:
- Modules/_io/bufferedio.c: PyBufferedIOBase_Type
- Modules/_io/bufferedio.c: PyBufferedRWPair_Type
- Modules/_io/bufferedio.c: PyBufferedRandom_Type
- Modules/_io/bufferedio.c: PyBufferedReader_Type
- Modules/_io/bufferedio.c: PyBufferedWriter_Type
- Modules/_io/bytesio.c: PyBytesIO_Type
- Modules/_io/bytesio.c: _PyBytesIOBuffer_Type
- Modules/_io/fileio.c: PyFileIO_Type
- Modules/_io/iobase.c: PyIOBase_Type
- Modules/_io/iobase.c: PyRawIOBase_Type
- Modules/_io/textio.c: PyIncrementalNewlineDecoder_Type
- Modules/_io/textio.c: PyTextIOBase_Type
- Modules/_io/textio.c: PyTextIOWrapper_Type
- Modules/_io/winconsoleio.c: PyWindowsConsoleIO_Type
Converting the static types to heap types involves applying PEP-687 to _io
.
Adapting multi-phase init involves applying PEP-489 to _io
.
Linked PRs
- gh-101819: Remove _PyWindowsConsoleIO_Type from the Windows DLL #101904
- gh-101819: Remove _testcapi dependencies on specific _io symbols #101918
- gh-101819: Isolate _io #101948
- gh-101819: Adapt _io types to heap types, batch 1 #101949
- gh-101819: Prepare to modernize the _io extension #104178
- gh-101819: Adapt _io.PyWindowsConsoleIO_Type to heap type #104197
- gh-101819: Remove unused 'locale_module' from _io state #104246
- gh-101819: Port _io.PyIncrementalNewlineDecoder_Type to heap type #104249
- gh-101819: Port _io.PyBytesIOBuffer_Type to heap type #104264
- gh-101819: Refactor _io in preparation for module isolation #104334
- gh-101819: Harden _io init #104352
- gh-101819: Clean up _io windows console io after gh-104197 #104354
- gh-101819: Adapt _io._BufferedIOBase_Type methods to Argument Clinic #104355
- gh-101819: Adapt _io._Buffered* methods to Argument Clinic #104367
- gh-101819: Refactor _io futher in preparation for module isolation #104369
- gh-101819: Explicitly disallow pickle protocols 0 and 1 in _io #104370
- gh-101819: Adapt _io.TextIOBase methods to Argument Clinic #104383
- gh-101819: Adapt _io.IOBase.seek and _io.IOBase.truncate to Argument Clinic #104384
- gh-101819: Prepare _io._IOBase for module state #104386
- gh-101819: Fix inverted debug preprocessor check in winconsoleio.c #104388
- gh-101819: Fix _io clinic input for unused base class method stubs #104418
Metadata
Metadata
Assignees
Projects
Status
Done