Skip to content
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

pip list #752

Merged
merged 31 commits into from
Dec 20, 2012
Merged

pip list #752

merged 31 commits into from
Dec 20, 2012

Conversation

qwcode
Copy link
Contributor

@qwcode qwcode commented Dec 18, 2012

here's the pull from @rafaelcaricio (#675) plus some changes:

  • compliance with the new command registry from @gvalkov
  • the "Package Index Options" group was refactored out into a shared module, since 2 commands use it now
  • no unnecessary conversion from Distribution objects to InstallRequirements
  • comparison using parsed versions, not version strings
  • --uptodate/--outdated excludes editables (like mentioned in the original pull)
  • an --editables" option (like mentioned in the original pull)
  • 2 new options for util.get_installed_distributions: include_editables and editables_only

peer review requested on any of it, especially on the editable output format.
(@pfmoore, @pnasrat, @jezdez, @rafaelcaricio, @hltbra)

sample outputs:

pip list

pip-test-package (0.1.1) editable src at /my/venv/src/pip-test-package
wsgiref (0.1.2)
Pygments (1.5)
mock (1.0b1)

pip list --editables

pip-test-package (0.1.1) editable src at /my/venv/src/pip-test-package

pip list --outdated

mock (CURRENT: 1.0b1 LATEST: 1.0.1)

pip list --uptodate

wsgiref (0.1.2)
Pygments (1.5

dgladkov and others added 29 commits December 15, 2012 19:42
…tions like '--index-url' or '--find-links'. Changing version comparison to use > not !=

All work done here is based on @carljm suggestions made in pull request #235, so that pip outdated gets merged into master asap.
@qwcode
Copy link
Contributor Author

qwcode commented Dec 18, 2012

and I still need to add some docs....

@pnasrat
Copy link
Contributor

pnasrat commented Dec 18, 2012

In general the feature is greate - I'm wondering if we should support output formats, allowing reuse of the output of one command as input to another (pipe friendly). Or maybe a verbose format for the extra thing

One output option should be as a requirement.

pip-test-package==0.1.1

Another would be as RFC-822 supporting metadata http://www.python.org/dev/peps/pep-0426/

Basically I want the output easily parsable by tools without having to resort to regex's to eg extract the version (either sed/cut/awk/etc)

One option would be allow specifying a query format based on some metadata tags eg '%{name}-%{version}' ala RPM/yum or dpkg-query.

@pnasrat
Copy link
Contributor

pnasrat commented Dec 18, 2012

Of course that could be in a follow up to this - don't block on my account

@qwcode
Copy link
Contributor Author

qwcode commented Dec 18, 2012

agreed on output formats, maybe csv and json (good next pull for @rafaelcaricio ?)
pep-426 could be an output format for "pip show" maybe?

also note that the original pull mentioned a "--freeze" option that was just equivalent to "pip freeze", but I'm not sure it's worth it? maybe nice to drop "pip freeze" at some pt after deprecating it for awhile.

for editables, we have to keep in mind that presenting them as "name==version" can be confusing since it looks like a requirement, and that's not the requirement for an editable (rather its usually the vcs url to the origin reference)

as for the default "human readable" format, maybe this instead of the verbiage about "src" (where "pip-test-package" is an editable)

pip-test-package (0.1.1, /my/venv/src/pip-test-package)
wsgiref (0.1.2)

or, maybe since the version for editables often doesn't represent very much during the dev process.

pip-test-package (/my/venv/src/pip-test-package)
wsgiref (0.1.2)

@qwcode qwcode closed this Dec 18, 2012
@qwcode qwcode reopened this Dec 18, 2012
@qwcode
Copy link
Contributor Author

qwcode commented Dec 18, 2012

if we did allow the slight confusion over using "==" for editables, maybe this for the default format.

pip list

pip-test-package==0.1.1 (/my/venv/src/pip-test-package)
wsgiref==0.1.2
Pygments==1.5
mock==1.0b1

pip list --editables

pip-test-package==0.1.1  (/my/venv/src/pip-test-package)

pip list --outdated

mock==1.0b1 (latest: 1.0.1)

pip list --uptodate

wsgiref==0.1.2
Pygments==1.5

pip list --freeze (TBD in a future pull)

-e git+https://github.com/pypa/pip-test-package.git@65cf0a5#egg=pip_test_package-dev
wsgiref==0.1.2
Pygments==1.5
mock==1.0b1

qwcode added a commit that referenced this pull request Dec 20, 2012
@qwcode qwcode merged commit ffad700 into pypa:develop Dec 20, 2012
@qwcode
Copy link
Contributor Author

qwcode commented Dec 20, 2012

merged. I didn't put much effort into the docs for pip list, since I'm already working on a rewrite for the pip docs as a whole.

@rafaelcaricio
Copy link
Contributor

Hi, nice to see that it get finally merged! 👍

It´s a good idea to do a new pull request with the output formats. As soon as possible I will start working on it (right now I´m in the middle of my moving to another country, so I'm a little busy).

Thank you @qwcode and all the guys.

@qwcode qwcode mentioned this pull request Jun 30, 2013
@xavfernandez xavfernandez mentioned this pull request Oct 9, 2015
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants