[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-29 Thread STINNER Victor
STINNER Victor added the comment: New changeset a6192635f1e62af2bb8a435487ebb51800edd671 by Victor Stinner in branch 'master': bpo-42979: Use _Py_CheckSlotResult() to check slots result (GH-24356) https://github.com/python/cpython/commit/a6192635f1e62af2bb8a435487ebb51800edd671 --

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-27 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23180 pull_request: https://github.com/python/cpython/pull/24356 ___ Python tracker ___

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-27 Thread Mark Shannon
Mark Shannon added the comment: New changeset c9b8e9c421b57acdcaf24fab0c93bc29b3ef7c67 by Victor Stinner in branch 'master': bpo-42979: Enhance abstract.c assertions checking slot result (GH-24352) https://github.com/python/cpython/commit/c9b8e9c421b57acdcaf24fab0c93bc29b3ef7c67 --

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-27 Thread hai shi
hai shi added the comment: > It's already the case. Example Nice, interesting case. -- ___ Python tracker ___ ___

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset 895591c1f0bdec5ad357fe6a5fd0875990061357 by Miss Islington (bot) in branch '3.9': bpo-42979: _zoneinfo exec function checks for PyDateTime_IMPORT failure (GH-24333) (GH-24351)

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-27 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +23172 pull_request: https://github.com/python/cpython/pull/24352 ___ Python tracker ___

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-27 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the fix Hai Shi! > By the way, the import machinery should raise a SystemError if a module exec > function raises an exception *and* reports a success: see > _Py_CheckFunctionResult(). It's already the case. Example: >>> import _zoneinfo

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-27 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23171 pull_request: https://github.com/python/cpython/pull/24351 ___ Python tracker

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-27 Thread STINNER Victor
STINNER Victor added the comment: New changeset eeb701adc0fc29ba803fddf133d917ff45639a00 by Hai Shi in branch 'master': bpo-42979: _zoneinfo exec function checks for PyDateTime_IMPORT failure (GH-24333) https://github.com/python/cpython/commit/eeb701adc0fc29ba803fddf133d917ff45639a00

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-25 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +23152 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24333 ___ Python tracker ___

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-25 Thread STINNER Victor
STINNER Victor added the comment: > Why not return -1 directly when PyCapsule_Import() fails? That would work. I opened an issue since there is a bug. -- ___ Python tracker

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-23 Thread hai shi
hai shi added the comment: > If PyCapsule_Import() fails, zoneinfomodule_exec() returns 0 (success) with > an exception raised. Why not return -1 directly when PyCapsule_Import() fails? It looks like more simpler. Do I miss something? -- nosy: +shihai1991

[issue42979] _zoneinfo: zoneinfomodule_exec() doesn't check for PyDateTime_IMPORT failure

2021-01-20 Thread STINNER Victor
New submission from STINNER Victor : _zoneinfo starts with: static int zoneinfomodule_exec(PyObject *m) { PyDateTime_IMPORT; with: #define PyDateTime_CAPSULE_NAME "datetime.datetime_CAPI" #define PyDateTime_IMPORT \ PyDateTimeAPI = (PyDateTime_CAPI