Skip to content

bpo-33451: Close .pyc files before calling PyEval_EvalCode()#7884

Merged
ncoghlan merged 2 commits into
python:masterfrom
ZackerySpytz:bpo-33451-close-pyc-before-evaluating
Jun 24, 2018
Merged

bpo-33451: Close .pyc files before calling PyEval_EvalCode()#7884
ncoghlan merged 2 commits into
python:masterfrom
ZackerySpytz:bpo-33451-close-pyc-before-evaluating

Conversation

@ZackerySpytz

@ZackerySpytz ZackerySpytz commented Jun 23, 2018

Copy link
Copy Markdown
Contributor

.pyc files were kept open longer than necessary.

https://bugs.python.org/issue33451

.pyc files were kept open longer than necessary.

@ncoghlan ncoghlan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM (I explicitly checked that run_pyc_file is a private helper function inside pythonrun.c, so there's no externally visible change in behaviour other than the intended one of closing the pyc file before we start executing the code)

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @ZackerySpytz for the PR, and @ncoghlan for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @ZackerySpytz for the PR, and @ncoghlan for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-7888 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 24, 2018
…-7884)

Directly executed pyc files were being kept open longer than necessary.
(cherry picked from commit ea73775)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

GH-7889 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 24, 2018
…-7884)

Directly executed pyc files were being kept open longer than necessary.
(cherry picked from commit ea73775)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
miss-islington added a commit that referenced this pull request Jun 24, 2018
Directly executed pyc files were being kept open longer than necessary.
(cherry picked from commit ea73775)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
miss-islington added a commit that referenced this pull request Jun 24, 2018
Directly executed pyc files were being kept open longer than necessary.
(cherry picked from commit ea73775)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
@ZackerySpytz ZackerySpytz deleted the bpo-33451-close-pyc-before-evaluating branch June 25, 2018 12:23
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.

5 participants