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

Can one depend on requirements.txt items being installed in order? #3480

Closed
jwg4 opened this issue Feb 11, 2016 · 3 comments
Closed

Can one depend on requirements.txt items being installed in order? #3480

jwg4 opened this issue Feb 11, 2016 · 3 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@jwg4
Copy link
Contributor

jwg4 commented Feb 11, 2016

The behavior I have observed with current versions of pip is that the items in a requirements file are installed in the same order as the file. I would like to know whether this is something that one can depend on or an implementation detail that could change.

The section https://pip.pypa.io/en/stable/user_guide/#requirements-files in the docs seems to imply from some of the suggested use-cases that requirements would be installed in order, but doesn't say so explicitly. There are also a couple of issues where people have found that recent versions of pip install in order which is what they want, but none of them have been closed by someone saying that this is definitely the case: #24 #1044 #2362

Whatever the answer to the question, maybe this could be seen as a documentation bug, since it would great if the above section of the docs made it clear whether to rely on the order of the file or not?

@rbtcollins
Copy link

No, it is not guaranteed; it is considered an implementation detail. currently, the items are sorted topologically, with loops broken such that the first mentioned thing comes first - but we reserve the right to change this at any point. I agree docs could be improved.

@jwg4
Copy link
Contributor Author

jwg4 commented Feb 11, 2016

Thanks for the extremely quick response!

jwg4 added a commit to jwg4/pip that referenced this issue Feb 11, 2016
As per pypa#3480 (comment) there is no guarantee over the order in which items in a requirements.txt file might be installed.
@jwg4
Copy link
Contributor Author

jwg4 commented Feb 11, 2016

Added a PR to mention this in the docs. #3481

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

No branches or pull requests

2 participants