]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-18748: _pyio.IOBase emits unraisable exception (GH-13512)
authorVictor Stinner <vstinner@redhat.com>
Thu, 23 May 2019 01:45:09 +0000 (03:45 +0200)
committerGitHub <noreply@github.com>
Thu, 23 May 2019 01:45:09 +0000 (03:45 +0200)
commitbc2aa816620c5e02ad8e94d8514b7e8f3f551ca1
treebf5c847dda365eab94373bc06262d2092dd9077e
parent0a8e57248b913851640c64375600f05157c997df
bpo-18748: _pyio.IOBase emits unraisable exception (GH-13512)

In development (-X dev) mode and in a debug build, IOBase finalizer
of the _pyio module now logs the exception if the close() method
fails. The exception is ignored silently by default in release build.

test_io: test_error_through_destructor() now uses
support.catch_unraisable_exception() rather than capturing stderr.
Doc/whatsnew/3.8.rst
Lib/_pyio.py
Lib/test/test_io.py