-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
-
Encoding DatetimeMS objects in the BSON C API should use the _type_marker system. Currently it uses PyObject_TypeCheck which can be a problem in mod_wsgi sub interpreters as described in PYTHON-569: https://github.com/mongodb/mongo-python-driver/blob/79da64a3b186435dc96bea1f0e46eb2966c630eb/bson/_cbsonmodule.c#L863-L868
The problematic code:
} else if (PyObject_TypeCheck(value, (PyTypeObject *) state->DatetimeMS)) { long long millis; if (!millis_from_datetime_ms(value, &millis)) { return 0; } *(pymongo_buffer_get_buffer(buffer) + type_byte) = 0x09; return buffer_write_int64(buffer, (int64_t)millis);
- related to
-
PYTHON-3745 Add support for multiphase initialization
- Closed
-
PYTHON-569 Silence C extension RuntimeWarning
- Closed