…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)
There was a problem hiding this comment.
Usually backporting PRs don't require additional review.
|
@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) |
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