mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-108082: Remove _PyErr_WriteUnraisableMsg() (GH-111643)
Replace the remaining calls with PyErr_FormatUnraisable().
This commit is contained in:
parent
0d3df272fb
commit
26c0e5e03a
13 changed files with 85 additions and 147 deletions
|
@ -289,7 +289,7 @@ def test_excepthook():
|
|||
|
||||
|
||||
def test_unraisablehook():
|
||||
from _testinternalcapi import write_unraisable_exc
|
||||
from _testcapi import err_formatunraisable
|
||||
|
||||
def unraisablehook(hookargs):
|
||||
pass
|
||||
|
@ -302,7 +302,8 @@ def test_unraisablehook():
|
|||
|
||||
sys.addaudithook(hook)
|
||||
sys.unraisablehook = unraisablehook
|
||||
write_unraisable_exc(RuntimeError("nonfatal-error"), "for audit hook test", None)
|
||||
err_formatunraisable(RuntimeError("nonfatal-error"),
|
||||
"Exception ignored for audit hook test")
|
||||
|
||||
|
||||
def test_winreg():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue