-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing exception classes in setuptools.errors
#10057
Conversation
This comment has been minimized.
This comment has been minimized.
setuptools.errors
setuptools.errors
Small correction: So thanks for adding missing stubs! |
setuptools.errors
setuptools.errors
This is true, but it is also true, looking at it again, that many exception classes were removed from |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I've tweaked the PR a little bit so that it's a bit more faithful to what happens at runtime. Will merge once CI passes.
setuptools.errors
setuptools.errors
Given the push for the deprecation of distutils, it'd be a good idea indeed to ensure that all stubs in setuptools are accounted for. There aren't too many stubtest errors left. I should have a PR ready pretty soon. |
Diff from mypy_primer, showing the effect of this PR on open source code: sphinx (https://github.com/sphinx-doc/sphinx)
- sphinx/setup_command.py:23:5: error: Module "setuptools.errors" has no attribute "ExecError" [attr-defined]
+ sphinx/setup_command.py:26:5: error: Incompatible import of "ExecError" (imported name has type "Type[distutils.errors.DistutilsExecError]", local name has type "Type[setuptools._distutils.errors.DistutilsExecError]") [assignment]
|
Awesome, thanks so much for the extremely fast response!!! |
This is to ensure that we get python/typeshed#10057 so that #277 is resolved.
This is to ensure that we get python/typeshed#10057 so that #277 is resolved.
As part of the
distutils
deprecation implemented in #9795 by @Avasam, severaldistutils
-related exceptions were removed fromsetuptools.errors
. I think that some exceptions may have unintentionally been removed, so I have added them back in this PR.Indeed, evidence that
setuptools.errors
should not be entirely deprecated can be found in PEP 632, wheresetuptools
is suggested as a substitute fordistutils.errors
.