René's URL Explorer Experiment


Title: Align memoryview scalar, cast, and indexing controls by youknowdot · Pull Request #9692 · RustPython/RustPython · GitHub

Open Graph Title: Align memoryview scalar, cast, and indexing controls by youknowdot · Pull Request #9692 · RustPython/RustPython

X Title: Align memoryview scalar, cast, and indexing controls by youknowdot · Pull Request #9692 · RustPython/RustPython

Description: Summary Align memoryview scalar formats, casts, indexing, assignment and comparison with CPython 3.15. Rebased onto main 22ee0b0380 through #9563 (a5d24851a5e94c81770935e6578c6081fda10705), retaining its strict shared Clinic binding and string conversion. Keep a small native memoryview scalar adapter, as CPython does, while sharing the binary format types, unpack functions, numeric converters and existing struct format cache. Text formatting for str/bytes has a different grammar and is not used for binary layouts. Use allocation-free native equality and fixed-size scalar write buffers. Borrow conversion inputs and existing memoryview descriptors instead of cloning objects or allocating a Vec per scalar write. Retain temporary arguments until the operation finishes, including their observable finalizers. Make the shared struct parser strict rather than maintaining a second comparison grammar. Match whitespace, repeat-count, NUL and native-only format validation. Share bit-exact half conversion and preserve half/complex signaling-NaN behavior. Match cast and index conversion/error ordering, saturated slice bounds, reflected comparison, tuple indexing, iterator state and overlapping assignment. Propagate multidimensional comparison failures and permit shared immutable buffer reads without recursive mutex deadlocks. Remove obsolete packing error wrappers. Add focused Rust and snippet regressions without changing existing test assertions. The included #9563 revision removes only two obsolete SQLite expected-failure decorators. Reference: CPython 3.15 memoryobject.c, struct and float packing. CI failure and rebase The previous head failed the CPython suites on Linux, macOS and Windows only because two SQLite tests unexpectedly passed while still marked expectedFailure: test_set_progress_handler_keyword_args and test_func_keyword_args. The inherited binder fixed their behavior; #9563 retires those two obsolete decorators. Memoryview and struct passed on all three OSes. The rebase preserves main's new staged CSV parser and list/tuple/slice behavior. Its shared unnamed duplicate-argument diagnostic now omits parentheses, matching CPython, without restoring parser opt-outs. Saturating index conversion is shared with the new sequence helper while preserving temporary argument lifetimes. Validation Verified locally on Linux x86_64 with CPython 3.15.0 as the reference: Release RustPython build passed with stdlib,stdio,importlib,host_env,doc,threading,sqlite and no default features. Strict workspace and separate C-API Clippy passed with -D warnings. All changed-file hooks and formatting checks passed. Ten focused snippets passed, including memoryview, argument errors, CSV, list, tuple and slice. The slice snippet ran through its normal fixture-generating pytest harness. All 698 behavioral differential cases matched CPython exactly. Relevant stdlib suites, including SQLite, CSV, memoryview, struct, list, tuple, slice and index: 3,451 tests run, 242 skipped; all 23 test files passed. CPython-only half-precision reference checks passed 255,994 assertions. Rust unit tests independently cover every half encoding and finite half rounding boundary. Full extra_tests pytest: 487 passed, 19 failed, 15 subtests passed. Failures were restricted socket/chown operations (14) and optional SSL/legacy-Unicode features omitted from this profile (5). This is not a full-suite pass. Full workspace/C-API test reruns are still pending on this rebased head. The prior revision passed 1,507 workspace tests and 149 C-API tests; those results are not substituted for the final reruns. The release-after-index char assignment intentionally retains RustPython's safety check: when an index callback releases a cast('c') view, assignment raises ValueError rather than writing through the released view as CPython currently does. Fresh hosted CI remains required. No claim of complete memoryview compatibility or a measured speedup is made. AI-assisted implementation, testing and source review using OpenAI Codex; model version is not exposed.

Open Graph Description: Summary Align memoryview scalar formats, casts, indexing, assignment and comparison with CPython 3.15. Rebased onto main 22ee0b0380 through #9563 (a5d24851a5e94c81770935e6578c6081fda10705), retaini...

X Description: Summary Align memoryview scalar formats, casts, indexing, assignment and comparison with CPython 3.15. Rebased onto main 22ee0b0380 through #9563 (a5d24851a5e94c81770935e6578c6081fda10705), retaini...

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

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:5c0914c3-706c-9623-5911-a9b16e7e3607
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE1AE:65478:347154D:459525E:6B01F382
html-safe-nonce8878b4cb8dcd89a7b9c91dc136c276290147a59039fbd46a8456529baa8396b1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUFFOjY1NDc4OjM0NzE1NEQ6NDU5NTI1RTo2QjAxRjM4MiIsInZpc2l0b3JfaWQiOiI0NzMwMjg2NTI1NTc5OTE2MTYyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac6c7cd9a5f9702c951d54883e25b95c68d43e67dea88d4546875e54624e6f918c
hovercard-subject-tagpull_request:5150940143
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/9692/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 memoryview scalar formats, casts, indexing, assignment and comparison with CPython 3.15. Rebased onto main 22ee0b0380 through #9563 (a5d24851a5e94c81770935e6578c6081fda10705), retaini...
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/9692/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9692%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%2F9692%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/9692/files
Reloadhttps://github.com/RustPython/RustPython/pull/9692/files
Reloadhttps://github.com/RustPython/RustPython/pull/9692/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/memoryview-index-parity-20261104https://github.com/youknowdot/RustPython/tree/fix/memoryview-index-parity-20261104
Conversation 5 https://github.com/RustPython/RustPython/pull/9692
Commits 2 https://github.com/RustPython/RustPython/pull/9692/commits
Checks 27 https://github.com/RustPython/RustPython/pull/9692/checks
Files changed https://github.com/RustPython/RustPython/pull/9692/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9692/files
Align memoryview scalar, cast, and indexing controls https://github.com/RustPython/RustPython/pull/9692/files#top
Show all changes 2 commits https://github.com/RustPython/RustPython/pull/9692/files
ea4d1b9 Share binary formats and align memoryview with CPython 3.15 codex Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9692/commits/ea4d1b99fbe3ed5c9bf56532aaf2e2b870b2c876
8451d4f Rely on scope cleanup for redundant explicit drops codex Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9692/commits/8451d4f91aee791233b4049036f908eb92810abc
Clear filters https://github.com/RustPython/RustPython/pull/9692/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9692/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9692/files
buffer.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-d18d959cce63c4cd0df32cadf2e5fbf956ee1a94f2dc6cd36b53f3a5696a1592
complex.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
int.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
memory.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-83fe7bb7e7b6dd3b601eae76f14c31d467ad70f40cb4183de0e82f5af619c721
format.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-34c3c9dc4932e951eb6af5073d90479a6e86b5536bc024b22de321e6e2da7352
argument.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-e9ca87fa93dba19813dc8ace2b1f9cbfd3cb9f29560b80c1e38963101107cfff
mod.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-c2fa22f10e57d8883fb9de7511a7345f799c1c3e87cda5ac557e3d513020d950
number.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-4b6c8f777cc85a356e8cfd03078d3119eeecaa76f326aac365e67c91c724a8ae
buffer.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-1a3a98c5067186ed40f65776b76ad3dab68ad8e5bb9f4423d68eebee0f7593a7
mod.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-63963cad909798a50cceb99c7ed9feecbd540e0e837dd67c98a890647f77308f
object.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-e15b9e7d637d4c91a7e282e6a4d8fa79bd36b67b3453ada8136d66895a3ee75d
sliceable.rs https://github.com/RustPython/RustPython/pull/9692/files#diff-3bd0c9ecde0861199fce3b194f5f0b8f7c309831d2ea2c2752a59adaee3b8e9e
builtin_memoryview.py https://github.com/RustPython/RustPython/pull/9692/files#diff-80ba0a2ec6dfada983e695834070bd35c59c847bfd0ec94ae64d3e034fd07cfc
crates/vm/src/buffer.rshttps://github.com/RustPython/RustPython/pull/9692/files#diff-d18d959cce63c4cd0df32cadf2e5fbf956ee1a94f2dc6cd36b53f3a5696a1592
View file https://github.com/youknowdot/RustPython/blob/8451d4f91aee791233b4049036f908eb92810abc/crates/vm/src/buffer.rs
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9692/files
crates/vm/src/builtins/complex.rshttps://github.com/RustPython/RustPython/pull/9692/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
View file https://github.com/youknowdot/RustPython/blob/8451d4f91aee791233b4049036f908eb92810abc/crates/vm/src/builtins/complex.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9692/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9692/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
https://github.com/RustPython/RustPython/pull/9692/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
https://github.com/RustPython/RustPython/pull/9692/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
https://github.com/RustPython/RustPython/pull/9692/files#diff-b0ba58a1a769c49088c60a0a76a7a99bc1e710180d4373aaf2d287a004a362f5
crates/vm/src/builtins/int.rshttps://github.com/RustPython/RustPython/pull/9692/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
View file https://github.com/youknowdot/RustPython/blob/8451d4f91aee791233b4049036f908eb92810abc/crates/vm/src/builtins/int.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9692/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9692/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
https://github.com/RustPython/RustPython/pull/9692/files#diff-6f6fb35904d4bdd7481e9d90622e7fc41a1eff225053e762f724150581464887
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9692/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9692/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.