From 3459495617c43673e02d8e03591f3ac91c6c2fe5 Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Fri, 20 Oct 2023 18:16:12 +0200 Subject: [PATCH] gen-changelog.py: Don't escaping '/' with '\' in regexp Python 3.12 on Fedora 39 complains that we should not escape the '/' character with a '\' character in a regular expression. Fixed thus. * gen-changelog.py (get_rel_tags): Do not escape '/' with '\' in regexp. Signed-off-by: Dodji Seketeli --- gen-changelog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gen-changelog.py b/gen-changelog.py index 3515aa02..96f9e47e 100644 --- a/gen-changelog.py +++ b/gen-changelog.py @@ -121,7 +121,7 @@ def output_commits(): def get_rel_tags(): # Populate the release_refs dict with the tags for previous releases - reltagre = re.compile("^([a-z0-9]{40}) refs\/tags\/GNET-([0-9]+)[-_.]([0-9]+)[-_.]([0-9]+)") + reltagre = re.compile("^([a-z0-9]{40}) refs/tags/GNET-([0-9]+)[-_.]([0-9]+)[-_.]([0-9]+)") cmd = ['git', 'show-ref', '--tags', '--dereference'] p = subprocess.Popen(args=cmd, shell=False, @@ -134,7 +134,7 @@ def get_rel_tags(): release_refs[sha] = (maj, min, nano) def find_start_tag(): - starttagre = re.compile("^([a-z0-9]{40}) refs\/tags\/CHANGELOG_START") + starttagre = re.compile("^([a-z0-9]{40}) refs/tags/CHANGELOG_START") cmd = ['git', 'show-ref', '--tags'] p = subprocess.Popen(args=cmd, shell=False, stdout=subprocess.PIPE,