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

pipenv lock -r is not deterministic #1214

Closed
konstin opened this issue Dec 18, 2017 · 3 comments
Closed

pipenv lock -r is not deterministic #1214

konstin opened this issue Dec 18, 2017 · 3 comments

Comments

@konstin
Copy link

konstin commented Dec 18, 2017

Describe your environment

Ubuntu 17.04, Python 3.5.3, pipenv 9.0.1

Expected result

pipenv lock -r returns the exact same output when given the same Pipfile and Pipfile.lock.

Actual result

pipenv lock -r randomly reorders lines on each run. This becomes a problem when combined with pipenv lock -r > requirements.txt and version control, as it chances requirements.txt even if there is no actual change.

Steps to replicate

Create a project with Pipfile and Pipfile.lock (mine for reference). Run pipenv lock -r.

Workaound

A possible workaround is pipenv lock -r | sort.

@konstin
Copy link
Author

konstin commented Dec 18, 2017

@kennethreitz Why was this closed?

@kennethreitz
Copy link
Contributor

send a pull request if you want to fix it!

@beregon87
Copy link

While not a real solution to the problem, why not generate requirements.txt on the fly when you need it? In fact, I would argue that you shouldn't commit it since at best it just duplicates whatever is in Pipfile and at worst they would differ because someone forgot to do pipenv lock -r > requirements.txt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants