]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601)
authorVictor Stinner <vstinner@redhat.com>
Mon, 27 May 2019 23:44:21 +0000 (01:44 +0200)
committerGitHub <noreply@github.com>
Mon, 27 May 2019 23:44:21 +0000 (01:44 +0200)
commita3568417c49f36860393075b21c93996a5f6799b
tree14c6fba772dcbbb737a9bad981640613c757efbd
parentdf9b032f47e4edaf306d95449370e565ee470018
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().
Lib/_pyio.py
Misc/NEWS.d/next/Library/2019-05-28-01-06-44.bpo-37054.sLULGQ.rst [new file with mode: 0644]