Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ZackerySpytz
Copy link
Contributor

@ZackerySpytz ZackerySpytz commented Jun 23, 2018

.pyc files were kept open longer than necessary.

https://bugs.python.org/issue33451

.pyc files were kept open longer than necessary.
Copy link
Contributor

@ncoghlan ncoghlan left a comment

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
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
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

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 <[email protected]>
@bedevere-bot
Copy link

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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
@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