gh-101819: Isolate _io (#101948)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Erlend E. Aasland 2023-05-15 11:26:27 +02:00 committed by GitHub
parent 35bf0916d9
commit 186bf39f5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 208 additions and 365 deletions

View file

@ -29,9 +29,6 @@
#include "pycore_unicodeobject.h" // _PyUnicode_InitTypes()
#include "opcode.h"
extern PyStatus _PyIO_InitTypes(PyInterpreterState *interp);
extern void _PyIO_FiniTypes(PyInterpreterState *interp);
#include <locale.h> // setlocale()
#include <stdlib.h> // getenv()
@ -706,11 +703,6 @@ pycore_init_types(PyInterpreterState *interp)
return _PyStatus_ERR("failed to initialize an exception type");
}
status = _PyIO_InitTypes(interp);
if (_PyStatus_EXCEPTION(status)) {
return status;
}
status = _PyExc_InitGlobalObjects(interp);
if (_PyStatus_EXCEPTION(status)) {
return status;
@ -1667,8 +1659,6 @@ flush_std_files(void)
static void
finalize_interp_types(PyInterpreterState *interp)
{
_PyIO_FiniTypes(interp);
_PyUnicode_FiniTypes(interp);
_PySys_FiniTypes(interp);
_PyExc_Fini(interp);