Skip to content

Commit

Permalink
Fixes pipenv lock nondeterminism with environment markers (#5299)
Browse files Browse the repository at this point in the history
* Fixes pipenv lock nondeterminism with environment markers
  • Loading branch information
dqkqd authored Aug 27, 2022
1 parent 4b9fc02 commit d33f4ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/5299.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Sorting ``constraints`` before resolving, which fixes ``pipenv lock`` generates nondeterminism environment markers.
1 change: 1 addition & 0 deletions pipenv/utils/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ def constraints(self):
# Only use default_constraints when installing dev-packages
if self.dev:
self._constraints += self.default_constraints
self._constraints.sort(key=lambda ireq: ireq.name)
return self._constraints

@contextlib.contextmanager
Expand Down

0 comments on commit d33f4ec

Please sign in to comment.