Skip to content

Commit fcd705d

Browse files
authored
Update stubinfo.py for recent typeshed changes (#14265)
Removals from `stubinfo.py`: - `atomicwrites` is archived and deprecated at runtime; stubs were removed from typeshed in python/typeshed#8925 - `attrs` has had inline types for a very long time now - `chardet` recently cut a release with inline types; typeshed's stubs were marked obsolete in python/typeshed#9318 - `cryptography` has had inline types for a very long time now; the only reason why it's still in typeshed is because other typeshed packages need `types-cryptography` as a dependency, and our testing infrastructure therefore can't currently cope with it being removed from typeshed. - `emoji` recently cut a release bundling stubs with the runtime package; typeshed's stubs were marked obsolete in python/typeshed#9051 - `termcolor` recently cut a release with inline types; typeshed's stubs were marked obsolete in python/typeshed#8746 - `prettytable` recently cut a release with inline types; typeshed's stubs were marked obsolete in python/typeshed#9023 Additions: - Stubs for `Xlib` were added in python/typeshed#9279 - Stubs for `consolemenu` were added in python/typeshed#8820 - Stubs for `dockerfile_parse` were added in python/typeshed#9305 - Stubs for `flask_migrate` were added in python/typeshed#8967 - Stubs for `paho.mqtt` were added in python/typeshed#8853 - Stubs for `pycocotools` were added in python/typeshed#9086 - Stubs for many `pywin32` modules were added in python/typeshed#8825, and multiple follow-up PRs - Stubs for `pyscreeze` were added in python/typeshed#8823
1 parent 2e3144c commit fcd705d

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

mypy/stubinfo.py

+21-7
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ def stub_package_name(prefix: str) -> str:
2020
# Package name can have one or two components ('a' or 'a.b').
2121
legacy_bundled_packages = {
2222
"aiofiles": "types-aiofiles",
23-
"atomicwrites": "types-atomicwrites",
24-
"attr": "types-attrs",
2523
"backports": "types-backports",
2624
"backports_abc": "types-backports_abc",
2725
"bleach": "types-bleach",
2826
"boto": "types-boto",
2927
"cachetools": "types-cachetools",
30-
"chardet": "types-chardet",
3128
"click_spinner": "types-click-spinner",
3229
"contextvars": "types-contextvars",
3330
"croniter": "types-croniter",
@@ -38,7 +35,6 @@ def stub_package_name(prefix: str) -> str:
3835
"decorator": "types-decorator",
3936
"deprecated": "types-Deprecated",
4037
"docutils": "types-docutils",
41-
"emoji": "types-emoji",
4238
"first": "types-first",
4339
"geoip2": "types-geoip2",
4440
"gflags": "types-python-gflags",
@@ -64,7 +60,6 @@ def stub_package_name(prefix: str) -> str:
6460
"six": "types-six",
6561
"slugify": "types-python-slugify",
6662
"tabulate": "types-tabulate",
67-
"termcolor": "types-termcolor",
6863
"toml": "types-toml",
6964
"typed_ast": "types-typed-ast",
7065
"tzlocal": "types-tzlocal",
@@ -83,10 +78,14 @@ def stub_package_name(prefix: str) -> str:
8378
# Note that these packages are omitted for now:
8479
# sqlalchemy: It's unclear which stub package to suggest. There's also
8580
# a mypy plugin available.
81+
# pika: typeshed's stubs are on PyPI as types-pika-ts.
82+
# types-pika already exists on PyPI, and is more complete in many ways,
83+
# but is a non-typeshed stubs package.
8684
non_bundled_packages = {
8785
"MySQLdb": "types-mysqlclient",
8886
"PIL": "types-Pillow",
8987
"PyInstaller": "types-pyinstaller",
88+
"Xlib": "types-python-xlib",
9089
"annoy": "types-annoy",
9190
"appdirs": "types-appdirs",
9291
"aws_xray_sdk": "types-aws-xray-sdk",
@@ -100,9 +99,11 @@ def stub_package_name(prefix: str) -> str:
10099
"chevron": "types-chevron",
101100
"colorama": "types-colorama",
102101
"commonmark": "types-commonmark",
103-
"cryptography": "types-cryptography",
102+
"consolemenu": "types-console-menu",
103+
"crontab": "types-python-crontab",
104104
"d3dshot": "types-D3DShot",
105105
"dj_database_url": "types-dj-database-url",
106+
"dockerfile_parse": "types-dockerfile-parse",
106107
"docopt": "types-docopt",
107108
"editdistance": "types-editdistance",
108109
"entrypoints": "types-entrypoints",
@@ -115,6 +116,7 @@ def stub_package_name(prefix: str) -> str:
115116
"flake8_simplify": "types-flake8-simplify",
116117
"flake8_typing_imports": "types-flake8-typing-imports",
117118
"flask_cors": "types-Flask-Cors",
119+
"flask_migrate": "types-Flask-Migrate",
118120
"flask_sqlalchemy": "types-Flask-SQLAlchemy",
119121
"fpdf": "types-fpdf2",
120122
"gdb": "types-gdb",
@@ -134,22 +136,28 @@ def stub_package_name(prefix: str) -> str:
134136
"oauthlib": "types-oauthlib",
135137
"openpyxl": "types-openpyxl",
136138
"opentracing": "types-opentracing",
139+
"paho.mqtt": "types-paho-mqtt",
137140
"parsimonious": "types-parsimonious",
138141
"passlib": "types-passlib",
139142
"passpy": "types-passpy",
143+
"peewee": "types-peewee",
140144
"pep8ext_naming": "types-pep8-naming",
141145
"playsound": "types-playsound",
142-
"prettytable": "types-prettytable",
143146
"psutil": "types-psutil",
144147
"psycopg2": "types-psycopg2",
145148
"pyaudio": "types-pyaudio",
146149
"pyautogui": "types-PyAutoGUI",
150+
"pycocotools": "types-pycocotools",
147151
"pyflakes": "types-pyflakes",
148152
"pygments": "types-Pygments",
149153
"pyi_splash": "types-pyinstaller",
150154
"pynput": "types-pynput",
155+
"pythoncom": "types-pywin32",
156+
"pythonwin": "types-pywin32",
157+
"pyscreeze": "types-PyScreeze",
151158
"pysftp": "types-pysftp",
152159
"pytest_lazyfixture": "types-pytest-lazy-fixture",
160+
"pywintypes": "types-pywin32",
153161
"regex": "types-regex",
154162
"send2trash": "types-Send2Trash",
155163
"slumber": "types-slumber",
@@ -163,6 +171,12 @@ def stub_package_name(prefix: str) -> str:
163171
"urllib3": "types-urllib3",
164172
"vobject": "types-vobject",
165173
"whatthepatch": "types-whatthepatch",
174+
"win32": "types-pywin32",
175+
"win32api": "types-pywin32",
176+
"win32con": "types-pywin32",
177+
"win32com": "types-pywin32",
178+
"win32comext": "types-pywin32",
179+
"win32gui": "types-pywin32",
166180
"xmltodict": "types-xmltodict",
167181
"xxhash": "types-xxhash",
168182
"zxcvbn": "types-zxcvbn",

0 commit comments

Comments
 (0)