From: Joseph Myers Date: Wed, 10 Jan 2024 13:01:39 +0000 (+0000) Subject: Fix invalid escape sequence in build-many-glibcs.py X-Git-Tag: glibc-2.39~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=781427354068535f159388776da4f21043e237a8;p=thirdparty%2Fglibc.git 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.) --- diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 7e0b90be898..9a929a6430d 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)