Skip to content

Fix Python closed generic interface identity markers - #167

Merged
leileizhang (lei9444) merged 2 commits into
mainfrom
lei9444-fix-python-generic-markers
Sep 20, 2026
Merged

leileizhang (lei9444) merged 2 commits into
mainfrom
lei9444-fix-python-generic-markers

Conversation

@lei9444

@lei9444 leileizhang (lei9444) commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Derive closed-generic Python Protocol markers from the complete canonical type identity so distinct generic arguments remain distinguishable across independently generated packages and projection aliases.
  • Apply consistent markers to standalone interfaces and class default/required views, with regression coverage for incorrect and identical generic identities. Ordinary named markers, runtime .py code, native IIDs, and JavaScript output remain unchanged.
  • Migration: fully regenerate every generated Python package exchanging these interfaces, then rebuild/reinstall them together. Old and new stubs are incompatible even for the same closed interface; incremental appends retaining old declarations are insufficient.

Derive generic Protocol markers from the complete canonical TypeIdentity, independent of projection aliases. Preserve named markers and runtime output; cover independent packages, recursive identities, class views, and snapshots.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bdea384f-3022-47e8-8c74-11fd768c2105
Confirm that pre-fix and canonical markers reject the same closed interface in both typing directions. Require complete regeneration of affected packages without legacy marker fallbacks; runtime code and native IIDs are unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: bdea384f-3022-47e8-8c74-11fd768c2105
@github-actions

Copy link
Copy Markdown

Mixed-language test coverage

Workflow status: ✅ Passed

Layer Lines Functions Branches/regions
Rust, including native .pyd/.node 86.01% 81.17% 85.58% regions
Python aggregate 71.06% n/a 37.9% branches
Python runtime 99.12% n/a 97.37% branches
Generated Python WinRT projections 70.05% n/a 27.07% branches
Generated Python WinRT implementations 72.29% n/a 47.04% branches
JavaScript aggregate 22.14% 25.21% 57.88% branches
JavaScript runtime 44.27% 45.76% 78.99% branches
Generated WinRT projections 22.97% 18.71% 54.94% branches
Generated WinRT implementations 48.66% 59.76% 61.14% branches
Generated Classic COM projections 11.92% 23.97% 54.2% branches

View workflow run and download full HTML/LCOV/XML reports

@lei9444
leileizhang (lei9444) merged commit d450292 into main Sep 20, 2026
33 checks passed
@lei9444
leileizhang (lei9444) deleted the lei9444-fix-python-generic-markers branch September 20, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants