Skip to content

Conversation

hauntsaninja
Copy link
Collaborator

TypeVars aren't iterable, but their bounds might be! Resolve a TypeVar to its bounds before trying to decide how to unpack one of its instances.

Fixes #13402

* Allow unpacking from TypeVars by resolving bounds

TypeVars aren't iterable, but their bounds might be!
Resolve a TypeVar to its bounds before trying to decide how to unpack
one of its instances.

Fixes python#13402.
@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

sublime_debugger (https://github.com/daveleroy/sublime_debugger)
- modules/core/event.py:27: error: "Unpack" is not supported by mypy yet
- modules/core/event.py:37: error: "Unpack" is not supported by mypy yet
+ modules/core/event.py:27: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/event.py:37: error: "Unpack" is not supported yet, use --enable-incomplete-features
- modules/core/event.py:59: error: "Unpack" is not supported by mypy yet
- modules/core/event.py:69: error: "Unpack" is not supported by mypy yet
- modules/core/event.py:75: error: "Unpack" is not supported by mypy yet
+ modules/core/event.py:59: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/event.py:69: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/event.py:75: error: "Unpack" is not supported yet, use --enable-incomplete-features
- modules/core/core.py:30: error: "Unpack" is not supported by mypy yet
- modules/core/core.py:33: error: "Unpack" is not supported by mypy yet
- modules/core/core.py:36: error: "Unpack" is not supported by mypy yet
- modules/core/core.py:42: error: "Unpack" is not supported by mypy yet
+ modules/core/core.py:30: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/core.py:33: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/core.py:36: error: "Unpack" is not supported yet, use --enable-incomplete-features
+ modules/core/core.py:42: error: "Unpack" is not supported yet, use --enable-incomplete-features
- modules/core/core.py:51: error: "Unpack" is not supported by mypy yet
+ modules/core/core.py:51: error: "Unpack" is not supported yet, use --enable-incomplete-features

@hauntsaninja hauntsaninja merged commit 70bc348 into python:release-0.980 Sep 12, 2022
@hauntsaninja hauntsaninja deleted the backport branch September 12, 2022 19:36
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