[New-bugs-announce] [issue38631] Replace Py_FatalError() with regular Python exceptions

STINNER Victor report at bugs.python.org
Tue Oct 29 08:38:55 EDT 2019


New submission from STINNER Victor <vstinner at python.org>:

I replaced dozens of Py_FatalError() calls with better error reporting, but there are still many places calling Py_FatalError().

The problem of Py_FatalError() is when Python is embedded into an application: Python must not kill the whole process.

Well, even in the "regular" Python (/usr/bin/python3), Python should not exit immediately on an error.

For example, the readline module calls Py_FatalError() on memory allocation failure, whereas PyErr_NoMemory() could be used: PyErr_NoMemory() should work since it should not allocate memory.

----------
components: Interpreter Core
messages: 355651
nosy: vstinner
priority: normal
severity: normal
status: open
title: Replace Py_FatalError() with regular Python exceptions
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38631>
_______________________________________


More information about the New-bugs-announce mailing list