summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-23 01:45:09 (GMT)
committerGitHub <noreply@github.com>2019-05-23 01:45:09 (GMT)
commitbc2aa816620c5e02ad8e94d8514b7e8f3f551ca1 (patch)
treebf5c847dda365eab94373bc06262d2092dd9077e /Doc/whatsnew
parent0a8e57248b913851640c64375600f05157c997df (diff)
downloadcpython-bc2aa816620c5e02ad8e94d8514b7e8f3f551ca1.zip
cpython-bc2aa816620c5e02ad8e94d8514b7e8f3f551ca1.tar.gz
cpython-bc2aa816620c5e02ad8e94d8514b7e8f3f551ca1.tar.bz2
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.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.8.rst9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst
index 8c2b40d..b91f7bc 100644
--- a/Doc/whatsnew/3.8.rst
+++ b/Doc/whatsnew/3.8.rst
@@ -318,6 +318,15 @@ for :func:`property`, :func:`classmethod`, and :func:`staticmethod`::
self.bit_rate = round(bit_rate / 1000.0, 1)
self.duration = ceil(duration)
+io
+--
+
+In development mode (:option:`-X` ``env``) and in debug build, the
+:class:`io.IOBase` finalizer now logs the exception if the ``close()`` method
+fails. The exception is ignored silently by default in release build.
+(Contributed by Victor Stinner in :issue:`18748`.)
+
+
gc
--