René's URL Explorer Experiment


Title: Align list, tuple and slice controls by youknowdot · Pull Request #9696 · RustPython/RustPython · GitHub

Open Graph Title: Align list, tuple and slice controls by youknowdot · Pull Request #9696 · RustPython/RustPython

X Title: Align list, tuple and slice controls by youknowdot · Pull Request #9696 · RustPython/RustPython

Description: Summary Group related CPython 3.15 list/tuple/slice search and comparison fixes in 534 changed lines across eight production Rust files: Reuse the shared slice-index conversion for list/tuple index bounds, saturate oversized integers, convert both bounds before reading the current list length, and allow searches to reach elements appended by callbacks. Retain raw bounds through conversion/search and release them in argument order through one shared owner, rather than writing method-specific argument parsers. Use CPython's constant list.index/list.remove missing-value errors without invoking user formatting callbacks. Preserve raw ordering results and exact comparison operators for lists, tuples and structseqs; compare tuple prefixes even when lengths differ. Reuse the same raw-result comparison helper for slice components, preserve the same-slice shortcut, and retain the raw length through indices conversions and cleanup. Correct slice-specific conversion diagnostics and constructor keyword priority. Release list element roots before observing callback mutations, then reload the first unequal pair for ordering. Preserve the existing constant-time identical-object equality shortcut. Release detached list children in reverse and clear slice fields in step/start/stop order before freelisting, without retaining the old stop owner in a cached husk. Preserve list.sort cleanup on key or comparison failure: reverse partial-key destruction, restore the current value permutation, restore the live list before reverse-releasing callback-added items, and preserve the original error over a mutation error. Use initial/final reversal around the existing stable forward sort for reverse=True, releasing keys before the final value reversal even on failure. Release each temporary repr result before the next callback. Slice repr reuses the corrected collection formatter also used by tuple/set/deque. Reference and validation Compared against CPython source commit d220409a13b77de7a6c30abe16ea90db01528edc and a verified CPython 3.15 oracle. 10,438 reference/model assertions and 82 additional independent oracle assertions passed, including mutation, finalizer order, argument conversion, descriptors, oversized bounds, and nonboolean comparison results. These are CPython/source-model checks, not execution of the Rust implementation. Independent source review passed for the original six-file composition and the subsequent slice extension. Ordinary commit hooks passed. Focused host-env/VM/stdlib threading cargo check and normal all-targets Clippy passed on the final source. The final slice composition also exposes eight unchanged host_env/socket diagnostics in addition to the earlier four baseline diagnostics (one POSIX needless-collect and three ElementTree lints); no candidate-file warnings remain. Strict -D warnings is not clean because of that baseline; no warnings were suppressed. The compiler caught an owning-versus-borrowed method-resolution error before publication; the one-line explicit borrowed call was independently re-reviewed, normally committed, and rechecked. The slice extension additionally passed 6,884 CPython/source-model assertions and 109 independent CPython assertions. These reference checks do not claim RustPython runtime coverage. No Python, Lib, tests, markers or workflows are changed. This does not remove existing expected failures or claim they have passed. The lifecycle extension additionally passed 59 focused CPython assertions, 40 teardown/structseq controls and 90 independent reference assertions. These include explicit negative controls for deferred behavior, not claims that every probed behavior is fixed. Independent source review passed on the final three-file extension. The first check caught a missing formatter import; it was corrected before the final validation rerun. The final lifecycle source passed threaded cargo check in 1m00s and all-targets Clippy in 2m17s. That exact branch produced the four unchanged POSIX/ElementTree diagnostics, matching the recorded four-warning baseline; the later-main socket diagnostics are absent on this branch. No warnings were suppressed. Limits and integration Native RustPython execution was not performed because the required execution guard has not been verified. Full workspace/C-API tests and cross-platform runtime checks remain unrun; hosted CI is pending. Separately locked cross-thread snapshots and malformed-call cleanup before shared bound binding remain inherited limitations. slice.indices retains its inherited shared-binder arity/keyword wording and precedence; typed raw arguments preserve signature metadata and prevent conversion before binding without adding a method-specific parser. Old infrastructure PRs #8966, #8944, #8939 and #8848, plus metadata PR #9551, touch some of these files but do not implement these behavior fixes. Their eventual composition may require textual reconciliation. The changed public Rust helper/trait interfaces may also affect out-of-tree consumers; all in-tree consumers were checked. Generic tuple child teardown remains unchanged: structseq shares the Rust tuple payload but CPython destroys its fields forward, unlike ordinary tuples. Tuple-construction allocation-boundary cleanup, subclass dictionary/slot-before-payload teardown, sort mutation-counter false positives for no-op mutations, and algorithm-specific comparison traces or exact failure permutations remain outside this patch. The existing sorting algorithm is not replaced. Old algorithm PR #6096 must preserve these driver/lifecycle controls when composed. The GC designs in #8939/#8944 retain clear-return, edge destruction, then freelist insertion; no core GC rewrite is included. AI-assisted contribution by OpenAI Codex; assistance is disclosed in the commit trailer.

Open Graph Description: Summary Group related CPython 3.15 list/tuple/slice search and comparison fixes in 534 changed lines across eight production Rust files: Reuse the shared slice-index conversion for list/tuple ind...

X Description: Summary Group related CPython 3.15 list/tuple/slice search and comparison fixes in 534 changed lines across eight production Rust files: Reuse the shared slice-index conversion for list/tuple ind...

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

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:e2f24b95-dfe7-6a34-16b3-c6540e954969
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC160:172B92:330D3E5:4406C84:6B01F7A1
html-safe-noncec02b6e498e0d8e3a9c26d24e19883a815742a7547918be07a2cc9b85f32c960b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTYwOjE3MkI5MjozMzBEM0U1OjQ0MDZDODQ6NkIwMUY3QTEiLCJ2aXNpdG9yX2lkIjoiNzg0MDczNTI4NjI1MzQ1MTE2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac172f0a47a095fe6b06fda1e61b74b0d0bf96f55d8fc6095dad72903011a28911
hovercard-subject-tagpull_request:5152720180
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/9696/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 Group related CPython 3.15 list/tuple/slice search and comparison fixes in 534 changed lines across eight production Rust files: Reuse the shared slice-index conversion for list/tuple ind...
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/9696/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9696%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%2F9696%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/9696/files
Reloadhttps://github.com/RustPython/RustPython/pull/9696/files
Reloadhttps://github.com/RustPython/RustPython/pull/9696/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/list-tuple-controls-20261104https://github.com/youknowdot/RustPython/tree/fix/list-tuple-controls-20261104
Conversation 3 https://github.com/RustPython/RustPython/pull/9696
Commits 6 https://github.com/RustPython/RustPython/pull/9696/commits
Checks 27 https://github.com/RustPython/RustPython/pull/9696/checks
Files changed https://github.com/RustPython/RustPython/pull/9696/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9696/files
Align list, tuple and slice controls https://github.com/RustPython/RustPython/pull/9696/files#top
Show all changes 6 commits https://github.com/RustPython/RustPython/pull/9696/files
261df94 Align list and tuple search and comparison controls youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9696/commits/261df94ec05c8e98c090e8a8d4a6411f3931dafb
3eead41 Select borrowed list element comparison explicitly youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9696/commits/3eead4129c6964eab5960daf3887f9ca26a9f4b4
a1f6640 Reuse sequence comparison controls for slices youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9696/commits/a1f66402f761d0e7ad393f5da9402aac7eefcbae
64583eb Align sequence cleanup and sorting callback lifetimes youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9696/commits/64583ebc867f9274bff02fe2be6e69bff3859ea8
05e6b00 Retain Comparable for sequence rich comparisons youknowdot Nov 5, 2026 https://github.com/RustPython/RustPython/pull/9696/commits/05e6b00b1b8a5b04bb32d1232360ccd1403b49f2
dd19e8e Use Self in Comparable slot implementations youknowdot Nov 5, 2026 https://github.com/RustPython/RustPython/pull/9696/commits/dd19e8eb5f0fa2935e82a3630c8f71d856e917c0
Clear filters https://github.com/RustPython/RustPython/pull/9696/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9696/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9696/files
list.rs https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
slice.rs https://github.com/RustPython/RustPython/pull/9696/files#diff-b4a3a230abe3811c0323aca7ef63073e96941a76d8c7078a955e8ae7d1f0a364
tuple.rs https://github.com/RustPython/RustPython/pull/9696/files#diff-606274a9a62c77c00f802fbc298be35b47e2932cf90cc413748b4d8fc69d7c7e
iter.rs https://github.com/RustPython/RustPython/pull/9696/files#diff-690a773a2aacbfbcbd4853ae67439dc1117f20a46434b9936fa237aa1312a225
sequence.rs https://github.com/RustPython/RustPython/pull/9696/files#diff-1ba43982365d3016394d380660c70d7316e51ff55efcd096cdcedfada4d3f38e
sliceable.rs https://github.com/RustPython/RustPython/pull/9696/files#diff-3bd0c9ecde0861199fce3b194f5f0b8f7c309831d2ea2c2752a59adaee3b8e9e
structseq.rs https://github.com/RustPython/RustPython/pull/9696/files#diff-43742898832611b68edd7db5597aff34e165eea1d753752eb74150aaeae49aca
utils.rs https://github.com/RustPython/RustPython/pull/9696/files#diff-94f43400e88f5d9d90b840cddc93f6bcb4355867bbfcedff27412b53c0222db4
crates/vm/src/builtins/list.rshttps://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
View file https://github.com/youknowdot/RustPython/blob/dd19e8eb5f0fa2935e82a3630c8f71d856e917c0/crates/vm/src/builtins/list.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9696/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
https://github.com/RustPython/RustPython/pull/9696/files#diff-986ff77d786ffa03f6bd07be740a9700539c8eed99bcdff88a999a011269f240
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9696/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9696/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.