René's URL Explorer Experiment


Title: Implement Python 3.15 type alias and variadic metadata by youknowdot · Pull Request #9113 · RustPython/RustPython · GitHub

Open Graph Title: Implement Python 3.15 type alias and variadic metadata by youknowdot · Pull Request #9113 · RustPython/RustPython

X Title: Implement Python 3.15 type alias and variadic metadata by youknowdot · Pull Request #9113 · RustPython/RustPython

Description: Summary Extract the native typing metadata portion of #8954, against current main, using the Python 3.15.0 final contract at CPython d220409a13b77de7a6c30abe16ea90db01528edc (Objects/typevarobject.c, its generated Clinic header, and relevant upstream test sources). Add TypeAliasType.__qualname__, optional constructor qualname, qualified repr, and writable/deletable __module__ with lazy-evaluator fallback. Keep __reduce__ based on the unqualified name. Add raw-identity TypeVarTuple.__bound__ and variance flags. Explicit construction defaults to invariant; compiler-created parameters infer variance. Preserve surrogate-containing names and string-subclass contents in representations. Validate argument binding/name types before ordered truthiness callbacks and report conflicting variance like final CPython. Add bounded Python regressions in the existing typing snippet. Merged ParamSpec behavior from #9071 is unchanged. The follow-up test synchronization copies six complete canonical test definitions from final CPython through scripts/update_lib copy-test, with source/destination SHA256 pins: two methods in Lib/test/test_type_aliases.py and four in Lib/test/test_typing.py. No surrounding tests, markers, imports, or fixtures change; there are no manual assertion edits or new skips. This split does not update Lib/typing.py; compiler PR #9105 is now merged in its base. The earlier statement that full typing.py migration necessarily needs PEP 810 was too strong: the current parser accepts lazy-import syntax but codegen performs an eager import, and the final typing lazy-import test is CPython-only. A broader library migration is deferred to separate work rather than treated as a proven blocker. Validation Passed on Linux with the repository's unmodified release profile: cargo build --release --locked --no-default-features --features threading,stdlib,stdio,importlib,host_env --bin rustpython -j 1 Both newly added functions, test_type_alias_metadata and test_typevartuple_bound_and_variance, extracted through AST with only the assertion helper definitions and executed independently by the candidate release binary. Each had a 30-second timeout, and the candidate typing.py path was verified. cargo clippy --release --locked -p rustpython-vm --no-default-features --features compiler,threading,host_env -j 1 -- -D warnings Normal configured commit hooks (merge-conflict checks, Ruff format/import checks, rustfmt, cspell); unrelated hooks skipped by their configured file scopes. These are focused checks. The full existing snippet, full pytest/snippet suite, full upstream typing modules, workspace/C-API suites, all-target Clippy, and other platforms were not run. Final CPython was used as a source reference; no CPython 3.15 final executable was available for a runtime oracle comparison. Canonical test synchronization after CI The first Ubuntu CI run reported seven failures across six methods because the bundled pre-final tests still expected unqualified alias names and unprefixed explicit TypeVarTuple names. The Rust results match final CPython. Commit 42e62a105 uses the official hash-pinned whole-test copy path for: TypeParamsAliasValueTest.test_repr and test_recursive_repr GenericTests.test_repr_3 (two affected subcases) TypeVarTupleTests.test_cannot_subclass, test_repr_is_correct, and test_variadic_class_alias_repr_is_correct Independent source review verified byte-identical complete definitions, all intermediate hashes, unchanged surrounding files, and retained case/assertion coverage. All six exact methods passed locally with the preserved candidate release binary, candidate module-path guards, and separate 30-second limits. Normal commit hooks passed. No Rust rebuild was needed; full suites were not rerun locally. New-head hosted CI remains to be evaluated. AI assistance OpenAI Codex implemented this split, independently source-reviewed the changes, wrote the regression additions, ran the focused automated checks above, and prepared this PR. The runtime did not expose a model-version identifier. No human manual testing is claimed. Submitted at the maintainer's explicit request under the project's maintainer exemption. Rebase onto updated dependencies Rebased without conflicts onto main 016ed92f9ef919125781842537c299fd4bbd250d (including the merged malachite 0.14 update), producing head 4d68c83635431a68f3d9bd9e85b21f59c81be847. Both commits have unchanged patches; all five PR files and six canonical copied definitions remain byte-identical to the previous head. All configured hooks passed after each replayed commit. The six targeted canonical methods and two bounded snippet functions passed again using the preserved earlier candidate executable with the rebased library paths. No new executable was built locally: these runs do not validate a malachite 0.14 build. New-head hosted CI provides that integration check; no broader tests or new features were added. Rebase onto the merged compiler update Rebased onto main 2a09ee02bd16dbe4405e1476efe92f7e59de94f7 (merged compiler PR #9105), producing head 017ec6b1471cd5d434a8e60566ea170da95231c2. Both replayed patches are unchanged according to range-diff, and all five PR files are byte-identical to the prior head. Normal configured hooks passed after each replayed commit. A fresh release executable was built from this combined head with the release command above, one build job, and incremental compilation disabled. Unlike the earlier preserved-binary checks, these results exercise the merged compiler integration. The two bounded snippet functions and six canonical methods listed above passed again. Four additional existing canonical methods from TypeParamsAliasValueTest also passed: test_alias_value_01, test_alias_value_02, test_alias_value_04, and test_raising. All 12 checks ran in separate fresh processes with a 30-second timeout and 1 GiB address-space limit, with candidate module paths verified. The ten unittest selections each ran one test with zero skips; both bounded snippet functions completed successfully. The same strict VM Clippy command above passed for this head. The full typing modules, full snippet/pytest suite, workspace/C-API suites, all-target Clippy, and other platforms remain untested locally. Hosted CI for this new head is pending evaluation. Summary by CodeRabbit New Features Type aliases now expose qualified names, with defaults based on whether the alias is created lazily or eagerly. Their module metadata can be updated, and lazy aliases continue to use the evaluator’s module when no module is set. TypeVarTuple now exposes bound and variance metadata, including covariance, contravariance, and inferred variance. Its representation reflects explicit variance. Bug Fixes Invalid type alias and TypeVarTuple constructor arguments are rejected, including incompatible variance options.

Open Graph Description: Summary Extract the native typing metadata portion of #8954, against current main, using the Python 3.15.0 final contract at CPython d220409a13b77de7a6c30abe16ea90db01528edc (Objects/typevarobject....

X Description: Summary Extract the native typing metadata portion of #8954, against current main, using the Python 3.15.0 final contract at CPython d220409a13b77de7a6c30abe16ea90db01528edc (Objects/typevarobject....

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

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:cc65c7ee-c767-9890-5651-a1456300c384
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8CB8:3D97C8:34D0BBF:463D401:6B01FE91
html-safe-nonce72bca9797081b35848b1200dde0eaa5711fc47390127147bf8306446c7610d70
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0I4OjNEOTdDODozNEQwQkJGOjQ2M0Q0MDE6NkIwMUZFOTEiLCJ2aXNpdG9yX2lkIjoiNjIxMzMxMTI0MDgwMzA1NzI5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3f508781028067ea2bb2b29832a4a95bc8d7eb8d8e3a3dd3403d0a29b2d77cd3
hovercard-subject-tagpull_request:4856673034
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/9113/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 Extract the native typing metadata portion of #8954, against current main, using the Python 3.15.0 final contract at CPython d220409a13b77de7a6c30abe16ea90db01528edc (Objects/typevarobject....
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/9113/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FRustPython%2FRustPython%2Fpull%2F9113%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%2F9113%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/9113/files
Reloadhttps://github.com/RustPython/RustPython/pull/9113/files
Reloadhttps://github.com/RustPython/RustPython/pull/9113/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:typing-315-featureshttps://github.com/youknowdot/RustPython/tree/typing-315-features
Conversation 6 https://github.com/RustPython/RustPython/pull/9113
Commits 2 https://github.com/RustPython/RustPython/pull/9113/commits
Checks 21 https://github.com/RustPython/RustPython/pull/9113/checks
Files changed https://github.com/RustPython/RustPython/pull/9113/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9113/files
Implement Python 3.15 type alias and variadic metadata https://github.com/RustPython/RustPython/pull/9113/files#top
Show all changes 2 commits https://github.com/RustPython/RustPython/pull/9113/files
8dc8a78 Implement Python 3.15 type alias and variadic metadata youknowdot Oct 14, 2026 https://github.com/RustPython/RustPython/pull/9113/commits/8dc8a783944e3c8186967d21d37350bc123b023b
017ec6b Sync canonical typing repr tests with Python 3.15 final youknowdot Oct 14, 2026 https://github.com/RustPython/RustPython/pull/9113/commits/017ec6b1471cd5d434a8e60566ea170da95231c2
Clear filters https://github.com/RustPython/RustPython/pull/9113/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9113/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9113/files
test_type_aliases.py https://github.com/RustPython/RustPython/pull/9113/files#diff-fbb72c37839a4f1c6b2200174b4d12d023e2cdf86e6818332389fcc77daeb487
test_typing.py https://github.com/RustPython/RustPython/pull/9113/files#diff-04d29c98076c2d6bb75921ea9becb26a862544d39b71db87b6e354c759b9305d
_typing.rs https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
typevar.rs https://github.com/RustPython/RustPython/pull/9113/files#diff-f7936d794eb55f426d2951988fd6dcb8a34bb47d64db10d45728e0b7077f1de7
stdlib_typing.py https://github.com/RustPython/RustPython/pull/9113/files#diff-3bcd326bf8fcb70e4d274580efdc3081123293489fdf9655353ac35953c689b9
Lib/test/test_type_aliases.pyhttps://github.com/RustPython/RustPython/pull/9113/files#diff-fbb72c37839a4f1c6b2200174b4d12d023e2cdf86e6818332389fcc77daeb487
View file https://github.com/youknowdot/RustPython/blob/017ec6b1471cd5d434a8e60566ea170da95231c2/Lib/test/test_type_aliases.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9113/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9113/files#diff-fbb72c37839a4f1c6b2200174b4d12d023e2cdf86e6818332389fcc77daeb487
https://github.com/RustPython/RustPython/pull/9113/files#diff-fbb72c37839a4f1c6b2200174b4d12d023e2cdf86e6818332389fcc77daeb487
Lib/test/test_typing.pyhttps://github.com/RustPython/RustPython/pull/9113/files#diff-04d29c98076c2d6bb75921ea9becb26a862544d39b71db87b6e354c759b9305d
View file https://github.com/youknowdot/RustPython/blob/017ec6b1471cd5d434a8e60566ea170da95231c2/Lib/test/test_typing.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9113/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9113/files#diff-04d29c98076c2d6bb75921ea9becb26a862544d39b71db87b6e354c759b9305d
https://github.com/RustPython/RustPython/pull/9113/files#diff-04d29c98076c2d6bb75921ea9becb26a862544d39b71db87b6e354c759b9305d
https://github.com/RustPython/RustPython/pull/9113/files#diff-04d29c98076c2d6bb75921ea9becb26a862544d39b71db87b6e354c759b9305d
https://github.com/RustPython/RustPython/pull/9113/files#diff-04d29c98076c2d6bb75921ea9becb26a862544d39b71db87b6e354c759b9305d
https://github.com/RustPython/RustPython/pull/9113/files#diff-04d29c98076c2d6bb75921ea9becb26a862544d39b71db87b6e354c759b9305d
https://github.com/RustPython/RustPython/pull/9113/files#diff-04d29c98076c2d6bb75921ea9becb26a862544d39b71db87b6e354c759b9305d
https://github.com/RustPython/RustPython/pull/9113/files#diff-04d29c98076c2d6bb75921ea9becb26a862544d39b71db87b6e354c759b9305d
crates/vm/src/stdlib/_typing.rshttps://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
View file https://github.com/youknowdot/RustPython/blob/017ec6b1471cd5d434a8e60566ea170da95231c2/crates/vm/src/stdlib/_typing.rs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/RustPython/RustPython/pull/9113/{{ revealButtonHref }}
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
https://github.com/RustPython/RustPython/pull/9113/files#diff-a93fc0a83c07336a0ee35bf0dd0a022c3eb3b689663e589b8734bc1cc2b8b437
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9113/files
Please reload this pagehttps://github.com/RustPython/RustPython/pull/9113/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.