Skip to content

Commit ec42fa5

Browse files
committed
fix collect python version when marker present
1 parent cdb90aa commit ec42fa5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/poetry/puzzle/provider.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,10 @@ def complete_package(self, package: DependencyPackage) -> DependencyPackage:
495495
if not self._python_constraint.allows_any(dep.python_constraint):
496496
continue
497497

498+
marker_python_constraint = get_python_constraint_from_marker(dep.marker)
499+
if not self._python_constraint.allows_any(marker_python_constraint):
500+
continue
501+
498502
if dep.name in self.UNSAFE_PACKAGES:
499503
continue
500504

0 commit comments

Comments
 (0)