From 8f5be3dcb54b49e79fca5cb2e5bc93b8a92812ec Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Thu, 10 Oct 2024 20:00:00 +0800 Subject: [PATCH] fix: the logic error in the `uv` format marker matching Supersedes #3197 Signed-off-by: Frost Ming --- news/3197.bugfix.md | 1 + src/pdm/formats/uv.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 news/3197.bugfix.md diff --git a/news/3197.bugfix.md b/news/3197.bugfix.md new file mode 100644 index 0000000000..0f92d087ba --- /dev/null +++ b/news/3197.bugfix.md @@ -0,0 +1 @@ +Fix the logic error in the `uv` format marker matching. diff --git a/src/pdm/formats/uv.py b/src/pdm/formats/uv.py index 7e945d4ab8..be5f305834 100644 --- a/src/pdm/formats/uv.py +++ b/src/pdm/formats/uv.py @@ -195,7 +195,7 @@ def _make_dependency(self, candidate: Candidate, req: Requirement) -> dict[str, matching_entries = [e for k, e in locked_repo.packages.items() if k[0] == req.key] def marker_match(marker: Marker | None) -> bool: - return not (parent_marker & (marker or get_marker("")).is_empty()) + return not (parent_marker & (marker or get_marker(""))).is_empty() if not matching_entries: return None