gh-108082: Remove _PyErr_WriteUnraisableMsg() (GH-111643)

Replace the remaining calls with PyErr_FormatUnraisable().
This commit is contained in:
Serhiy Storchaka 2023-11-03 09:45:53 +02:00 committed by GitHub
parent 0d3df272fb
commit 26c0e5e03a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 85 additions and 147 deletions

View file

@ -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():