New submission from STINNER Victor <vstin...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue38631>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to