diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-12-13 15:53:56 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-12-14 11:33:22 -0700 |
commit | ec0e04694278ef9ea83537d308b07fc27c1b5f85 (patch) | |
tree | a28bb53d6827e5449c3f2d5ade3a4ad43bef7ca0 /numpy/distutils/cpuinfo.py | |
parent | 2a1e5a6d2ffdabf2a18875ee8dd57773d608e4c5 (diff) | |
download | numpy-ec0e04694278ef9ea83537d308b07fc27c1b5f85.tar.gz |
DEP: Fix escaped string characters deprecated in Python 3.6.
In Python 3.6 a number of escape sequences that were previously accepted
-- for instance "\(" that was translated to "\\(" -- are deprecated. To
retain the previous behavior either raw strings must be used or the
backslash must be properly escaped itself.
Diffstat (limited to 'numpy/distutils/cpuinfo.py')
-rw-r--r-- | numpy/distutils/cpuinfo.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/distutils/cpuinfo.py b/numpy/distutils/cpuinfo.py index dba5a3298..652826376 100644 --- a/numpy/distutils/cpuinfo.py +++ b/numpy/distutils/cpuinfo.py @@ -93,7 +93,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): @@ -495,8 +495,8 @@ class Win32CPUInfo(CPUInfoBase): else: import _winreg as winreg - prgx = re.compile(r"family\s+(?P<FML>\d+)\s+model\s+(?P<MDL>\d+)"\ - "\s+stepping\s+(?P<STP>\d+)", re.IGNORECASE) + prgx = re.compile(r"family\s+(?P<FML>\d+)\s+model\s+(?P<MDL>\d+)" + r"\s+stepping\s+(?P<STP>\d+)", re.IGNORECASE) chnd=winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, self.pkey) pnum=0 while True: |