René's URL Explorer Experiment


Title: Propagate module initialization and attribute control errors by youknowdot · Pull Request #9712 · RustPython/RustPython · GitHub

Open Graph Title: Propagate module initialization and attribute control errors by youknowdot · Pull Request #9712 · RustPython/RustPython

X Title: Propagate module initialization and attribute control errors by youknowdot · Pull Request #9712 · RustPython/RustPython

Description: Summary Align Python 3.15 ModuleType initialization, attribute and annotation controls in nine Rust source files (+161/-149). Propagate dictionary callback failures during module initialization instead of expecting writes to succeed. Preserve the original string name and arbitrary doc object. Reuse one annotation/dir dictionary loader that honors overridden dict, while performing subsequent dictionary operations on raw storage. Preserve callback errors distinctly from missing keys and return direct dir hook results unchanged. Let descriptor AttributeError fall through to module getattr. Optional lookups skip missing-attribute diagnostics and their metadata callbacks. Share fallible import-spec initialization checks, propagate origin/state callback errors, and consult the parent's _uninitialized_submodules for circular-import diagnostics. Preserve metadata lookup and temporary-owner order. Add try_new_module for fallible initialization, propagate native-definition initialization errors, and use the fallible path for WebAssembly injection after user code has populated its globals. Validation Compared against pinned CPython d220409a13b77de7a6c30abe16ea90db01528edc moduleobject.c and import.c. All 45 external reference checks pass, including collisions in all five initialization writes, annotation dictionary overrides, dictionary-subclass bypass, callback failures, descriptor fallback and optional lookup behavior. Independent source/lifetime review passed, including the native initialization callers and generated module helper. Final threaded cargo check passed (1m12s), all-target Clippy passed (3m11s) with exactly the 12 unchanged baseline diagnostics, and normal commit hooks passed. The final lifetime oracle also passed independently in three fresh CPython processes. Limits and integration The initialization panic path is source-established, not a native RustPython crash reproduction. Native execution remains unperformed because its required safety guard is not verified. No repository tests, markers, Lib files or workflows were changed. Hosted runtime CI remains necessary. The changed WebAssembly call site was source-reviewed but its separate wasm/non-threaded dependency graph was not compiled locally due limited disk space. The threaded VM/stdlib check does not substitute for that target validation. The existing public new_module wrapper remains infallible for callback-free dictionaries. External embedders supplying user-controlled dictionaries must use try_new_module. All in-tree pre-initialization dictionary callers were reviewed; WebAssembly's executed-globals path is migrated. #9700's Unicode annotation-result diagnostic change remains separate and should be preserved on composition. Existing import-from name/sys.modules suppression and file fallback differences, super error controls, and broader import behavior are outside this patch. The shared spec changes do not claim full import diagnostic parity.

Open Graph Description: Summary Align Python 3.15 ModuleType initialization, attribute and annotation controls in nine Rust source files (+161/-149). Propagate dictionary callback failures during module initialization in...

X Description: Summary Align Python 3.15 ModuleType initialization, attribute and annotation controls in nine Rust source files (+161/-149). Propagate dictionary callback failures during module initialization in...

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

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:49a75f96-1984-f116-7727-f39af15cce79
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA64E:2E9D3B:103F4E:146D91:6B01FE35
html-safe-nonce90b39d239dc9322b9e6d7cb6e5688f09c6efd0c1db965124bb2265f8ebe1dfcf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjRFOjJFOUQzQjoxMDNGNEU6MTQ2RDkxOjZCMDFGRTM1IiwidmlzaXRvcl9pZCI6IjI0OTEwMTQ4Mzk0MzkzMjY3NzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac34f649fc19aacc761de9e0e9ddabbc528825895def67058940773a0659e20a6c
hovercard-subject-tagpull_request:5157873712
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/9712/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 Python 3.15 ModuleType initialization, attribute and annotation controls in nine Rust source files (+161/-149). Propagate dictionary callback failures during module initialization in...
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/9712/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9712%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%2F9712%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/9712/files
Reloadhttps://github.com/RustPython/RustPython/pull/9712/files
Reloadhttps://github.com/RustPython/RustPython/pull/9712/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/module-controls-20261104https://github.com/youknowdot/RustPython/tree/fix/module-controls-20261104
Conversation 3 https://github.com/RustPython/RustPython/pull/9712
Commits 1 https://github.com/RustPython/RustPython/pull/9712/commits
Checks 27 https://github.com/RustPython/RustPython/pull/9712/checks
Files changed https://github.com/RustPython/RustPython/pull/9712/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9712/files
Propagate module initialization and attribute control errors https://github.com/RustPython/RustPython/pull/9712/files#top
Show all changes 1 commit https://github.com/RustPython/RustPython/pull/9712/files
3d2e10b Propagate module initialization and attribute control errors youknowdot Nov 4, 2026 https://github.com/RustPython/RustPython/pull/9712/commits/3d2e10b1edec8950f46c93adb4c40f625d2f1d3e
Clear filters https://github.com/RustPython/RustPython/pull/9712/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9712/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9712/files
pymodule.rs https://github.com/RustPython/RustPython/pull/9712/files#diff-bd1b19a26ea802742bdb1006a08982fb26404140e1dd0b5162271a6646258d39
dict.rs https://github.com/RustPython/RustPython/pull/9712/files#diff-da22219fe05502509c75f7b1ba56079fecf076601f219531bef523705764e68b
module.rs https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
import.rs https://github.com/RustPython/RustPython/pull/9712/files#diff-fdf183809931dc08d13609a0577f60effd521a60f8659606569d495720eb97d3
lazy_import.rs https://github.com/RustPython/RustPython/pull/9712/files#diff-a3c04a8097c845da2c51b16acf7ef42dc4597bd17e841e5ae9f0ea78444f4b1c
_imp.rs https://github.com/RustPython/RustPython/pull/9712/files#diff-f0225aee4a2f985e5fcfe134cfcfc434a38a85b7136af18c76a2b79f46612467
mod.rs https://github.com/RustPython/RustPython/pull/9712/files#diff-fe30ecf7c6b462e46e0874a55a05ea0edba83cefad5ac7a86e7137fa8f86ba74
vm_new.rs https://github.com/RustPython/RustPython/pull/9712/files#diff-0ed409205fe13b41775e66f6be22c13146e9aebf1000a069a10b39293f219a7b
vm_class.rs https://github.com/RustPython/RustPython/pull/9712/files#diff-713ff29a9e5351e96bf21d42de1b9200141af976e85f609859ef4a735b8e5047
crates/derive-impl/src/pymodule.rshttps://github.com/RustPython/RustPython/pull/9712/files#diff-bd1b19a26ea802742bdb1006a08982fb26404140e1dd0b5162271a6646258d39
View file https://github.com/youknowdot/RustPython/blob/3d2e10b1edec8950f46c93adb4c40f625d2f1d3e/crates/derive-impl/src/pymodule.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9712/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9712/files#diff-bd1b19a26ea802742bdb1006a08982fb26404140e1dd0b5162271a6646258d39
https://github.com/RustPython/RustPython/pull/9712/files#diff-bd1b19a26ea802742bdb1006a08982fb26404140e1dd0b5162271a6646258d39
crates/vm/src/builtins/dict.rshttps://github.com/RustPython/RustPython/pull/9712/files#diff-da22219fe05502509c75f7b1ba56079fecf076601f219531bef523705764e68b
View file https://github.com/youknowdot/RustPython/blob/3d2e10b1edec8950f46c93adb4c40f625d2f1d3e/crates/vm/src/builtins/dict.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9712/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9712/files#diff-da22219fe05502509c75f7b1ba56079fecf076601f219531bef523705764e68b
https://github.com/RustPython/RustPython/pull/9712/files#diff-da22219fe05502509c75f7b1ba56079fecf076601f219531bef523705764e68b
https://github.com/RustPython/RustPython/pull/9712/files#diff-da22219fe05502509c75f7b1ba56079fecf076601f219531bef523705764e68b
https://github.com/RustPython/RustPython/pull/9712/files#diff-da22219fe05502509c75f7b1ba56079fecf076601f219531bef523705764e68b
crates/vm/src/builtins/module.rshttps://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
View file https://github.com/youknowdot/RustPython/blob/3d2e10b1edec8950f46c93adb4c40f625d2f1d3e/crates/vm/src/builtins/module.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9712/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
https://github.com/RustPython/RustPython/pull/9712/files#diff-1b1658fe8f1e6aa57ba5cb8b7f33a6c83dad6600554e0125c989aa083ea26a0e
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9712/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9712/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.