Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Jan 27, 2020

If PyModule_Create2() is called when the Python import machinery is
not initialized, it now raises a SystemError and returns NULL,
instead of calling Py_FatalError() which aborts the process.

The caller must be prepared to handle NULL anyway.

https://bugs.python.org/issue38631

If PyModule_Create2() is called when the Python import machinery is
not initialized, it now raises a SystemError and returns NULL,
instead of calling Py_FatalError() which aborts the process.

The caller must be prepared to handle NULL anyway.
@vstinner vstinner merged commit a94c6b6 into python:master Jan 27, 2020
@vstinner vstinner deleted the pymodule_create2 branch January 27, 2020 21:37
shihai1991 pushed a commit to shihai1991/cpython that referenced this pull request Jan 31, 2020
If PyModule_Create2() is called when the Python import machinery is
not initialized, it now raises a SystemError and returns NULL,
instead of calling Py_FatalError() which aborts the process.

The caller must be prepared to handle NULL anyway.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants