From 0626c0f5d9113a563a8e96e83ba48fa5d37cf8cd Mon Sep 17 00:00:00 2001 From: Jeff Pitman Date: Sun, 10 Sep 2023 17:49:24 -0700 Subject: [PATCH] Handles go versions like go1.22-YYYYMMDD-RCXX. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4d7ce468e..5d866c993 100755 --- a/setup.py +++ b/setup.py @@ -948,7 +948,7 @@ def parse_go_version(x: str) -> Tuple[int, int, int]: def safe_int(x: str) -> int: with suppress(ValueError): return int(x) - return int(re.split(r'[a-zA-Z]', x)[0]) + return int(re.split(r'[-a-zA-Z]', x)[0]) ans = list(map(safe_int, x.split('.'))) while len(ans) < 3: ans.append(0)