GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Share typing representation and GenericAlias controls by youknowdot · Pull Request #9711 · RustPython/RustPython

Conversation

@youknowdot

@youknowdot youknowdot commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

Align GenericAlias controls and share the Python 3.15 type-representation writer across GenericAlias, Union and constant annotation evaluators. The combined change spans three Rust files (+163/-182).

  • Release the iterator's mutex before constructing its starred alias or dropping the original owner, so subclass finalizers can reenter the exhausted iterator.
  • Preserve raw tuple-subclass equality results and CPython's inequality handling. Reconstruct the actual GenericAlias subtype in reduce/copy/pickle paths.
  • Replace three divergent type formatters with one WTF-8 writer. Preserve optional-attribute lookup errors and short-circuits, non-string names, surrogate characters, and temporary-owner cleanup. Attribute probes release their values before the next callback.
  • Preserve the public writer's extra __str__ call on returned str subclasses, after name-attribute cleanup. This call can change output or raise and must not be replaced with raw string copying.
  • Match annotation tuple formatting, including (int) for a singleton tuple, and preserve Unicode in ConstEvaluator's own repr and Union's subclassing diagnostic.

Validation

Pinned reference: CPython d220409a13b77de7a6c30abe16ea90db01528edc, including typevarobject.c, genericaliasobject.c and unicode_writer.c.

  • Independent source/ownership review passed. The expanded independent oracle passed 36 groups, a separate focused oracle passed 18 groups, and the previous 10 GenericAlias groups still passed. These are external CPython reference checks, not native RustPython runtime results.
  • Final threaded cargo check passed (1m07s) and all-targets Clippy passed (2m21s), with exactly the same 12 existing baseline diagnostics and no new warnings.
  • Rustfmt, diff checks and normal commit hooks passed without bypass.

Limits and integration

Native RustPython execution remains unperformed because its required safety guard is not verified; hosted runtime CI remains necessary. The separate non-threaded/WASM graph and full workspace/C-API test suite were not run under the current disk constraint. No repository tests, markers, Lib files or workflows changed.

#9714 separately fixes Union construction and comparison; #9687 fixes TypeAliasType constructor binding; #9700 changes qualified-name diagnostics. Exact-source composition with those changes was clean and reviewed, but the combined branches were not compiled. Broader payload ownership work in #8944/#8939 may require textual reconciliation and does not implement these controls.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@youknowdot
Align GenericAlias controls and iterator ownership
56a6855
Assisted-by: OpenAI Codex:model version not exposed
@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@youknowdot
Share typing representation and callback handling
9b809cc
Use one writer for aliases, unions, and constant annotations while preserving Unicode, returned string callbacks, and temporary owner order.

Assisted-by: OpenAI Codex:model version not exposed
@youknowdot youknowdot changed the title Align GenericAlias controls and iterator ownership Share typing representation and GenericAlias controls Nov 4, 2026
@youknowdot youknowdot mentioned this pull request Nov 4, 2026
Unify directory and bound method callback controls #9715
Merged
@youknowdot
Retain Comparable for GenericAlias rich comparison
a13bf7b
Override the existing rich comparison slot through Comparable, preserving raw equality results and identity-based inequality. Retain a bool-valued cmp adapter for Rust callers without duplicating comparison logic.

Assisted-by: OpenAI Codex:model version not exposed
youknowone
youknowone approved these changes Nov 6, 2026
View reviewed changes
@youknowone
youknowone marked this pull request as ready for review November 6, 2026 12:50
@youknowone
youknowone merged commit 244569c into RustPython:main Nov 6, 2026
18 of 20 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 6, 2026

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@youknowone youknowone youknowone approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@youknowdot @youknowone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.