Skip to content

[3.6] bpo-32176: Set CO_NOFREE in the code object constructor (GH-4675) #4684

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
merged 1 commit into from
Dec 3, 2017

Conversation

ncoghlan
Copy link
Contributor

@ncoghlan ncoghlan commented Dec 3, 2017

Previously, CO_NOFREE was set in the compiler, which meant
it could end up being set incorrectly when code objects
were created directly. Setting it in the constructor based
on freevars and cellvars ensures it is always accurate,
regardless of how the code object is defined.

(cherry picked from commit 078f181)

https://bugs.python.org/issue32176

…GH-4675)

Previously, CO_NOFREE was set in the compiler, which meant
it could end up being set incorrectly when code objects
were created directly. Setting it in the constructor based
on freevars and cellvars ensures it is always accurate,
regardless of how the code object is defined..
(cherry picked from commit 078f181)
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

Usually backporting PRs don't require additional review.

@ncoghlan
Copy link
Contributor Author

ncoghlan commented Dec 3, 2017

@serhiy-storchaka Yeah, I figured I'd just double check I hadn't accidentally messed up the conflict resolution. (It seemed straightforward enough, but I needed to wait for the CI run anyway)

@ncoghlan ncoghlan merged commit c8f32aa into python:3.6 Dec 3, 2017
@ncoghlan ncoghlan deleted the backport-078f181-3.6 branch March 30, 2018 07:52
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