]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-39882: Py_FatalError() logs the function name (GH-18819)
authorVictor Stinner <vstinner@python.org>
Fri, 6 Mar 2020 23:54:20 +0000 (00:54 +0100)
committerGitHub <noreply@github.com>
Fri, 6 Mar 2020 23:54:20 +0000 (00:54 +0100)
commit9e5d30cc99e34f4c3e7b2cd851de20816c9d1927
tree71e726c4695b9b3b0a31d7d2516ce8ee83b52721
parent7b3c252dc7f44d4bdc4c7c82d225ebd09c78f520
bpo-39882: Py_FatalError() logs the function name (GH-18819)

The Py_FatalError() function is replaced with a macro which logs
automatically the name of the current function, unless the
Py_LIMITED_API macro is defined.

Changes:

* Add _Py_FatalErrorFunc() function.
* Remove the function name from the message of Py_FatalError() calls
  which included the function name.
* Update tests.
17 files changed:
Doc/c-api/sys.rst
Include/cpython/pyerrors.h
Include/pyerrors.h
Lib/test/test_capi.py
Lib/test/test_exceptions.py
Lib/test/test_faulthandler.py
Lib/test/test_io.py
Lib/test/test_sys.py
Misc/NEWS.d/next/C API/2020-03-06-23-56-04.bpo-39882.Iqhcqm.rst [new file with mode: 0644]
Objects/obmalloc.c
Parser/parser.c
Parser/tokenizer.c
Python/ceval.c
Python/import.c
Python/pathconfig.c
Python/pylifecycle.c
Python/pystate.c