From 5ec61c90a664263f9849bf9d60b54c19a527ee67 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Sun, 8 Jun 2025 10:48:45 +0100 Subject: [PATCH] docs: Fix website download link when there is a pre-release The previous regex was incorrectly matching a prefix (e.g. 1.2.3) of a pre-release (e.g. 1.2.3a1, 1.2.3rc1). fixes #1276 --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 4bffabd8..276a05d6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -7,8 +7,9 @@ sys.path.append('.') def changelog_version(path, encoding='utf-8'): "Return the 1st *stable* (not pre, dev) version in the changelog" # See also grep_version() in setup.py + # e.g. "0.1.2, (1999-12-31)\n" version_pattern = re.compile( - r'^v(?P[0-9]+\.[0-9]+\.[0-9]+)', + r'^v(?P\d+\.\d+\.\d+) \((?P\d\d\d\d-\d\d-\d\d)\)$', re.MULTILINE, )