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 /Misc/NEWS.d/next | |
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 'Misc/NEWS.d/next')
-rw-r--r-- | Misc/NEWS.d/next/Library/2024-06-07-11-23-31.gh-issue-71587.IjFajE.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2024-06-07-11-23-31.gh-issue-71587.IjFajE.rst b/Misc/NEWS.d/next/Library/2024-06-07-11-23-31.gh-issue-71587.IjFajE.rst new file mode 100644 index 0000000..50a6629 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-06-07-11-23-31.gh-issue-71587.IjFajE.rst @@ -0,0 +1,2 @@ +Fix crash in C version of :meth:`datetime.datetime.strptime` when called again +on the restarted interpreter. |