mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
[3.12] gh-71587: Drop local reference cache to _strptime module in _datetime (gh-120431)
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 127c1d2771, AKA gh-120224)
This commit is contained in:
parent
eff055340f
commit
7719eefcce
3 changed files with 9 additions and 8 deletions
|
|
@ -422,7 +422,6 @@ Modules/_ctypes/_ctypes.c CreateSwappedType suffix -
|
|||
Modules/_ctypes/_ctypes.c - _unpickle -
|
||||
Modules/_ctypes/_ctypes.c PyCArrayType_from_ctype cache -
|
||||
Modules/_cursesmodule.c - ModDict -
|
||||
Modules/_datetimemodule.c datetime_strptime module -
|
||||
Modules/_datetimemodule.c - PyDateTime_TimeZone_UTC -
|
||||
Modules/_datetimemodule.c - PyDateTime_Epoch -
|
||||
Modules/_datetimemodule.c - us_per_ms -
|
||||
|
|
|
|||
|
Can't render this file because it has a wrong number of fields in line 4.
|
Loading…
Add table
Add a link
Reference in a new issue