mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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.
This commit is contained in:
parent
7b3c252dc7
commit
9e5d30cc99
17 changed files with 112 additions and 69 deletions
|
@ -1078,8 +1078,9 @@ class ExceptionTests(unittest.TestCase):
|
|||
"""
|
||||
with SuppressCrashReport():
|
||||
rc, out, err = script_helper.assert_python_failure("-c", code)
|
||||
self.assertIn(b'Fatal Python error: Cannot recover from '
|
||||
b'MemoryErrors while normalizing exceptions.', err)
|
||||
self.assertIn(b'Fatal Python error: _PyErr_NormalizeException: '
|
||||
b'Cannot recover from MemoryErrors while '
|
||||
b'normalizing exceptions.', err)
|
||||
|
||||
@cpython_only
|
||||
def test_MemoryError(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue