From 89696f397f167958a6dfc8ccb1f0d796fb4307a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 16 Aug 2023 17:11:28 +0200 Subject: [PATCH 7/7] Use r"" to avoid warning about unknown escapes --- numexpr/cpuinfo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/numexpr/cpuinfo.py b/numexpr/cpuinfo.py index 4f934b7ba2..4a57d3cb03 100755 --- a/numexpr/cpuinfo.py +++ b/numexpr/cpuinfo.py @@ -105,7 +105,7 @@ class CPUInfoBase(object): def __get_nbits(self): abits = platform.architecture()[0] - nbits = re.compile('(\d+)bit').search(abits).group(1) + nbits = re.compile(r'(\d+)bit').search(abits).group(1) return nbits def _is_32bit(self): @@ -658,7 +658,7 @@ class Win32CPUInfo(CPUInfoBase): #XXX: Bad style to use so long `try:...except:...`. Fix it! prgx = re.compile(r"family\s+(?P\d+)\s+model\s+(?P\d+)" - "\s+stepping\s+(?P\d+)", re.IGNORECASE) + r"\s+stepping\s+(?P\d+)", re.IGNORECASE) chnd = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, self.pkey) pnum = 0 while 1: