From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1105) id 02E3738582AA; Wed, 10 Jan 2024 13:02:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 02E3738582AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1704891722; bh=9/It3rGupRWhhYUtz9EWlrVj5IFp7cYvQrATSpfpswU=; h=From:To:Subject:Date:From; b=vppt9CcK3uynC2JG3m0BI9cP+bgEoaF7l5eG4R0OXASAOG2g09zKtRfplBFGYlO9v Br1uPt4Im0tBuBVdz6hLCSjCWJVFzYDoQyj3Bkke/MiPO2AB3IeleQJD6/mcjBql5d 03JyqnPFVRbWAQBebdANE0NSJM+CO4M16lrk0NxE= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Joseph Myers To: glibc-cvs@sourceware.org Subject: [glibc] Fix invalid escape sequence in build-many-glibcs.py X-Act-Checkin: glibc X-Git-Author: Joseph Myers X-Git-Refname: refs/heads/master X-Git-Oldrev: 497e4d503025c794a771d2c124123178f557623a X-Git-Newrev: 781427354068535f159388776da4f21043e237a8 Message-Id: <20240110130202.02E3738582AA@sourceware.org> Date: Wed, 10 Jan 2024 13:02:01 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=781427354068535f159388776da4f21043e237a8 commit 781427354068535f159388776da4f21043e237a8 Author: Joseph Myers 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)