public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] Fix invalid escape sequence in build-many-glibcs.py
@ 2024-01-10 13:02 Joseph Myers
0 siblings, 0 replies; only message in thread
From: Joseph Myers @ 2024-01-10 13:02 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=781427354068535f159388776da4f21043e237a8
commit 781427354068535f159388776da4f21043e237a8
Author: Joseph Myers <josmyers@redhat.com>
Date: Wed Jan 10 13:01:39 2024 +0000
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:
---
scripts/build-many-glibcs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-10 13:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-10 13:02 [glibc] Fix invalid escape sequence in build-many-glibcs.py Joseph Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).