We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_datetimemodule.c
1 parent 1f481fd commit 34f9b3eCopy full SHA for 34f9b3e
Modules/_datetimemodule.c
@@ -6972,10 +6972,13 @@ _datetime_exec(PyObject *module)
6972
} while (0)
6973
6974
PyTypeObject *PyDateTime_IsoCalendarDateType = NULL;
6975
- CREATE_TYPE(PyDateTime_IsoCalendarDateType, &isocal_spec, &PyTuple_Type);
+ datetime_state *st = get_datetime_state();
6976
+
6977
+ if (!st->initialized) {
6978
+ CREATE_TYPE(PyDateTime_IsoCalendarDateType, &isocal_spec, &PyTuple_Type);
6979
+ }
6980
#undef CREATE_TYPE
6981
- datetime_state *st = get_datetime_state();
6982
if (init_state(st, PyDateTime_IsoCalendarDateType) < 0) {
6983
goto error;
6984
}
0 commit comments