Skip to content

Commit

Permalink
always recalculate python markers on depenedency
Browse files Browse the repository at this point in the history
... when updating the marker
  • Loading branch information
dimbleby committed Feb 26, 2022
1 parent 79f33a0 commit 4bb8320
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/poetry/core/packages/dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ def marker(self, marker: Union[str, "BaseMarker"]) -> None:
for _, extra in or_:
self.in_extras.append(extra)

# Recalculate python versions.
self._python_versions = "*"
if "python_version" in markers:
ors = []
for or_ in markers["python_version"]:
Expand Down Expand Up @@ -213,7 +215,8 @@ def marker(self, marker: Union[str, "BaseMarker"]) -> None:
ors.append(" ".join(ands))

self._python_versions = " || ".join(ors)
self._python_constraint = parse_constraint(self._python_versions)

self._python_constraint = parse_constraint(self._python_versions)

@property
def transitive_marker(self) -> "BaseMarker":
Expand Down

0 comments on commit 4bb8320

Please sign in to comment.