Repository navigation
Conversation
struct.unpack and unpack_from read bytes only, so a memoryview, a bytearray or an array was refused with "a buffer is required" (struct_endian). They now read any buffer through python-buffer-bytes, and anything else is CPython's TypeError, "a bytes-like object is required, not 'str'". sys1 asks whether sys.implementation.name is 'cpython' or 'micropython'. x-python reporting its own name conforms, so gen-specs.py gains an ADAPTED table that widens that check to take 'x-python'. CPython answers the widened check as before, so its run stays the oracle, and each adaptation is listed in SKIPPED.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Conformance:
struct_endianandsys1.python/struct.x):unpackandunpack_fromtook bytes only, so a memoryview, bytearray or array was refused with "a buffer is required". They now read any buffer throughpython-buffer-bytes. Anything else raises CPython's TypeError,a bytes-like object is required, not 'str'.tests/specs/99-struct.spec.mdgains a case covering each buffer kind and the refusal.tools/conformance/gen-specs.py): the case checkssys.implementation.name in ('cpython', 'micropython'). x-python reporting its own name conforms, so a newADAPTEDtable widens that check to take'x-python'. Only the case's source changes: CPython answers the widened check as before, so its run stays the oracle. Each adaptation is listed under "adapted" inSKIPPED.md, and the generator stops if an adapted text is no longer in its file.class_store_class, the third case looked at, already passes on v0.59.0.Tests: the full suite passes locally on x-lang v0.59.0.
struct_endianand the regeneratedsys1pass. Regenerating basics gives the same 532 cases.🤖 Generated with Claude Code