From 3d4833488a173c16446c3f94f58f05e2d13c5dee Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 22 Nov 2019 12:27:50 +0100 Subject: bpo-38858: Call _PyUnicode_Fini() in Py_EndInterpreter() (GH-17330) Py_EndInterpreter() now clears the filesystem codec. --- Python/pylifecycle.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Python') diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 8c508e3380..5f3c49a680 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -1182,9 +1182,6 @@ finalize_interp_types(PyThreadState *tstate, int is_main_interp) _PySet_Fini(); _PyBytes_Fini(); _PyLong_Fini(); - } - - if (is_main_interp) { _PyFloat_Fini(); _PyDict_Fini(); _PySlice_Fini(); @@ -1197,9 +1194,12 @@ finalize_interp_types(PyThreadState *tstate, int is_main_interp) _PyArg_Fini(); _PyAsyncGen_Fini(); _PyContext_Fini(); + } + + /* Cleanup Unicode implementation */ + _PyUnicode_Fini(tstate); - /* Cleanup Unicode implementation */ - _PyUnicode_Fini(); + if (is_main_interp) { _Py_ClearFileSystemEncoding(); } } -- cgit v1.2.1