GeezerVison is showing github.com — Remove obsolete Literal deduplication assertion by AlexWaygood · Pull Request #785 · python/typing_extensions
Conversation
AlexWaygood
commented
Aug 12, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Fixes #784.
Summary
Remove the assertion that Literal[[], []].__args__ is ([], []). python/cpython#153914 deliberately changed typing.Literal to deduplicate unhashable arguments, so Python 3.14.7 now returns ([],) instead. On supported Python versions where typing_extensions.Literal aliases typing.Literal, the old assertion therefore contradicts the standard library behavior.
This PR just deletes the assertion entirely: the behaviour here is now version-dependent, and the assertion was always testing an implementation detail that wasn't really that important.
Historical context
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
codecov
Bot
commented
Aug 12, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.26%. Comparing base (83400e9) to head (6e18c1c).
@@ Coverage Diff @@
## main #785 +/- ##
==========================================
- Coverage 97.26% 97.26% -0.01%
==========================================
Files 3 3
Lines 7860 7859 -1
==========================================
- Hits 7645 7644 -1
Misses 215 215
| Flag |
Coverage Δ |
|
| 3.10 |
88.85% <ø> (-0.01%) |
⬇️ |
| 3.10.4 |
88.85% <ø> (-0.01%) |
⬇️ |
| 3.11 |
88.02% <ø> (-0.01%) |
⬇️ |
| 3.11.0 |
87.27% <ø> (-0.01%) |
⬇️ |
| 3.12 |
87.96% <ø> (-0.01%) |
⬇️ |
| 3.12.0 |
87.94% <ø> (-0.01%) |
⬇️ |
| 3.13 |
83.39% <ø> (-0.01%) |
⬇️ |
| 3.13.0 |
84.09% <ø> (-0.01%) |
⬇️ |
| 3.14 |
79.53% <ø> (-0.01%) |
⬇️ |
| 3.9 |
89.53% <ø> (-0.01%) |
⬇️ |
| 3.9.12 |
89.53% <ø> (-0.01%) |
⬇️ |
| pypy3.10 |
88.68% <ø> (-0.01%) |
⬇️ |
| pypy3.11 |
87.88% <ø> (-0.01%) |
⬇️ |
| pypy3.9 |
89.37% <ø> (-0.01%) |
⬇️ |
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
AlexWaygood reacted with thumbs up emoji
Uh oh!
There was an error while loading. Please reload this page.
bmwiedemann
pushed a commit
to bmwiedemann/openSUSE
that referenced
this pull request
Aug 18, 2026
…0852
https://build.opensuse.org/request/show/1370852
by user dgarcia + anag_factory
- Drop not needed patch py314-fix-tests.patch
- Add upstream patch
remove-obsolete-literal-deduplication-assertion.patch
(gh#python/typing_extensions#785, bsc#1274786)
- Update to 4.16.0:
* Avoid a DeprecationWarning when deprecated is applied to a
coroutine function on Python 3.14.0.
* Make `typing_extensions.TypeAliasType`'s `__module__` attribute
writable. Backport of CPython PR [#149172](python/cpython#149172).
* Fix setting of `__required_keys__` and `__optional_keys__` when
inheriting keys with the same name.
* Add support for `AsyncIterator`, `io.Reader`, `io.Writer` and
`os.PathLike` protocols as bases for other protocols.
* Fix incorrect behaviour on Python 3.9 and Python 3.10 that meant
that calling `isinstance` with
`
Reviewers
srittau
srittau approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.