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.
1 parent bfab79f commit 501c3e9Copy full SHA for 501c3e9
Modules/_testcapi/datetime.c
@@ -3,23 +3,11 @@
3
#include "datetime.h" // PyDateTimeAPI
4
5
6
-static int test_run_counter = 0;
7
-
8
static PyObject *
9
test_datetime_capi(PyObject *self, PyObject *args)
10
{
11
- if (PyDateTimeAPI) {
12
- if (test_run_counter) {
13
- /* Probably regrtest.py -R */
14
- Py_RETURN_NONE;
15
- }
16
- else {
17
- PyErr_SetString(PyExc_AssertionError,
18
- "PyDateTime_CAPI somehow initialized");
19
- return NULL;
20
21
22
- test_run_counter++;
+ // PyDateTimeAPI cannot be carried over
+ // with multi-phase init enabled.
23
PyDateTime_IMPORT;
24
25
if (PyDateTimeAPI) {
0 commit comments