-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
bugmypy got something wrongmypy got something wrong
Description
When I import backports.zoneinfo
, I get
src/test_checks.py:29:1: error: Library stubs not installed for "backports.zoneinfo" [import]
src/test_checks.py:29:1: note: Hint: "python3 -m pip install types-backports"
src/test_checks.py:29:1: note: (or run "mypy --install-types" to install all missing stub packages)
src/test_checks.py:29:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
However, the types-backports
package is obsolete since python/typeshed#5997; it was replaced with types-backports.ssl_match_hostname
. It never provided stubs for backports.zoneinfo
(which is a py.typed package and doesn't need stubs), only for ssl_match_hostname
.
backports.ssl_match_hostname
provides a 3.7+ feature (https://pypi.org/project/backports.ssl_match_hostname/), so it isn't relevant on any supported version of Python and I don't think mypy needs to recommend installing it. I will submit a PR to remove it from the list of recommended packages.
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrong