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

stdlib pkg exclusions for pip list/freeze #1606

Merged
merged 2 commits into from Mar 5, 2014

Conversation

Projects
None yet
2 participants
Contributor

qwcode commented Mar 1, 2014

a redo of #1577 for develop branch

excludes wsgiref and argparse from pip list and freeze

contains some refactor to isolate the python version variation into the compatibility module.

Just wanted to share my opinion that excluding legitimately installed packages like setuptools, distribute and pip silently does not feel right. There should be at least information about what packages are excluded (in case of freeze it should take a form of a comment so that it can be placed in requirements file). Better yet this should be an option so that users could decide themselves what packages if any they want to exclude. This does not and should not prevent emitting information about excluded packages as described above.

Contributor

qwcode commented Mar 1, 2014

to be clear, freeze already excludes pip/setuptools/distribute. so this is not changing that.

list shows everything. that is not changing either.

this only makes it so wsgiref and argparse (on >=py27) don't show in list or freeze

typically, requirements files (built from pip freeze) are used across different versions of pip/setuptools, so burning those versions into the file is rarely what's wanted, and since pip/setuptools are the install tools themselves, it makes sense that they be controlled external to requirements files.

But despite all that, I guess I'm still open to an option to show all for pip freeze, if you can explain your reason for wanting it? are you literally wanting a pip freeze generated requirements file to control the version of pip and setuptools?

are you literally wanting a pip freeze generated requirements file to control the version of pip and setuptools?

I don't find it as an odd thing to be wanted :)
As requirements file can contain options for pip, someone might want to ensure that the proper version of pip (able to understand these options) would be available.
Just thinking out loud…

Contributor

qwcode commented Mar 2, 2014

I don't find it as an odd thing to be wanted :)

fair enough, but open up another issue for it, since this issue doesn't change that pre-existing behavior.

Contributor

qwcode commented Mar 2, 2014

@piotr-dobrogost btw, with pip 1.5 able to install from wheel without setuptools, I can see a real case where it's meaningful for setuptools to be listed, i.e. when one of the packages needs setuptools due to an import of pkg_resources, but the install is just using pip (and no setuptools) to install from wheel.

qwcode added a commit that referenced this pull request Mar 5, 2014

Merge pull request #1606 from qwcode/stdlib_pkg_filter
stdlib pkg exclusions for pip list/freeze

@qwcode qwcode merged commit ef80b67 into pypa:develop Mar 5, 2014

1 check was pending

default The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment