Commit 7719eef
authored
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 127c1d2, AKA gh-120224)
1 parent eff0553 commit 7719eef
File tree
3 files changed
+9
-8
lines changed- Misc/NEWS.d/next/Library
- Modules
- Tools/c-analyzer/cpython
3 files changed
+9
-8
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5209 | 5209 | | |
5210 | 5210 | | |
5211 | 5211 | | |
5212 | | - | |
5213 | | - | |
| 5212 | + | |
5214 | 5213 | | |
5215 | 5214 | | |
5216 | 5215 | | |
5217 | 5216 | | |
| 5217 | + | |
5218 | 5218 | | |
5219 | | - | |
5220 | | - | |
5221 | | - | |
| 5219 | + | |
5222 | 5220 | | |
5223 | | - | |
5224 | | - | |
| 5221 | + | |
| 5222 | + | |
| 5223 | + | |
| 5224 | + | |
5225 | 5225 | | |
5226 | 5226 | | |
5227 | 5227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
426 | 425 | | |
427 | 426 | | |
428 | 427 | | |
| |||
0 commit comments