You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As part of modular typeshed, we split off third party stubs into their own distributions (#2491). But one of these was not quite like the others: typing_extensions.
In #5233 we decided to special case and distribute typing_extensions along with the rest of the stdlib. Here's a quick summary of why:
typing_extensions is the only thing outside of the stdlib that stdlib stubs depend on.
Since stdlib stubs themselves aren't packaged as a distribution, there's no way to ensure that typing_extension stubs are present.
This causes issues in cases where types-typing-extensions is not installed. These issues are extra bad, because users may not even be aware of typing_extensions and are just trying to use stdlib types.
For a concrete example, using mypy with --python-executable pointed at a venv without types-typing-extensions would result in hard to diagnose failures
Another example of code I've seen that would no longer check due to this issue is where people guard an typing_extensions import with if TYPE_CHECKING and thereby avoid having to install anything third party.
typing_extensions' whole point of existence is to be special cased :-)
As part of modular typeshed, we split off third party stubs into their own distributions (#2491). But one of these was not quite like the others: typing_extensions.
In #5233 we decided to special case and distribute typing_extensions along with the rest of the stdlib. Here's a quick summary of why:
typing_extensions
is the only thing outside of the stdlib that stdlib stubs depend on.typing_extension
stubs are present.types-typing-extensions
is not installed. These issues are extra bad, because users may not even be aware oftyping_extensions
and are just trying to use stdlib types.--python-executable
pointed at a venv withouttypes-typing-extensions
would result in hard to diagnose failurestyping_extensions
import withif TYPE_CHECKING
and thereby avoid having to install anything third party.typing_extensions
' whole point of existence is to be special cased :-)Relevant links:
#5229 (comment)
#5109 (comment)
#5233
The text was updated successfully, but these errors were encountered: