Message370573
Current comment in Objects/dictobject.c:
/* We can arrive here with a NULL tstate during initialization: try
running "python -Wi" for an example related to string interning.
Let's just hope that no exception occurs then... This must be
_PyThreadState_GET() and not PyThreadState_Get() because the latter
abort Python if tstate is NULL. */
PyDict_GetItem() is no longer called before Py_Initialize(). I reworked the Python startup to no longer use Python objects before Py_Initialize(): see PEP 587 (PyConfig).
> To help C extension modules authors, I propose to keep a check at the runtime even in release build. Later, we may drop this check in release mode and only keep it in debug mode.
Hum, since the whole test pass with the change and it was not documented that it was possible to call the function with the GIL released, I changed my mind and only kept the runtime check in debug mode. |
|
Date |
User |
Action |
Args |
2020-06-01 18:56:17 | vstinner | set | recipients:
+ vstinner, ncoghlan, eric.snow |
2020-06-01 18:56:17 | vstinner | set | messageid: <1591037777.84.0.630558734724.issue40839@roundup.psfhosted.org> |
2020-06-01 18:56:17 | vstinner | link | issue40839 messages |
2020-06-01 18:56:17 | vstinner | create | |
|