Fix TypedDict qualifier inheritance with same name
Discovered through CPython 3.14 test_typing.py: https://github.com/JanEricNitschke/typing_extensions/actions/runs/17619859892/job/50062609198#step:7:44
Tests and code are directly taken from CPython 3.14.
Tests: https://github.com/python/cpython/blob/3.14/Lib/test/test_typing.py#L8616
Code: https://github.com/python/cpython/blob/3.14/Lib/typing.py#L3139
Except that i omitted the raising of the TypeError when overwriting a mutable key with a read-only key pending further discussion.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 97.38%. Comparing base (9215c95) to head (bbf9dff).
@@ Coverage Diff @@
## main #677 +/- ##
==========================================
+ Coverage 97.36% 97.38% +0.01%
==========================================
Files 3 3
Lines 7680 7716 +36
==========================================
+ Hits 7478 7514 +36
Misses 202 202
| Flag | Coverage Δ | |
|---|---|---|
| 3.10 | 89.04% <100.00%> (+0.05%) |
:arrow_up: |
| 3.10.4 | 89.04% <100.00%> (+0.05%) |
:arrow_up: |
| 3.11 | 88.28% <100.00%> (?) |
|
| 3.11.0 | 87.51% <100.00%> (+0.05%) |
:arrow_up: |
| 3.12 | 88.23% <100.00%> (+0.05%) |
:arrow_up: |
| 3.12.0 | 88.21% <100.00%> (+0.05%) |
:arrow_up: |
| 3.13 | 82.47% <100.00%> (?) |
|
| 3.13.0 | 82.47% <100.00%> (+0.08%) |
:arrow_up: |
| 3.14 | 78.91% <100.00%> (+0.07%) |
:arrow_up: |
| 3.9 | 89.75% <100.00%> (+0.04%) |
:arrow_up: |
| 3.9.12 | 89.75% <100.00%> (+0.04%) |
:arrow_up: |
| pypy3.10 | 88.88% <100.00%> (+0.05%) |
:arrow_up: |
| pypy3.11 | 88.14% <100.00%> (+0.05%) |
:arrow_up: |
| pypy3.9 | 89.59% <100.00%> (+0.04%) |
:arrow_up: |
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.40% <100.00%> (+<0.01%) |
:arrow_up: |
| src/typing_extensions.py | 93.91% <100.00%> (+0.02%) |
:arrow_up: |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
This should also fix https://github.com/python/typing_extensions/issues/308