diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-05-15 19:59:26 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 19:59:26 (GMT) |
commit | 26baa747c2ebc2beeff769bb07b5fb5a51ad5f4b (patch) | |
tree | e54b52c2c950d59a20f4b0658d8eb2af3adec246 /Python/_warnings.c | |
parent | cb88ae635e96d7020ba6187bcfd45ace4dcd8395 (diff) | |
download | cpython-26baa747c2ebc2beeff769bb07b5fb5a51ad5f4b.zip cpython-26baa747c2ebc2beeff769bb07b5fb5a51ad5f4b.tar.gz cpython-26baa747c2ebc2beeff769bb07b5fb5a51ad5f4b.tar.bz2 |
gh-104341: Adjust tstate_must_exit() to Respect Interpreter Finalization (gh-104437)
With the move to a per-interpreter GIL, this check slipped through the cracks.
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 5644db9..dec6586 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -198,7 +198,7 @@ get_warnings_attr(PyInterpreterState *interp, PyObject *attr, int try_import) PyObject *warnings_module, *obj; /* don't try to import after the start of the Python finallization */ - if (try_import && !_Py_IsFinalizing()) { + if (try_import && !_Py_IsInterpreterFinalizing(interp)) { warnings_module = PyImport_Import(&_Py_ID(warnings)); if (warnings_module == NULL) { /* Fallback to the C implementation if we cannot get |