-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Some type variables (+T) are not listed in Generic[~T] #94607
Comments
Confirmed, and marking as a release blocker since this is a regression. I'll take a look later today. Also cc @Fidget-Spinner @serhiy-storchaka in case you have any insights. |
@JelleZijlstra bisect points me to commit b6a5d85. |
Sorry @JelleZijlstra I hope I didn't create duplicate work, but I have a PR open at #94610. |
Thanks @Fidget-Spinner! I haven't done anything yet; I was planning to try and come up with a solution after work today, but now I'll get too review your PR instead. |
Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]> (cherry picked from commit 6442a9d) Co-authored-by: Ken Jin <[email protected]>
Co-authored-by: Serhiy Storchaka <[email protected]> (cherry picked from commit 6442a9d) Co-authored-by: Ken Jin <[email protected]>
Bug report
In Python 3.11.0b3 subclasses of generic classes seems to have started requiring explicitly filling in all the super-classes type vars, even though the subclass isn't supposed to be generic in the same variable as the super type.
The behavior is inconsistent and only throws an error if the subclass is also generic.
Minimal reproduction
This gives this error:
Workaround
By explicitly passing
object
to fill in the typevar of the super class, the error is surpressed.Your environment
The text was updated successfully, but these errors were encountered: