diff options
author | Joseph Myers <josmyers@redhat.com> | 2024-01-10 13:01:39 +0000 |
---|---|---|
committer | Joseph Myers <josmyers@redhat.com> | 2024-01-10 13:01:39 +0000 |
commit | 781427354068535f159388776da4f21043e237a8 (patch) | |
tree | 15295e85305b2336731dab2b2256c487f0481a7d | |
parent | 497e4d503025c794a771d2c124123178f557623a (diff) | |
download | glibc-781427354068535f159388776da4f21043e237a8.tar glibc-781427354068535f159388776da4f21043e237a8.tar.gz glibc-781427354068535f159388776da4f21043e237a8.tar.bz2 glibc-781427354068535f159388776da4f21043e237a8.zip |
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.)
-rwxr-xr-x | scripts/build-many-glibcs.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |