-
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
Output of "pip freeze" and "pip list --format=freeze" differ for packages installed via Direct URLs #8176
Comments
@deveshks I'm personally not entirely sure both should do the same, or if the difference should be documented (and tested). |
Maybe they should do different things, given that there’s indeed people wanting the old behaviour (i.e. #8174). But it is so entirely not obvious which one should do which. Maybe we should get the new |
Somewhat related to #7157. |
I think if we want to start looking for a After that, we can decide on the deprecation cycle to remove Do we want to switch to #7157 to start discussing on that, and include the issue here as part of that discussion? Or do we want to fix this in the next release, along with the |
Is there any way to prevent
|
pip wouldn’t record the package’s source URL if you don’t install the package by its path/URL:
|
@uranusjr that works if you only have one or two packages to install or already have a requirements.txt ready. What about installing 30 new packages from wheels? I can easily script it to ‘’’pip install —no-index -f . [List of all wheels names in current directory]’’’. However, with new pip, freezing such an install brings the complete wheel path into the requirements.txt. :( To follow your suggestion I would have to somehow strip out all the wheel file names down to just package names. Is there another easier way to install all wheels In a directory regardless what wheels are in there? |
I’m doing this in Windows 10, but the install is a python script. I’ll see about just stripping out the package names. Yes, |
softwarefactory-project tutorial [1] "Scenario 1" does not fail as it should for version 3.4, because the "git+https://..." dependency is printed as "demolib @ git+https://...", which is not listed as an installed package because it does not match version compare '==' Starting from pip 20.1, "freeze" command outputs requirements package using direct references [2], a Helper was introduced by [3] used in freeze by [4] This change adds the urlspec info extraction. Additional Info: - [5] requirements format PEP508 - [6] PEP610 referenced by [4] - [7] & [8] "pip freeze" vs "pip list --format=freeze" [1] https://www.softwarefactory-project.io/zuul-hands-on-part-6-cross-project-dependencies.html [2] https://www.python.org/dev/peps/pep-0440/#direct-references [3] pypa/pip@6f689f6 [4] pypa/pip@196706d [5] https://www.python.org/dev/peps/pep-0508/ [6] https://www.python.org/dev/peps/pep-0610/ [7] pypa/pip#8174 [8] pypa/pip#8176 Change-Id: Id038149201829862f9944dfd8d7ceeafac670f3d
So will I always have to use |
Originally found while triaging #8174
Environment
Description
On performing an install using a direct URL in a virtualenv with
wheel
present, the output ofpip freeze
andpip list --format=freeze
differ in the way the package is listedExpected behavior
pip list --format=freeze
follows the output format style ofpip freeze
, and so if the output of pip freeze changes in the case of installations with direct URL,pip list --format=freeze
should follow suit and do the same.How to Reproduce
pip freeze
andpip list --format=freeze
differOutput
The text was updated successfully, but these errors were encountered: