Skip to content

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

Merged
ncoghlan merged 1 commit into
python:3.6from
ncoghlan:backport-078f181-3.6
Dec 3, 2017
Merged

[3.6] bpo-32176: Set CO_NOFREE in the code object constructor (GH-4675)#4684
ncoghlan merged 1 commit into
python:3.6from
ncoghlan:backport-078f181-3.6

Conversation

@ncoghlan

@ncoghlan ncoghlan commented Dec 3, 2017

Copy link
Copy Markdown
Contributor

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)

@serhiy-storchaka serhiy-storchaka 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.

Usually backporting PRs don't require additional review.

@ncoghlan

ncoghlan commented Dec 3, 2017

Copy link
Copy Markdown
Contributor Author

@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