From 781427354068535f159388776da4f21043e237a8 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 10 Jan 2024 13:01:39 +0000 Subject: Fix invalid escape sequence in build-many-glibcs.py Running build-many-glibcs.py with Python 3.12 or later produces a warning: build-many-glibcs.py:173: SyntaxWarning: invalid escape sequence '\.' m = re.fullmatch('([0-9]+)\.([0-9]+)[.0-9]*', l) Use a raw string instead to avoid that warning. (Note: I haven't checked whether any other Python scripts included with glibc might have issues with newer Python versions.) --- scripts/build-many-glibcs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 7e0b90be89..9a929a6430 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -170,7 +170,7 @@ class Context(object): if l.startswith(starttext): l = l[len(starttext):] l = l.rstrip('"\n') - m = re.fullmatch('([0-9]+)\.([0-9]+)[.0-9]*', l) + m = re.fullmatch(r'([0-9]+)\.([0-9]+)[.0-9]*', l) return '%s.%s' % m.group(1, 2) print('error: could not determine glibc version') exit(1) -- cgit 1.4.1