René's URL Explorer Experiment


Title: Align integer conversion and byte controls by youknowdot · Pull Request #9702 · RustPython/RustPython · GitHub

Open Graph Title: Align integer conversion and byte controls by youknowdot · Pull Request #9702 · RustPython/RustPython

X Title: Align integer conversion and byte controls by youknowdot · Pull Request #9702 · RustPython/RustPython

Description: Summary Align integer conversions and byte controls with CPython 3.15 in 427 changed production Rust lines across five files. Retain derived argument binding for int.from_bytes and int.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. Use the exact bytes fast path, SIMPLE buffer acquisition and existing bytes/iterable fallback in from_bytes. Release temporary exports and returned bytes before integer-subclass construction. Share literal parsing and canonical bytes diagnostics between implicit and explicit-base integer construction. Preserve string repr callbacks, truncate repr by code points, and retain surrogate text. Share __int__/__index__ result checks, normalize deprecated __int__ subclass results to exact integers, and propagate warning errors. Reuse the same strict ssize helper as #9701 and lossless warning helper as #9700. These are identical shared helpers, not new per-method parsers. 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. 332 bounded reference assertions plus 11 conversion/lifetime controls and nine independent destruction-order cases. These are CPython/source checks, not RustPython runtime execution. Independent source review corrected early raw-argument release and declaration-order cleanup before publication. Separate source-composition review preserves numeric normalization, lossless qualified names and exactly one shared helper with #9697, #9700 and #9701. Textual conflicts require retaining both PyObject/PyComplex imports and the shared integer result checks; the combined peer composition was not compiled. Focused host-env/VM/stdlib threading cargo check, normal all-targets Clippy, formatting, diff checks and ordinary commit hooks passed. Four Clippy diagnostics match unchanged main: one POSIX needless-collect and three ElementTree lints. No warning suppression; strict -D warnings remains 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 Cleanup follows canonical parameter order. Arbitrarily reordered keyword evaluation and errors during the shared binder itself retain existing binder-level lifetime differences; no full call-stack finalizer parity is claimed. Surrogate-qualified type names depend on the underlying helper migration in #9700. This PR's formatting accepts both current and migrated helper types. Existing int.from_bytes('text') fallback wording and generic bytes() 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. Summary by CodeRabbit Bug Fixes Improved integer conversion from strings, bytes, bytearrays, and other bytes-like values, including more consistent handling of buffer inputs. Improved validation of int.from_bytes() and int.to_bytes() arguments, including the order in which invalid values are reported. int.from_bytes() now checks that values returned by __bytes__ are bytes. Limited long input details in integer-conversion errors to 200 characters or bytes. Strict integer subclasses returned by int() or index() now produce a deprecation warning.

Open Graph Description: Summary Align integer conversions and byte controls with CPython 3.15 in 427 changed production Rust lines across five files. Retain derived argument binding for int.from_bytes and int.to_bytes, t...

X Description: Summary Align integer conversions and byte controls with CPython 3.15 in 427 changed production Rust lines across five files. Retain derived argument binding for int.from_bytes and int.to_bytes, t...

Opengraph URL: https://github.com/RustPython/RustPython/pull/9702

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:fc9e0a6d-b351-af08-78e8-ba0bb67dfb35
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9B74:157C65:31C7FA9:4266668:6B01F3A1
html-safe-noncec3deeebdda4d72a8edc9e531aa5a6ebff28fd6ed1b6d37083bb2f1e3169415fa
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Qjc0OjE1N0M2NTozMUM3RkE5OjQyNjY2Njg6NkIwMUYzQTEiLCJ2aXNpdG9yX2lkIjoiNzI5NTIyNjA5NTUwOTU2NjM3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7152c1f4bf71aad385e1d295e822a50e280b124e03303ac165a03abbdda72ef0
hovercard-subject-tagpull_request:5154363359
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9702/files
twitter:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/336763669?s=400&v=4
og:image:altSummary Align integer conversions and byte controls with CPython 3.15 in 427 changed production Rust lines across five files. Retain derived argument binding for int.from_bytes and int.to_bytes, t...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git
octolytics-dimension-user_id39710557
octolytics-dimension-user_loginRustPython
octolytics-dimension-repository_id135201145
octolytics-dimension-repository_nwoRustPython/RustPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id135201145
octolytics-dimension-repository_network_root_nwoRustPython/RustPython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/9702/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9702%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9702%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=RustPython%2FRustPython
Reloadhttps://github.com/RustPython/RustPython/pull/9702/files
Reloadhttps://github.com/RustPython/RustPython/pull/9702/files
Reloadhttps://github.com/RustPython/RustPython/pull/9702/files
RustPythonhttps://github.com/RustPython
RustPythonhttps://github.com/RustPython/RustPython
Codehttps://github.com/RustPython/RustPython
Issues195 (195)https://github.com/RustPython/RustPython/issues
Pull requests133 (133)https://github.com/RustPython/RustPython/pulls
Discussionshttps://github.com/RustPython/RustPython/discussions
Actionshttps://github.com/RustPython/RustPython/actions
Projectshttps://github.com/RustPython/RustPython/projects
Wikihttps://github.com/RustPython/RustPython/wiki
Security and qualityhttps://github.com/RustPython/RustPython/security
Insightshttps://github.com/RustPython/RustPython/insights
Sign up for GitHub https://github.com/signup?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FRustPython%2FRustPython%2Fissues%2Fnew%2Fchoose
youknowonehttps://github.com/youknowone
RustPython:mainhttps://github.com/RustPython/RustPython/tree/main
youknowdot:fix/integer-conversion-controls-20261104https://github.com/youknowdot/RustPython/tree/fix/integer-conversion-controls-20261104
Conversation 10 https://github.com/RustPython/RustPython/pull/9702
Commits 4 https://github.com/RustPython/RustPython/pull/9702/commits
Checks 19 https://github.com/RustPython/RustPython/pull/9702/checks
Files changed https://github.com/RustPython/RustPython/pull/9702/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9702/files
Align integer conversion and byte controls https://github.com/RustPython/RustPython/pull/9702/files#top
Show all changes 4 commits https://github.com/RustPython/RustPython/pull/9702/files
5eda5fa Align integer conversion and byte controls youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9702/commits/5eda5fac757488e2f7a2e712c41b3a52c091c9a4
7e9ece4 Rely on scope cleanup for redundant explicit drops codex Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9702/commits/7e9ece4459fafadc0f6253e53b928b45eaa46ff2
9fef5a3 Remove redundant byte conversion release helper codex Nov 7, 2026 https://github.com/RustPython/RustPython/pull/9702/commits/9fef5a3774f9eb4bf9887ed0c496a35ca663bedb
4bd1357 Return byte conversion results directly codex Nov 7, 2026 https://github.com/RustPython/RustPython/pull/9702/commits/4bd135786f3741f2fef06500b23c91f7ff8b0d8d
Clear filters https://github.com/RustPython/RustPython/pull/9702/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9702/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9702/files
int.rs https://github.com/RustPython/RustPython/pull/9702/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
number.rs https://github.com/RustPython/RustPython/pull/9702/files#diff-66b4fff210b902daa0770fd938ce60eac9501e55c8d8a525cf8f3afad454af0e
crates/vm/src/builtins/int.rshttps://github.com/RustPython/RustPython/pull/9702/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
View file https://github.com/youknowdot/RustPython/blob/4bd135786f3741f2fef06500b23c91f7ff8b0d8d/crates/vm/src/builtins/int.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9702/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9702/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
https://github.com/RustPython/RustPython/pull/9702/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
https://github.com/RustPython/RustPython/pull/9702/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
coderabbitaihttps://github.com/apps/coderabbitai
Nov 7, 2026https://github.com/RustPython/RustPython/pull/9702/files#r4503664248
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9702/files
https://github.com/RustPython/RustPython/pull/9702/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
https://github.com/RustPython/RustPython/pull/9702/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
youknowonehttps://github.com/youknowone
Nov 6, 2026https://github.com/RustPython/RustPython/pull/9702/files#r4492497246
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
#9563https://github.com/RustPython/RustPython/pull/9563
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9702/files
https://github.com/RustPython/RustPython/pull/9702/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9702/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9702/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.