-
-
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
Update setuptools to v69 #11066
Update setuptools to v69 #11066
Conversation
@@ -1 +1 @@ | |||
def newer_pairwise_group(sources_groups, targets): ... | |||
from ._distutils._modified import newer_group as newer_group, newer_pairwise_group as newer_pairwise_group |
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.
This entire module (stubs/setuptools/setuptools/dep_util.pyi
) is deprecated in favor of setuptools.modified
I could keep the defs instead of importing from _distutils
so I can mark with @deprecated
This comment has been minimized.
This comment has been minimized.
from ._distutils._modified import ( | ||
newer as newer, | ||
newer_group as newer_group, | ||
newer_pairwise as newer_pairwise, | ||
newer_pairwise_group as newer_pairwise_group, | ||
) |
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 could define the methods here instead of in setuptools/_distutils/_modified
to avoid a adding a private module
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.
Better to define them where they're defined at runtime imo, as you currently have it
I gather |
This comment has been minimized.
This comment has been minimized.
Yep, if it makes it clearer, this is what it'd look like using |
Diff from mypy_primer, showing the effect of this PR on open source code: pwndbg (https://github.com/pwndbg/pwndbg)
+ pwndbg/exception.py:8: note: In module imported here:
bandersnatch (https://github.com/pypa/bandersnatch)
+ src/bandersnatch/filter.py:8: note: In module imported here:
|
Superseeded by #11069 |
This is an attempt at closing #11049 without needing any stubtest update.
The main point is about removing
pkg_resources._vendor
and addingpackaging
to the requirementsEdit: Looks like either stubtest or stub_uploader is gonna need an update to keep the packaging subclassing.
Separatly, I'm not sure how to best handle
newer_pairwise_group
. typing it as adef
stubtest sayserror: setuptools.modified.newer_pairwise_group is not a function
. typing is aspartial[Incomplete]
looses parameters signature (ref #8703). And pyright seems to have some special handling offunctools.partial
seeing the following (which also validate correct parameter names and types in the cli):I feel like I should go with an allowlist entry for mypy users.