Repository navigation
Conversation
This branch has not been deployed
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.
The pure-Python
Unpackerloses alist_hookcallback's mapping values whenuse_list=False. It calls the hook with a list, then converts the hook's return value to a tuple. A hook returning{"items": items}therefore produces('items',)instead of preserving the mapping.Convert the decoded array to a tuple before calling the hook, then return the callback result unchanged. This supplies tuple input for
use_list=Falseand preserves the callback's result, matching the native implementation.use_list=Truecontinues to supply list input. The regression coversunpackb, feed-based and file-backedUnpacker, and decoding a following streamed object.Validation on macOS arm64:
('items',)instead of{'items': (1, 2)}, then passes with the fix on both backends.git diff --checkpassed.Local coverage is limited to macOS and CPython 3.10/3.13 (native coverage on 3.13 only). PyPy, other platforms, and hosted CI have not been verified. Skipped tests are excluded from the passed counts.
AI assistance was used to prepare the implementation and regression tests.