diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-06-12 17:15:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-12 17:15:16 (GMT) |
commit | 0041087aa12044223103c7b8a3ca07d896652ab9 (patch) | |
tree | 4be4723449a1658a18a46177c6954a124692ea63 /Tools | |
parent | 8e5caa72c2556c4ba1fb90dfc6593bb848a6c116 (diff) | |
download | cpython-0041087aa12044223103c7b8a3ca07d896652ab9.zip cpython-0041087aa12044223103c7b8a3ca07d896652ab9.tar.gz cpython-0041087aa12044223103c7b8a3ca07d896652ab9.tar.bz2 |
[3.13] gh-71587: Drop local reference cache to `_strptime` module in `_datetime` (gh-120424)
The _strptime module object was cached in a static local variable (in the datetime.strptime() implementation). That's a problem when it crosses isolation boundaries, such as reinitializing the runtme or between interpreters. This change fixes the problem by dropping the static variable, instead always relying on the normal sys.modules cache (via PyImport_Import()).
(cherry picked from commit 127c1d2771749853e287632c086b6054212bf12a, AKA gh-120224)
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/c-analyzer/cpython/globals-to-fix.tsv | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/Tools/c-analyzer/cpython/globals-to-fix.tsv b/Tools/c-analyzer/cpython/globals-to-fix.tsv index aeb7cad..06e58e9 100644 --- a/Tools/c-analyzer/cpython/globals-to-fix.tsv +++ b/Tools/c-analyzer/cpython/globals-to-fix.tsv @@ -434,7 +434,6 @@ Modules/_ctypes/_ctypes.c CreateSwappedType swapped_suffix - Modules/_ctypes/_ctypes.c - _unpickle - Modules/_ctypes/_ctypes.c PyCArrayType_from_ctype array_cache - Modules/_cursesmodule.c - ModDict - -Modules/_datetimemodule.c datetime_strptime module - ## state Modules/_ctypes/_ctypes.c - _ctypes_ptrtype_cache - |