-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Vendor distutils stubs #4691
base: main
Are you sure you want to change the base?
Vendor distutils stubs #4691
Conversation
# TODO: Include distutils stubs with package once we're confident in them | ||
# "typings/distutils-stubs", |
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.
We don't need to ship anything as long as typeshed provides stubs for setuptools/_distutils
. We can synchronize once ready.
As I mentioned in the issue, there's also always the option to ship it as a different package (in which case it could live completely separately from setuptools and pypa/distutils)
# Use our custom stubs for distutils | ||
mypy_path = $MYPY_CONFIG_FILE_DIR/typings |
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.
I used pyright's default of typings
so that I didn't have to configure it there. But that folder name can be arbitrary.
b1fec5c
to
7ea98d5
Compare
98e4484
to
c440538
Compare
c440538
to
3dd8b4e
Compare
c01d02b
to
53ed329
Compare
53ed329
to
20bda1b
Compare
Summary of changes
Note: Please consider #4704 as an alternative !
See commit history. Basically I copied
stdlib/distutils
from typeshed, then appliedstubs/setuptools/_distutils
from typeshed on top.The following "fixups" have been brought back into typeshed and pypa/distutils, if you want we could wait for them to be merged and then I can rebase my changes here so reduce the amount of changes in my "fixups" commit:
I think these could go directly in https://github.com/pypa/distutils, vendoring them back into setuptools using the already existing process, to make it possibly easier to keep stubs and implementation in sync. But increasing the charge of pypa/distutils contributors. Do note it has to exist in a folder named
distutils
ordistutils-stubs
, preferably by itself.Closes #4689
Pull Request Checklist
newsfragments/
. (no public facing changes as long as they're not published)(See documentation for details)