Skip to content

Update stubinfo for latest typeshed - #22311

Open
hoangchunghien wants to merge 1 commit into
python:masterfrom
hoangchunghien:update-stubinfo
Open

hoangchunghien wants to merge 1 commit into
python:masterfrom
hoangchunghien:update-stubinfo

Conversation

@hoangchunghien

Copy link
Copy Markdown

Updated using misc/update-stubinfo.py against typeshed at 17cbf25.

  • Added the 15 stub packages typeshed has gained since the last update: behave, cups, datauri, geojson, httpretty, ibm_db_ctx, kafka, pyogrio, pyphen, rasterio, resampy, scp, tinycss2, titlecase, webtest.
  • Removed the 9 that typeshed no longer has: binaryornot, fpdf, icalendar, passlib, pyrfc3339, pysftp, sass, sassutils, ujson.
  • teststubinfo.py used sassutils / types-libsass as its example of a module whose stub distribution has a different name. Since libsass is gone, socks / types-PySocks takes that role.

After the change the script reports nothing to add or remove. teststubinfo.py, ruff, black and the self check pass.

Not included, in case you want them in the same pass: nine stubs that are still in typeshed but marked obsolete-since, because the packages now ship their own types: requests (2.34.0), cachetools (7.1.0), decorator (5.3.0), Deprecated (3.0.0), click-spinner (0.2.0), auth0-python (5.4.0), Flask-Cors (6.0.4), punq (0.9.0) and unidiff (1.0.0). Removing them would stop the "install types-X" hint for people on older releases, so I left that decision to you. typeshed will remove those stubs once they have been obsolete for six months, and the script will list them then.

Updated using misc/update-stubinfo.py against typeshed 17cbf25: add the 15
stub packages typeshed has gained and drop the 9 it no longer has. The
test used sassutils (types-libsass, now gone) as its example of a module
whose stub distribution has a different name; socks / types-PySocks
plays that part now.
@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

cloud-init (https://github.com/canonical/cloud-init)
+ cloudinit/sources/helpers/cloudsigma.py:70: note: (or run "mypy --install-types" to install all missing stub packages)
- tests/integration_tests/bugs/test_gh671.py:8: error: Library stubs not installed for "passlib.hash"  [import-untyped]
- tests/integration_tests/bugs/test_gh671.py:8: error: Library stubs not installed for "passlib"  [import-untyped]
+ tests/integration_tests/bugs/test_gh671.py:8: error: Cannot find implementation or library stub for module named "passlib.hash"  [import-not-found]
+ tests/integration_tests/bugs/test_gh671.py:8: error: Cannot find implementation or library stub for module named "passlib"  [import-not-found]
+ cloudinit/distros/netbsd.py:24: error: Cannot find implementation or library stub for module named "passlib.hash"  [import-not-found]
- cloudinit/distros/netbsd.py:24: error: Library stubs not installed for "passlib.hash"  [import-untyped]
- cloudinit/distros/netbsd.py:24: note: Hint: "python3 -m pip install types-passlib"
- cloudinit/distros/netbsd.py:24: note: (or run "mypy --install-types" to install all missing stub packages)
- cloudinit/sources/DataSourceAzure.py:167: error: Library stubs not installed for "passlib.hash"  [import-untyped]
- cloudinit/sources/DataSourceAzure.py:167: error: Library stubs not installed for "passlib"  [import-untyped]
+ cloudinit/sources/DataSourceAzure.py:167: error: Cannot find implementation or library stub for module named "passlib.hash"  [import-not-found]
+ cloudinit/sources/DataSourceAzure.py:167: error: Cannot find implementation or library stub for module named "passlib"  [import-not-found]
- tests/unittests/sources/test_azure.py:16: error: Library stubs not installed for "passlib.hash"  [import-untyped]
- tests/unittests/sources/test_azure.py:16: error: Library stubs not installed for "passlib"  [import-untyped]
+ tests/unittests/sources/test_azure.py:16: error: Cannot find implementation or library stub for module named "passlib.hash"  [import-not-found]
+ tests/unittests/sources/test_azure.py:16: error: Cannot find implementation or library stub for module named "passlib"  [import-not-found]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ Proxy