Skip to content

[3.7] bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601)#13604

Merged
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-a356841-3.7
May 28, 2019
Merged

[3.7] bpo-37054, _pyio: Fix BytesIO and TextIOWrapper __del__() (GH-13601)#13604
miss-islington merged 1 commit into
python:3.7from
miss-islington:backport-a356841-3.7

Conversation

@miss-islington

@miss-islington miss-islington commented May 27, 2019

Copy link
Copy Markdown
Contributor

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().
(cherry picked from commit a356841)

Co-authored-by: Victor Stinner vstinner@redhat.com

https://bugs.python.org/issue37054

…3601)

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().
(cherry picked from commit a356841)

Co-authored-by: Victor Stinner <vstinner@redhat.com>

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, good bot.

@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit 0f352d4 into python:3.7 May 28, 2019
@miss-islington miss-islington deleted the backport-a356841-3.7 branch May 28, 2019 00:05
@miss-islington

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a success ✅ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants