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

@ -155,9 +155,9 @@ class ThreadRunningTests(BasicThreadTest):
started.acquire()
self.assertEqual(str(cm.unraisable.exc_value), "task failed")
self.assertIs(cm.unraisable.object, task)
self.assertIsNone(cm.unraisable.object)
self.assertEqual(cm.unraisable.err_msg,
"Exception ignored in thread started by")
f"Exception ignored in thread started by {task!r}")
self.assertIsNotNone(cm.unraisable.exc_traceback)