Merged
Conversation
This comment has been minimized.
This comment has been minimized.
…Avasam/typeshed into remove-setuptools-pkg_resources
This comment has been minimized.
This comment has been minimized.
Avasam
commented
Jan 6, 2025
| Given that `pkg_resources` is typed since `setuptools >= 71.1`, \ | ||
| it is no longer included with `types-setuptools`. | ||
| """ | ||
| requires = ["setuptools"] # For pkg_resources |
Collaborator
Author
There was a problem hiding this comment.
Oh, a stub can't depend on the library it stubs >.<
Since this restriction is in place for security reasons, would it make sense to allow types-Foo to require Foo ?
stub_uploader.metadata.InvalidRequires: Expected dependency setuptools to be listed in setuptools's requires_dist or the sdist's *.egg-info/requires.txt
This comment has been minimized.
This comment has been minimized.
Contributor
|
Diff from mypy_primer, showing the effect of this PR on open source code: scipy (https://github.com/scipy/scipy)
- scipy/_build_utils/_generate_blas_wrapper.py:31: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
+ scipy/_build_utils/tempita/_tempita.py:1041: error: Library stubs not installed for "pkg_resources" [import-untyped]
+ scipy/_build_utils/tempita/_tempita.py:1041: note: Hint: "python3 -m pip install types-setuptools"
+ scipy/_build_utils/tempita/_tempita.py:1041: note: (or run "mypy --install-types" to install all missing stub packages)
+ scipy/_build_utils/tempita/_tempita.py:1041: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
+ scipy/_lib/unuran/get_and_clean_unuran.py:8: error: Library stubs not installed for "pkg_resources" [import-untyped]
pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/exception.py:51: error: Library stubs not installed for "pkg_resources" [import-untyped]
+ pwndbg/exception.py:51: note: Hint: "python3 -m pip install types-setuptools"
+ pwndbg/exception.py:51: note: (or run "mypy --install-types" to install all missing stub packages)
|
This was referenced Feb 14, 2025
Collaborator
Author
|
The primer hits should be fixed by hauntsaninja/mypy_primer#131 (CC @hauntsaninja ) stub_uploader support is added in typeshed-internal/stub_uploader#159 |
Avasam
commented
Mar 3, 2025
| If using `setuptools >= 71.1` *only* for `pkg_resources`, | ||
| you don't need `types-setuptools` since `pkg_resources` is now typed.\ | ||
| Given that `pkg_resources` is typed since `setuptools >= 71.1`, \ | ||
| it is no longer included with `types-setuptools`. |
Collaborator
Author
There was a problem hiding this comment.
Alternative:
Suggested change
| it is no longer included with `types-setuptools`. | |
| `pkg_resources-stubs` is no longer included with `types-setuptools`. |
srittau
approved these changes
Mar 4, 2025
5 tasks
wmfgerrit
pushed a commit
to wikimedia/operations-software-pywmflib
that referenced
this pull request
Mar 11, 2025
Version 75.8.2.20250305 (2025-03-05) removed setuptools/pkg_resources: python/typeshed#13369 Since we still require to support Python 3.7 from Debian Buster, we need to keep using pkg_resources. Cap types-setuptools version to the versions before pkg_resources types got removed. Change-Id: Ic9c26144337687bd5db2010eab32d4554afb9d02
mmingyu
pushed a commit
to mmingyu/typeshed
that referenced
this pull request
May 16, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12398