Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

arguments to freeze are used to filter installed packages #858

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants

AvdN commented Mar 23, 2013

Any arguments to the freeze command used to be discarded. That makes freeze less useful in finding which versions of a few specific packages you have installed, especially if the list is long.

This change makes pip freeze only output that have an argument as part of the package name so you can do:
pip freeze xl pymongo
and get
openpyxl==1.6.1
pymongo==2.5
xlrd==0.9.0
xlutils==1.5.2
xlwt==0.7.4
and not a list of 158 packages. The comparison is done lowercase.

You can of course pipe the output of pip freeze through fgrep , but especially when trying to select multiple patterns in one go, that is not trivial.

arguments to freeze are now used to filter only those installed packages
that have a part of the name that matches one of the arguments
comparison is lower case
Contributor

pnasrat commented Mar 30, 2013

This needs tests and documentation updates before considering.

I'd also probably argue that we'd want it to be pip freeze --match rather than defaulting to a fuzzy match based on the args.

@qwcode any strong opinion from you on this?

Contributor

qwcode commented Mar 30, 2013

not sure, I'm just focused on what's tagged for 1.4 right now, which is mostly about wheel.

Contributor

msabramo commented Dec 21, 2014

Note that #2234 implements this as well (and does a bunch of other cool stuff).

$ pip freeze pytest pytest-cache
pytest==2.6.4
pytest-cache==1.0

@AvdN AvdN referenced this pull request Dec 22, 2014

Closed

Freeze with args #1308

Contributor

msabramo commented Mar 10, 2015

I'd suggest closing in favor of #2234

@dstufft dstufft closed this May 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment