mirror of
https://github.com/python/cpython.git
synced 2026-05-07 05:01:13 -04:00
a10960699a
`_datetime` is a special module, because it's the only non-builtin C extension that contains static types. As such, it would initialize static types in the module's execution function, which can run concurrently. Since static type initialization is not thread-safe, this caused crashes. This fixes it by moving the initialization of `_datetime`'s static types to interpreter startup (where all other static types are initialized), which is already properly protected through other locks.
Miscellaneous source files for the main Python shared library