Repository navigation
Serialize ints below -2**31 through the long path; add serializer property tests - #444
Open
RonnyPfannschmidt wants to merge 5 commits into
Open
RonnyPfannschmidt wants to merge 5 commits into
RonnyPfannschmidt wants to merge 5 commits into
Conversation
…perty tests
_save_integral only checked the upper int32 bound, so ints below -2**31
reached struct.pack("!i") and raised a bare struct.error instead of
taking the LONGINT/LONGLONG path like large positive ints. Check both
bounds. The wire format is unchanged (load_longint parses the decimal
string, sign included), so older receivers read the output.
Tests:
- collapse the near-identical per-type cross-interpreter tests in
test_serializer.py into one expectation table, adding int32 boundary
and large negative rows
- add hypothesis roundtrip tests over nested builtin values, comparing
exact types and float bit patterns; without the fix it shrinks to
-2147483649
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014GZsRDQkuvszcFpTy6M5bE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GZsRDQkuvszcFpTy6M5bE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GZsRDQkuvszcFpTy6M5bE
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GZsRDQkuvszcFpTy6M5bE
test_remote_exec_module_is_removed imported `remote` from tmp_path and then deleted the directory. The module stayed in sys.modules, so later parametrizations got the stale module back. It only passed because pytest before 9.2 reused the deleted tmp_path name, which made the stale __file__ valid again. Since pytest 9.2 hands out a new number, later cases fail with "could not get source code". Load the files with importlib without registering them in sys.modules or touching sys.path, assert the module's __file__ is this test's path, and check the full path in the traceback test, which had the same latent staleness. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GZsRDQkuvszcFpTy6M5bE
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.
Requested by Ronny · project thread
🤖 Written by Claude Opus 5.5 via Claude Code for the execnet maintainers; I prompted it, it did the work, I read it.
_save_integralonly checked the upper int32 bound, soexecnet.dumps(-2**40)raisedstruct.error. Both bounds are now checked; the wire format is unchanged.Tests: the copied per-type serializer tests become one expectation table, and a new hypothesis roundtrip test compares exact types (it shrinks to
-2147483649without the fix). The remote_exec module tests now load their files fresh instead of importing them; they relied on a stalesys.modulesentry that pytest 9.2's newtmp_pathnumbering exposed.🤖 Generated with Claude Code
https://claude.ai/code/session_014GZsRDQkuvszcFpTy6M5bE