diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-05-27 23:44:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-27 23:44:21 (GMT) |
commit | a3568417c49f36860393075b21c93996a5f6799b (patch) | |
tree | 14c6fba772dcbbb737a9bad981640613c757efbd /Misc | |
parent | df9b032f47e4edaf306d95449370e565ee470018 (diff) | |
download | cpython-a3568417c49f36860393075b21c93996a5f6799b.zip cpython-a3568417c49f36860393075b21c93996a5f6799b.tar.gz cpython-a3568417c49f36860393075b21c93996a5f6799b.tar.bz2 |
bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601)
Fix destructor _pyio.BytesIO and _pyio.TextIOWrapper: initialize
their _buffer attribute as soon as possible (in the class body),
because it's used by __del__() which calls close().
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Library/2019-05-28-01-06-44.bpo-37054.sLULGQ.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2019-05-28-01-06-44.bpo-37054.sLULGQ.rst b/Misc/NEWS.d/next/Library/2019-05-28-01-06-44.bpo-37054.sLULGQ.rst new file mode 100644 index 0000000..9a2433a --- /dev/null +++ b/Misc/NEWS.d/next/Library/2019-05-28-01-06-44.bpo-37054.sLULGQ.rst @@ -0,0 +1,3 @@ +Fix destructor :class:`_pyio.BytesIO` and :class:`_pyio.TextIOWrapper`: +initialize their ``_buffer`` attribute as soon as possible (in the class +body), because it's used by ``__del__()`` which calls ``close()``. |