-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
bpo-32156: Remove unused imports #4614
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
Changes from all commits
b59319b
e0d2720
1796333
3ba8726
dda2142
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
from distutils.spawn import spawn | ||
from distutils.file_util import move_file | ||
from distutils.dir_util import mkpath | ||
from distutils.dep_util import newer_pairwise, newer_group | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this function used at all? In any case left this on distutils experts. This is very old and stable code. Maybe it is a bug that newer_pairwise is not used. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's part of the public API:
An unused import is a bug, I don't think that not using a function is a bug :-) The code uses newer_group(). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but maybe newer_pairwise() should be used instead of newer_group(). Or there is a typo in the name of newer_pairwise, and this is why it can't be searched in the code. Let distutils experts to review this change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I looked at the code, and I don't see how it could be a "typo". newer_pairwise() expects a list of objects in the second argument, whereas newer_group() expects a single "target" as the second argument. The code looks perfectly fine:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems good. (In any case, if it was a mistake to use newer_group, the mistake has been here for a long time. |
||
from distutils.dep_util import newer_group | ||
from distutils.util import split_quoted, execute | ||
from distutils import log | ||
|
||
|
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.
Let email experts to review this change.