-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix typing-extensions stubs shadowing typing_extensions #5109
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
Conversation
if dep in ALLOWED_PACKAGES: | ||
continue |
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.
I wasn't sure how to handle this lint.
|
|
# mypy does not support stubs for typing-extensions, so we depend on | ||
# `typing-extensions` instead of `types-typing-extensions`. | ||
"typing-extensions" | ||
} |
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.
I think we may want to disallow types-typing-extensions
.
@srittau I wasn't sure which core team member to ping, but can I get a review on this? No rush. |
I don't know that this is the right fix. The proximate cause of your issue is that mypy hasn't released a version that supports modularised typeshed; if you use mypy master I believe things should work for the issue you filed. I'd actually be pretty in favour of pretending typing-extensions is a stdlib module (and I think there are a couple good potential reasons to do this). |
@hauntsaninja Should I close this PR and wait for mypy to release? Or can we merge this change? |
Let's wait for the mypy release and see if there still is an issue. |
Obviated by #5233 |
It's not possible to use stubs that depend on
types-typing-extensions
because mypy doesn't allow stubs to overridetyping-extensions
.The solution is to require
typing-extensions
instead oftypes-typing-extensions
since mypy and pyright have built in types for this package.fixes #5065