Skip to content

Commit 4683ad0

Browse files
committed
Allow filtering constraints with markers
1 parent 312d1d0 commit 4683ad0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

news/8724.bugfix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2020 Resolver: Correctly handle marker evaluation in constraints and exclude
2+
them if their markers do not match the current environment.

src/pip/_internal/resolution/resolvelib/resolver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ def resolve(self, root_reqs, check_supported_wheels):
8080
problem = check_invalid_constraint_type(req)
8181
if problem:
8282
raise InstallationError(problem)
83-
83+
if not req.match_markers():
84+
continue
8485
name = canonicalize_name(req.name)
8586
if name in constraints:
8687
constraints[name] = constraints[name] & req.specifier

0 commit comments

Comments
 (0)