-
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
show: show editable location instead if package is editable (#11638) #11639
Conversation
0e30b3a
to
63edd62
Compare
63edd62
to
a2eb035
Compare
@uranusjr can you look at the CI failure? I can't tell why the error is caused |
Something’s wrong in CI, not your fault. |
src/pip/_internal/commands/show.py
Outdated
@@ -119,7 +119,7 @@ def _get_requiring_packages(current_dist: BaseDistribution) -> Iterator[str]: | |||
yield _PackageInfo( | |||
name=dist.raw_name, | |||
version=str(dist.version), | |||
location=dist.location or "", | |||
location=dist.editable_project_location or dist.location or "", |
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 think this should be a new field, since location does have a valid meaning for editables too and to avoid mixing different semantics in the same field.
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 the location shown in pip list
and that's the actual location from the user's point of view.
what do you suggest as the other field? i think showing an additional editable location
will just make it look confusing
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 the location shown in pip list and that's the actual location from the user's point of view.
In pip list, the column title is Editable project location
and is populated for editables only.
pip list -v
shows an additional Location
column with dist.location
which is where the project metadata is (which is different from the project location for PEP 660 editables).
It is similar in pip inspect
and pip list --format=json
.
So in pip show, it makes sense to show a new Editable project location
field.
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.
changed
4231cc1
to
773a8f5
Compare
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! There are a few tests that need updating to cope with the new field.
cea09c1
to
96732d8
Compare
96732d8
to
e59ff2f
Compare
@uranusjr can you verify this PR? it passes CI now |
Thanks for the contrib @doronz88 ! |
No description provided.