René's URL Explorer Experiment


Title: Share exception state and callback controls by youknowdot · Pull Request #9719 · RustPython/RustPython · GitHub

Open Graph Title: Share exception state and callback controls by youknowdot · Pull Request #9719 · RustPython/RustPython

X Title: Share exception state and callback controls by youknowdot · Pull Request #9719 · RustPython/RustPython

Description: Summary Group CPython 3.15 exception state, construction and callback controls. Keep BaseException allocation permissive while rejecting initializer keywords before mutating args. Preserve lazy exception dictionaries through the shared Constructor path, including specialized exception payloads; nonexception allocation is unchanged. Make public BaseException/KeyError formatting propagate callback errors and preserve WTF-8. Snapshot the short type name before argument callbacks. Retain the forgiving internal diagnostic formatter and its buffered-I/O caller. Restore every raw state entry, including dunder attributes, through setattr without stringifying keys. Preserve string-subclass identity and stop at the first setter error. Use dynamic optional notes lookup and dynamic list creation. Use the canonical Python add_note validation wrapper and the typed Rust add_note_str helper; append to the actual list payload rather than an overridden append method. Share exact-tuple identity, exact-list copying and unhinted iterable conversion between tuple construction and exception args assignment. Borrow the original setter input through replacement so temporary-source finalizers cannot run prematurely. Preserve complete args and allocated-empty-dict identity in reduction. ImportError copies state only when adding native fields; AttributeError preserves ordinary dictionary entries while excluding its native obj field. Share bounded type-name diagnostics with CPython's UTF-8 byte limits and None spelling. Retain the originally installed args tuple through initializer callbacks. SystemExit preserves existing code on empty reinitialization and shares the exact multiargument tuple; StopIteration retains extra incoming owners until value publication. Initialize AttributeError, ImportError and NameError args before rejecting keyword errors, then reuse ArgSpec for maximum-count and insertion-order validation while retaining raw keyword owners. ImportError derives msg from the original tuple even if old-args cleanup reenters initialization. Validation Reference source: CPython d220409a13b77de7a6c30abe16ea90db01528edc. Independent source review passed for the frozen four-file patch, including ownership, callback order, locks, dictionary allocation, typed APIs and existing-peer scope. The reference oracle passed 32 checkpoints, including three explicitly excluded residual controls. Five implementation supplements, ten byte-boundary diagnostics and nine independent supplementary checkpoints also passed on CPython. These are reference/source checks, not execution of RustPython. Existing tests/Lib files, assertions, expected failures and workflows are unchanged. Final threaded cargo check passed in 1m09s and all-targets Clippy in 2m27s. All 12 unchanged baseline diagnostics match exactly; no warnings were suppressed. Ordinary commit hooks passed. Native RustPython was not run because the required execution guard has not been verified. Full workspace/C-API suites, native runtime differential tests and separate platform/feature graphs remain unrun; hosted CI is pending. The initializer follow-up is independently reviewed against an additional 49-check CPython oracle, of which 23 checkpoints cover selected controls and negative controls; the remaining checkpoints document excluded behaviors. An additional independent initializer oracle passed 83 checkpoints covering reentrant initialization, ownership survival, failure state, keyword order and metadata. Final follow-up source review, compilation, Clippy and ordinary commit hooks passed. Limits and integration Generic tuple conversion's allocation-boundary failure cleanup, tuple/structseq teardown, and caller-wide argument destruction are not solved by this group. ExceptionGroup conversion/repr behavior and SystemExit empty-reinitialization code retention were the three deliberately excluded controls in the original oracle; the initializer follow-up now fixes the SystemExit case. Specialized native layouts and OSError's specialized reduction are unchanged. The existing PyAtomicRef deferred reclamation remains necessary for borrow safety, so immediate CPython field-finalizer timing is not claimed. Shared ArgSpec typo suggestions/surrogate diagnostics remain outside this initializer follow-up; the unmerged #9718 parser changes are not duplicated. SyntaxError initializer changes overlap #8348 and are excluded. ExceptionGroup work remains in #9588 rather than being duplicated here. The shared Constructor change is limited to BASE_EXC_SUBCLASS and retains the existing checked payload/type allocation path. It prevents freshly constructed specialized exceptions from acquiring an observable empty state dictionary merely as an allocation side effect. Examined peers for reporting, native layouts, GC, SyntaxError storage and ExceptionGroup derivation do not implement these contracts. Their eventual textual composition must preserve each independent behavior. Public fallible exception formatting and the new tuple helper affect Rust integration; in-tree call sites were updated, while internal forgiving reporting remains separate. AI-assisted contribution by OpenAI Codex; assistance is disclosed in the commit trailer.

Open Graph Description: Summary Group CPython 3.15 exception state, construction and callback controls. Keep BaseException allocation permissive while rejecting initializer keywords before mutating args. Preserve lazy e...

X Description: Summary Group CPython 3.15 exception state, construction and callback controls. Keep BaseException allocation permissive while rejecting initializer keywords before mutating args. Preserve lazy e...

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

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:4bd5189c-a2e4-2e0c-9bc1-92ea37f55da9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA686:1F87:15CDD3:1B4EDA:6B01FE37
html-safe-nonce75c7c90e05cfca24da53b212c703b4875476ff1da0ce17e61fe1afa3ad49fcef
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjg2OjFGODc6MTVDREQzOjFCNEVEQTo2QjAxRkUzNyIsInZpc2l0b3JfaWQiOiIyOTY3NjIwNjkwMTkyMjM2MDg4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb840b8efdc4198353a71d12336635922f4f3d636c521e0fbc97a323e72ba68d9
hovercard-subject-tagpull_request:5160754025
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/9719/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 CPython 3.15 exception state, construction and callback controls. Keep BaseException allocation permissive while rejecting initializer keywords before mutating args. Preserve lazy e...
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/9719/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9719%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%2F9719%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/9719/files
Reloadhttps://github.com/RustPython/RustPython/pull/9719/files
Reloadhttps://github.com/RustPython/RustPython/pull/9719/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/exception-state-controls-20261104https://github.com/youknowdot/RustPython/tree/fix/exception-state-controls-20261104
Conversation 6 https://github.com/RustPython/RustPython/pull/9719
Commits 3 https://github.com/RustPython/RustPython/pull/9719/commits
Checks 28 https://github.com/RustPython/RustPython/pull/9719/checks
Files changed https://github.com/RustPython/RustPython/pull/9719/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9719/files
Share exception state and callback controls https://github.com/RustPython/RustPython/pull/9719/files#top
Show all changes 3 commits https://github.com/RustPython/RustPython/pull/9719/files
6121427 Share exception state and callback controls youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9719/commits/612142724b866be34d6dfd971a6f8abcc283fe84
443306b Preserve specialized exception initializer ordering youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9719/commits/443306bb31700b4062338145f9e617803c4e8b1b
244b7bf Keep add_note as the Python method name codex Nov 6, 2026 https://github.com/RustPython/RustPython/pull/9719/commits/244b7bf853743280c886b7f5efdc3ba7421a188c
Clear filters https://github.com/RustPython/RustPython/pull/9719/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9719/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9719/files
json.rs https://github.com/RustPython/RustPython/pull/9719/files#diff-178128486470adaa06dc096deddc4f7da63b1af9c0555e93fed81ae66c6e5f5e
pickle.rs https://github.com/RustPython/RustPython/pull/9719/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
pyexpat.rs https://github.com/RustPython/RustPython/pull/9719/files#diff-7f4c525df38078045fcc6955c53f774ac806800c790e024f06fd3ce2b188f33b
tuple.rs https://github.com/RustPython/RustPython/pull/9719/files#diff-606274a9a62c77c00f802fbc298be35b47e2932cf90cc413748b4d8fc69d7c7e
exceptions.rs https://github.com/RustPython/RustPython/pull/9719/files#diff-f527bc3e68302079a32d6da36816531e3e22dd31ff91ef0ff0f2688673712747
lazy_import.rs https://github.com/RustPython/RustPython/pull/9719/files#diff-a3c04a8097c845da2c51b16acf7ef42dc4597bd17e841e5ae9f0ea78444f4b1c
_io.rs https://github.com/RustPython/RustPython/pull/9719/files#diff-90825edc73ec293e0ed3b2dbed7f0a492b1f8e51c25747326089a912267bdd3e
slot.rs https://github.com/RustPython/RustPython/pull/9719/files#diff-1b5587c15bdfe9ff552fbc35e014eef20d6b7934fbb31b922cf35d87e8837b7b
async_exception.rs https://github.com/RustPython/RustPython/pull/9719/files#diff-7a05d88b43315590278992b8cbe5d891af82c42a60e5333ec78f951cb911251c
crates/stdlib/src/json.rshttps://github.com/RustPython/RustPython/pull/9719/files#diff-178128486470adaa06dc096deddc4f7da63b1af9c0555e93fed81ae66c6e5f5e
View file https://github.com/youknowdot/RustPython/blob/244b7bf853743280c886b7f5efdc3ba7421a188c/crates/stdlib/src/json.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9719/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9719/files#diff-178128486470adaa06dc096deddc4f7da63b1af9c0555e93fed81ae66c6e5f5e
https://github.com/RustPython/RustPython/pull/9719/files#diff-178128486470adaa06dc096deddc4f7da63b1af9c0555e93fed81ae66c6e5f5e
crates/stdlib/src/pickle.rshttps://github.com/RustPython/RustPython/pull/9719/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
View file https://github.com/youknowdot/RustPython/blob/244b7bf853743280c886b7f5efdc3ba7421a188c/crates/stdlib/src/pickle.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9719/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9719/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
https://github.com/RustPython/RustPython/pull/9719/files#diff-3029d63dd60cbab4abbf02b7ddea49000477dfb2399b94ec7d5c021428fbe641
crates/stdlib/src/pyexpat.rshttps://github.com/RustPython/RustPython/pull/9719/files#diff-7f4c525df38078045fcc6955c53f774ac806800c790e024f06fd3ce2b188f33b
View file https://github.com/youknowdot/RustPython/blob/244b7bf853743280c886b7f5efdc3ba7421a188c/crates/stdlib/src/pyexpat.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9719/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9719/files#diff-7f4c525df38078045fcc6955c53f774ac806800c790e024f06fd3ce2b188f33b
https://github.com/RustPython/RustPython/pull/9719/files#diff-7f4c525df38078045fcc6955c53f774ac806800c790e024f06fd3ce2b188f33b
crates/vm/src/builtins/tuple.rshttps://github.com/RustPython/RustPython/pull/9719/files#diff-606274a9a62c77c00f802fbc298be35b47e2932cf90cc413748b4d8fc69d7c7e
View file https://github.com/youknowdot/RustPython/blob/244b7bf853743280c886b7f5efdc3ba7421a188c/crates/vm/src/builtins/tuple.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9719/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9719/files#diff-606274a9a62c77c00f802fbc298be35b47e2932cf90cc413748b4d8fc69d7c7e
https://github.com/RustPython/RustPython/pull/9719/files#diff-606274a9a62c77c00f802fbc298be35b47e2932cf90cc413748b4d8fc69d7c7e
https://github.com/RustPython/RustPython/pull/9719/files#diff-606274a9a62c77c00f802fbc298be35b47e2932cf90cc413748b4d8fc69d7c7e
https://github.com/RustPython/RustPython/pull/9719/files#diff-606274a9a62c77c00f802fbc298be35b47e2932cf90cc413748b4d8fc69d7c7e
https://github.com/RustPython/RustPython/pull/9719/files#diff-606274a9a62c77c00f802fbc298be35b47e2932cf90cc413748b4d8fc69d7c7e
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9719/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9719/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.