From 03eeec165f275ad0feb27140db6f6c090343c1cf Mon Sep 17 00:00:00 2001 From: Timur Date: Mon, 4 Nov 2024 04:31:20 +0300 Subject: [PATCH] Include post-release versions in default installation (#3248) * Include post-release versions in default installation * replace match() with fullmatch() * correct checksum --- install-pdm.py | 2 +- install-pdm.py.sha256 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install-pdm.py b/install-pdm.py index 3107702914..3c1a8be3cd 100644 --- a/install-pdm.py +++ b/install-pdm.py @@ -202,7 +202,7 @@ def _get_latest_version(self) -> str: metadata = json.load(resp) def version_okay(v: str) -> bool: - return self.prerelease or all(p.isdigit() for p in v.split(".")) + return self.prerelease or re.fullmatch(r"^(\d+)\.(\d+)\.(\d+)(\.(post\d+))?", v) def sort_version(v: str) -> tuple: parts = [] diff --git a/install-pdm.py.sha256 b/install-pdm.py.sha256 index a67ad8130c..1ad1db58f0 100644 --- a/install-pdm.py.sha256 +++ b/install-pdm.py.sha256 @@ -1 +1 @@ -07dacbddc508f70bc21347598b9764bc07440ebface340bdd1e96f7af9ea4267 install-pdm.py +cd45cd6313c1cd0375d8b98b4adbc4f58b490c8e5c1e5b41b5b94d07e85d91e0 install-pdm.py