mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-37261: Document sys.unraisablehook corner cases (GH-14059)
Document reference cycle and resurrected objects issues in sys.unraisablehook() and threading.excepthook() documentation. Fix test.support.catch_unraisable_exception(): __exit__() no longer ignores unraisable exceptions. Fix test_io test_writer_close_error_on_close(): use a second catch_unraisable_exception() to catch the BufferedWriter unraisable exception.
This commit is contained in:
parent
9765efcb39
commit
212646cae6
5 changed files with 30 additions and 23 deletions
|
@ -2072,8 +2072,12 @@ class BufferedRWPairTest(unittest.TestCase):
|
|||
writer.close = lambda: None
|
||||
writer = None
|
||||
|
||||
# Ignore BufferedWriter (of the BufferedRWPair) unraisable exception
|
||||
with support.catch_unraisable_exception():
|
||||
pair = None
|
||||
# Ignore BufferedRWPair unraisable exception
|
||||
with support.catch_unraisable_exception():
|
||||
pair = None
|
||||
support.gc_collect()
|
||||
support.gc_collect()
|
||||
|
||||
def test_reader_writer_close_error_on_close(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue