Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I am opening this PR to fix expanded calls inside generator expressions in pycdc. The code below fails to decompile correctly from Python 3.13 and 3.14 bytecode and succeeds with this change:
The same stack distinction applies to
factory(*row)andfactory(*args, **kwargs): an absent keyword mapping is a NULL marker, not another source argument. The generator expression simulator decides whether to pop the keyword slot solely from the low flag bit ofCALL_FUNCTION_EX. The 3.14 convention has a slot even when it represents no mapping. The fix consumes the slot for that convention and omits its NULL marker from the AST, keeping the callable and positional iterable in their actual positions.The adjacent callable/NULL check also needs its version boundary corrected. CPython changes the callable/NULL ordering in 3.13, while the unconditional keyword slot begins in 3.14. These are separate version checks: older interpreters retain their flag-dependent keyword slot. The layouts are defined in CPython's 3.12 implementation, 3.13 implementation, and 3.14 implementation.
docs/LIMITATIONS.mdnow distinguishes these working simple expanded calls from the remaining nested-comprehension stack issues.