-
Notifications
You must be signed in to change notification settings - Fork 3k
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 a "pip debug" command #6638
Conversation
64a719d
to
fe933d2
Compare
536c295
to
3b35cfd
Compare
Thanks for the quick review, @pradyunsg! I incorporated all of your suggestions (all great). |
I also added a few functional tests. |
7667496
to
77de25f
Compare
@xavfernandez Any thoughts? We can grow this output over time as I'm sure there are many things missing. |
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 is a really good start 👍
It would also need basic documentation (at least a docs/html/reference/pip_debug.rst
) and most importantly (IMHO), strongly emphasize that the output and the options of this command are provisional and might change without notice.
Thanks again, @pradyunsg and @xavfernandez. I merged this and added issue #6672 for the docs suggestion that @xavfernandez made. |
Hurrah! :D |
This PR implements an initial
pip debug
command, as suggested / discussed e.g. recently here (in issue #4228) and much earlier here (in issue #5813).The initial implementation is focused mainly on listing the compatible tags (e.g. the output of
pep425tags.get_supported()
), since that need has come up in a number of issues. One feature of the current implementation is that it accepts the same--platform
,--python-version
,--implementation
, and--abi
options that pipdownload
andinstall
accept. This will help with issues like that expressed in #6121, where currently people have no way of knowing what tags result when they provide certain options. This command gives people a way to experiment and try different things.The command also gives people a way to experiment in response to failures to match candidate wheels, e.g. using the new log messages introduced in PR #6540.
Also, by default the command shows only the first 10 tags (though we can change this number). Passing
--verbose
shows all of them (which can be in the several hundreds). Either way, the total count is shown in the first line next to "Compatible tags," along with the tag-related option values that were provided explicitly by the user.