This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: import_init() should not use Py_FatalError() but return an error
Type: enhancement Stage:
Components: Versions: Python 3.5
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, brett.cannon, ncoghlan, vstinner
Priority: normal Keywords:

Created on 2013-07-19 21:39 by vstinner, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (3)
msg193377 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-07-19 21:39
The import_init() function calls Py_FatalError() at any error. This is not kind for Py_NewInterpreter() which calls import_init(): Py_NewInterpreter() exits Python with a fatal error, instead of returning NULL, on import_init() failure. The pyfailmalloc tool can be used to easily inject faults (memory allocation failure) to test this issue: see issue #18408.

import_init() should return an error instead of using Py_FatalError().
msg220627 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-06-15 12:25
Just making sure this hasn't slipped under the radar.
msg238418 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-03-18 11:07
This issue was more a reminder for myself (TODO list). I'm no more interested to work on the issue, so I just close it.
Date User Action Args
2022-04-11 14:57:48adminsetgithub: 62707
2015-03-18 11:07:14vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg238418
2014-06-15 12:25:50BreamoreBoysetnosy: + BreamoreBoy

messages: + msg220627
versions: + Python 3.5, - Python 3.4
2013-07-19 21:39:11vstinnercreate