Skip to content

Commit

Permalink
Update stubinfo.py for recent typeshed changes (#14265)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
AlexWaygood authored Dec 20, 2022
1 parent 2e3144c commit fcd705d
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions mypy/stubinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@ def stub_package_name(prefix: str) -> str:
# Package name can have one or two components ('a' or 'a.b').
legacy_bundled_packages = {
"aiofiles": "types-aiofiles",
"atomicwrites": "types-atomicwrites",
"attr": "types-attrs",
"backports": "types-backports",
"backports_abc": "types-backports_abc",
"bleach": "types-bleach",
"boto": "types-boto",
"cachetools": "types-cachetools",
"chardet": "types-chardet",
"click_spinner": "types-click-spinner",
"contextvars": "types-contextvars",
"croniter": "types-croniter",
Expand All @@ -38,7 +35,6 @@ def stub_package_name(prefix: str) -> str:
"decorator": "types-decorator",
"deprecated": "types-Deprecated",
"docutils": "types-docutils",
"emoji": "types-emoji",
"first": "types-first",
"geoip2": "types-geoip2",
"gflags": "types-python-gflags",
Expand All @@ -64,7 +60,6 @@ def stub_package_name(prefix: str) -> str:
"six": "types-six",
"slugify": "types-python-slugify",
"tabulate": "types-tabulate",
"termcolor": "types-termcolor",
"toml": "types-toml",
"typed_ast": "types-typed-ast",
"tzlocal": "types-tzlocal",
Expand All @@ -83,10 +78,14 @@ def stub_package_name(prefix: str) -> str:
# Note that these packages are omitted for now:
# sqlalchemy: It's unclear which stub package to suggest. There's also
# a mypy plugin available.
# pika: typeshed's stubs are on PyPI as types-pika-ts.
# types-pika already exists on PyPI, and is more complete in many ways,
# but is a non-typeshed stubs package.
non_bundled_packages = {
"MySQLdb": "types-mysqlclient",
"PIL": "types-Pillow",
"PyInstaller": "types-pyinstaller",
"Xlib": "types-python-xlib",
"annoy": "types-annoy",
"appdirs": "types-appdirs",
"aws_xray_sdk": "types-aws-xray-sdk",
Expand All @@ -100,9 +99,11 @@ def stub_package_name(prefix: str) -> str:
"chevron": "types-chevron",
"colorama": "types-colorama",
"commonmark": "types-commonmark",
"cryptography": "types-cryptography",
"consolemenu": "types-console-menu",
"crontab": "types-python-crontab",
"d3dshot": "types-D3DShot",
"dj_database_url": "types-dj-database-url",
"dockerfile_parse": "types-dockerfile-parse",
"docopt": "types-docopt",
"editdistance": "types-editdistance",
"entrypoints": "types-entrypoints",
Expand All @@ -115,6 +116,7 @@ def stub_package_name(prefix: str) -> str:
"flake8_simplify": "types-flake8-simplify",
"flake8_typing_imports": "types-flake8-typing-imports",
"flask_cors": "types-Flask-Cors",
"flask_migrate": "types-Flask-Migrate",
"flask_sqlalchemy": "types-Flask-SQLAlchemy",
"fpdf": "types-fpdf2",
"gdb": "types-gdb",
Expand All @@ -134,22 +136,28 @@ def stub_package_name(prefix: str) -> str:
"oauthlib": "types-oauthlib",
"openpyxl": "types-openpyxl",
"opentracing": "types-opentracing",
"paho.mqtt": "types-paho-mqtt",
"parsimonious": "types-parsimonious",
"passlib": "types-passlib",
"passpy": "types-passpy",
"peewee": "types-peewee",
"pep8ext_naming": "types-pep8-naming",
"playsound": "types-playsound",
"prettytable": "types-prettytable",
"psutil": "types-psutil",
"psycopg2": "types-psycopg2",
"pyaudio": "types-pyaudio",
"pyautogui": "types-PyAutoGUI",
"pycocotools": "types-pycocotools",
"pyflakes": "types-pyflakes",
"pygments": "types-Pygments",
"pyi_splash": "types-pyinstaller",
"pynput": "types-pynput",
"pythoncom": "types-pywin32",
"pythonwin": "types-pywin32",
"pyscreeze": "types-PyScreeze",
"pysftp": "types-pysftp",
"pytest_lazyfixture": "types-pytest-lazy-fixture",
"pywintypes": "types-pywin32",
"regex": "types-regex",
"send2trash": "types-Send2Trash",
"slumber": "types-slumber",
Expand All @@ -163,6 +171,12 @@ def stub_package_name(prefix: str) -> str:
"urllib3": "types-urllib3",
"vobject": "types-vobject",
"whatthepatch": "types-whatthepatch",
"win32": "types-pywin32",
"win32api": "types-pywin32",
"win32con": "types-pywin32",
"win32com": "types-pywin32",
"win32comext": "types-pywin32",
"win32gui": "types-pywin32",
"xmltodict": "types-xmltodict",
"xxhash": "types-xxhash",
"zxcvbn": "types-zxcvbn",
Expand Down

0 comments on commit fcd705d

Please sign in to comment.