René's URL Explorer Experiment


Title: Use populated entries for unpickler MEMOIZE indexes by youknowdot · Pull Request #8959 · RustPython/RustPython · GitHub

Open Graph Title: Use populated entries for unpickler MEMOIZE indexes by youknowdot · Pull Request #8959 · RustPython/RustPython

X Title: Use populated entries for unpickler MEMOIZE indexes by youknowdot · Pull Request #8959 · RustPython/RustPython

Description: A sparse memo entry changes the index chosen by MEMOIZE: after BINPUT 7, the next implicit memo index must be 1, not 8. The vector length currently makes a subsequent BINGET 1 fail. Store populated memo entries in a map and choose the implicit index from their count. Preserve ascending memo.copy() order, reserve storage fallibly, and release displaced values after memo guards end. Add one bounded, unique sparse/MEMOIZE regression after comparing coverage with the canonical pickle tests. This is extracted from #8954 onto current main's unchanged Python 3.14 target. It changes no pickle protocol version or 3.15 language behavior. The mega PR retains the implementation until this independent change is merged. Fresh standalone validation on cccc67bdf9929948976933c3b9a678a346e8bf06: Rust workspace: 1,345 passed /18 ignored; separate C-API: 116 passed /4 ignored Both Clippy gates pass without warnings; release startup confirms Python 3.14 and marshal/pickle version 5 test_pickle: 1,008 run, 73 skipped, 5 retained expected failures; test_pickletools: 190 run, 14 skipped, 1 retained expected failure. Both complete successfully New sparse regression passes native RustPython and exact CPython 3.14.7 Five bounded native contract groups and four memo-finalizer reentry operations pass, including copying the memo during clear, replacement, overwrite and reinitialization Full snippets: 470 passed /12 environment failures. Native 235/4, CPython 3.14.7 reference 235/4, host harness 0/4. The failing multiprocessing/ownership cases have the same AF_UNIX/UID-map restrictions on both interpreters; no source skips or assertions were weakened Normal configured commit hooks pass CPython 3.14.7 agrees on sparse opcode/MEMOIZE and protocol roundtrips. Its explicit sparse dictionary-assignment/copy cases omit entries; those two cases are checked as preservation of existing RustPython behavior, rather than claimed reference parity. This patch does not establish general unpickler GC or recursive-load safety. AI assistance: prepared, reviewed and tested with Codex at the user's direction. Exact model metadata is unavailable; the commit records Assisted-by: Codex:model-version-unavailable. Summary by CodeRabbit Bug Fixes Fixed pickle loading for streams with gaps in memo indices, preserving shared object references and correctly assigning subsequent memo entries.

Open Graph Description: A sparse memo entry changes the index chosen by MEMOIZE: after BINPUT 7, the next implicit memo index must be 1, not 8. The vector length currently makes a subsequent BINGET 1 fail. Store populated...

X Description: A sparse memo entry changes the index chosen by MEMOIZE: after BINPUT 7, the next implicit memo index must be 1, not 8. The vector length currently makes a subsequent BINGET 1 fail. Store populated...

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

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:867e8f21-2a01-d987-e4b2-aff888fa8028
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCA4A:36A3E:2F8D128:3F6F91C:6B01E6A2
html-safe-noncee6e811489b29cd7dc520b4724e042ac7723f6216f272c7c90b34c98b81b1be4e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQTRBOjM2QTNFOjJGOEQxMjg6M0Y2RjkxQzo2QjAxRTZBMiIsInZpc2l0b3JfaWQiOiI2MjI0MzgzNDg5Mzc2MTkxMDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac48f07915d936f9e2a7c13787f4cfea96e35e03ad28fc09a75ac28800fa6968cc
hovercard-subject-tagpull_request:4734810305
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/8959/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:altA sparse memo entry changes the index chosen by MEMOIZE: after BINPUT 7, the next implicit memo index must be 1, not 8. The vector length currently makes a subsequent BINGET 1 fail. Store populated...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/RustPython/RustPython/pull/8959/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F8959%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%2F8959%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/8959/files
Reloadhttps://github.com/RustPython/RustPython/pull/8959/files
Reloadhttps://github.com/RustPython/RustPython/pull/8959/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:python314-sparse-memohttps://github.com/youknowdot/RustPython/tree/python314-sparse-memo
Conversation 5 https://github.com/RustPython/RustPython/pull/8959
Commits 2 https://github.com/RustPython/RustPython/pull/8959/commits
Checks 19 https://github.com/RustPython/RustPython/pull/8959/checks
Files changed https://github.com/RustPython/RustPython/pull/8959/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/8959/files
Use populated entries for unpickler MEMOIZE indexes https://github.com/RustPython/RustPython/pull/8959/files#top
Show all changes 2 commits https://github.com/RustPython/RustPython/pull/8959/files
cccc67b Use populated entries for unpickler MEMOIZE indexes youknowdot Oct 4, 2026 https://github.com/RustPython/RustPython/pull/8959/commits/cccc67bdf9929948976933c3b9a678a346e8bf06
f4c7ea1 Move sparse memo regression to standard pickle snippet youknowdot Oct 4, 2026 https://github.com/RustPython/RustPython/pull/8959/commits/f4c7ea16bc3aa55e3dd8b1e67d2082c42a7800eb
Clear filters https://github.com/RustPython/RustPython/pull/8959/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/8959/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/8959/files
pickle.rs https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
stdlib_pickle.py https://github.com/RustPython/RustPython/pull/8959/files#diff-74a7e756035bd389effb04dac1897417c899188b1561841be4938e09903c6a3a
crates/stdlib/src/pickle.rshttps://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
View file https://github.com/youknowdot/RustPython/blob/f4c7ea16bc3aa55e3dd8b1e67d2082c42a7800eb/crates/stdlib/src/pickle.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/8959/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/8959/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
extra_tests/snippets/stdlib_pickle.pyhttps://github.com/RustPython/RustPython/pull/8959/files#diff-74a7e756035bd389effb04dac1897417c899188b1561841be4938e09903c6a3a
View file https://github.com/youknowdot/RustPython/blob/f4c7ea16bc3aa55e3dd8b1e67d2082c42a7800eb/extra_tests/snippets/stdlib_pickle.py
Open in desktop https://desktop.github.com
youknowonehttps://github.com/youknowone
Oct 4, 2026https://github.com/RustPython/RustPython/pull/8959/files#r4178229082
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/RustPython/RustPython/pull/8959/files
youknowdothttps://github.com/youknowdot
Oct 4, 2026https://github.com/RustPython/RustPython/pull/8959/files#r4178631509
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
f4c7ea16https://github.com/RustPython/RustPython/commit/f4c7ea16bc3aa55e3dd8b1e67d2082c42a7800eb
Please reload this pagehttps://github.com/RustPython/RustPython/pull/8959/files
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/8959/{{ revealButtonHref }}
Please reload this pagehttps://github.com/RustPython/RustPython/pull/8959/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.