compat: move check for closure cellvar update wrapper function #1092
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This sanity checking code ended up getting decoupled from the old implementation in a18b395 when a new, much simpler method was added. This check can fail spuriously in certain environments where it doesn't even need to be run because the newer approach is used.
This is noticeable when using python scripts compiled by nuitka. Since next-gen
attrs
uses slots on everything by default, the use of this fixup function is now pervasive, as well.Here's the simplest reproduction I came up with (tested on Python 3.10.9 and nuitka 1.4)
Because
nuitka
compiles the python code to C, I guess it loses the introspection through the__code__
attribute, which is why the sanity check causes a problem. Fortunately, that's apparently entirely unneeded with any python version 3.8 or above.(Annotated) Pull Request Check List
changelog.d
.