-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Recent change to concurrent/futures/_base.pyi
broke a bunch of code
#6033
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
Comments
cc @HunterAP23 who wrote the PR. It doesn't look like this change was intentional; probably it just came with switching Iterable and Mapping to being imported from At some point it may be helpful to set up a pyright-primer complementing mypy-primer to find issues with pyright in our CI. |
Thanks @JelleZijlstra. This issue wasn't specific to pyright. Mypy would have reported the same issue if it were run on this code. We use some internal Microsoft Python code bases as a smoke test for pyright, and that's where I discovered the problem. It also triggered an error in one of pyright's unit tests, which happened to use the affected module. |
This was just an oversight. #6034. |
It was an oversight on my part - thank you to both srittau and akuli for correcting it. |
I just pulled the latest typeshed stubs for inclusion in the next release of pylance, and I noticed that a recent change to
concurrent/futures/_base.pyi
triggered a bunch of our internal smoke tests.The problem is that it now imports the type
Set
fromcollections.abc
rather than fromtyping
. Butcollections.abc.Set
is aliased totyping.AbstractSet
which is not type compatible withtyping.Set
. Was this change intended? What is the implication of reverting it?I've temporarily backed out this change from the copy of typeshed that we ship with pylance because I think it's going to be pretty disruptive.
The text was updated successfully, but these errors were encountered: