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.
Summary
Keep the
PyLong_AsLong()result as Clonguntil the existing datetime/UUID/parse mode range checks finish. On LP64, narrowing it tointfirst lets values such as2**32or-(2**32)turn into a valid zero mode. The shared datetime validator now also takeslong.The runtime change consists of seven type substitutions; it retains valid mode behavior and existing error handling/messages. Add 90 regression cases through the existing string, binary-stream and text-stream fixtures, and a changelog entry. The unchanged Linux master fails 66 of those cases; the patched source passes all 90. On Windows the unchanged source already rejects them, so the new cases also pass before the patch.
Validation
stubtest rapidjsonpasses on Windows Python 3.12 and Linux Python 3.12/3.14.NM_NATIVElarge-integer float-representation example (268/269 pass on 3.12, 273/274 on 3.14); its cause remains unverified.LDCXXSHAREDoverride because this environment has no system C++ compiler and Zig rejects this Python build's default--exclude-libsflag.Hosted CI, debug Python, sanitizers, macOS and other wheel architectures are unverified. AI assistance was used for investigation, tests, implementation and review. This was found by source inspection, not a reported production incident.
Closes #247
GitHub Actions run 38505857785 currently has
action_required: this first fork contribution awaits maintainer approval to run. CI is not yet verified.