FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Support default type parameters in Generic by GruffElixir · Pull Request #795 · python/typing_extensions · GitHub

Repository navigation

Support default type parameters in Generic - #795

Open
GruffElixir wants to merge 3 commits into
python:mainfrom
GruffElixir:fix/typevar-defaults
Open

GruffElixir wants to merge 3 commits into
python:mainfrom
GruffElixir:fix/typevar-defaults

Conversation

Copy link
Copy Markdown

Fixes #672

On Python 3.9–3.12, typing's generic specialization path does not invoke the default-substitution hooks exposed by typing_extensions.TypeVar. Apply those hooks for generic classes and aliases before delegating to typing, so omitted parameters use their declared defaults.

Tests: Python 3.9 and 3.10 python -m unittest test_typing_extensions.TypeVarLikeDefaultsTests; Python 3.14 same.

Copilot AI lite review requested due to automatic review settings September 8, 2026 12:12

python-cla-bot Bot commented Sep 8, 2026 •
edited
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

codecov Bot commented Sep 8, 2026 •
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.82609% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.24%. Comparing base (3ae9b75) to head (7c49d9b).

Files with missing lines Patch % Lines
src/typing_extensions.py 97.56% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main     #795      +/-   ##
==========================================
- Coverage   97.26%   97.24%   -0.03%     
==========================================
  Files           3        3              
  Lines        7859     7905      +46     
==========================================
+ Hits         7644     7687      +43     
- Misses        215      218       +3     
Flag Coverage Δ
3.10 88.89% <91.30%> (+0.03%) ⬆️
3.10.4 88.89% <91.30%> (+0.03%) ⬆️
3.11 88.04% <91.30%> (+0.01%) ⬆️
3.11.0 87.29% <91.30%> (+0.02%) ⬆️
3.12 87.99% <93.47%> (+0.03%) ⬆️
3.12.0 87.98% <93.47%> (+0.03%) ⬆️
3.13 82.98% <13.04%> (-0.41%) ⬇️
3.13.0 83.67% <13.04%> (-0.42%) ⬇️
3.14 79.13% <13.04%> (-0.40%) ⬇️
3.9 89.51% <84.78%> (-0.03%) ⬇️
3.9.12 89.51% <84.78%> (-0.03%) ⬇️
pypy3.10 88.72% <91.30%> (+0.04%) ⬆️
pypy3.11 87.90% <91.30%> (+0.01%) ⬆️
pypy3.9 89.34% <84.78%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/test_typing_extensions.py 98.23% <100.00%> (+<0.01%) ⬆️
src/typing_extensions.py 93.97% <97.56%> (-0.03%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Bug: typing_extensions.Generic not support TypeVar defaults

2 participants


Back | FazBrowse Home | New Git URL