Repository navigation
Align integer conversion and byte controls - #9702
Draft
youknowdot wants to merge 1 commit into
Draft
youknowdot wants to merge 1 commit into
youknowdot wants to merge 1 commit into
Conversation
Assisted-by: OpenAI Codex:model version not exposed
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
Align integer conversions and byte controls with CPython 3.15 in 427 changed production Rust lines across five files.
int.from_bytesandint.to_bytes, then perform length, byteorder type, signed truth and byteorder value checks in the native order. Keep raw controls alive through conversion and result construction, and share reverse-parameter cleanup on success and body-level errors.from_bytes. Release temporary exports and returned bytes before integer-subclass construction.__int__/__index__result checks, normalize deprecated__int__subclass results to exact integers, and propagate warning errors.No Python, Lib, tests, expected-failure markers or workflow changes.
Reference and validation
Compared with CPython commit d220409a13b77de7a6c30abe16ea90db01528edc: integer implementation, generated argument conversions, and numeric protocols.
-D warningsremains blocked by that baseline.Native RustPython execution, full workspace/C-API runtime suites and cross-platform tests were not run. Hosted CI remains required.
Remaining boundaries
int.from_bytes('text')fallback wording and genericbytes()collection distinctions remain outside scope. Cross-thread scheduling and unrelated allocation timing are unchanged.AI-assisted implementation and independent review using OpenAI Codex; model version is not exposed.