Skip to content

Commit 71fcc7c

Browse files
committed
patch platform, escapes are raw strings
1 parent eb27301 commit 71fcc7c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

graalpython/lib-python/3/platform.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,8 @@ def _norm_version(version, build=''):
410410
return version
411411

412412
_ver_output = re.compile(r'(?:([\w ]+) ([\w.]+) '
413-
'.*'
414-
'\[.* ([\d.]+)\])')
413+
r'.*'
414+
r'\[.* ([\d.]+)\])')
415415

416416
# Examples of VER command output:
417417
#
@@ -1097,22 +1097,22 @@ def processor():
10971097

10981098
_ironpython_sys_version_parser = re.compile(
10991099
r'IronPython\s*'
1100-
'([\d\.]+)'
1101-
'(?: \(([\d\.]+)\))?'
1102-
' on (.NET [\d\.]+)', re.ASCII)
1100+
r'([\d\.]+)'
1101+
r'(?: \(([\d\.]+)\))?'
1102+
r' on (.NET [\d\.]+)', re.ASCII)
11031103

11041104
# IronPython covering 2.6 and 2.7
11051105
_ironpython26_sys_version_parser = re.compile(
11061106
r'([\d.]+)\s*'
1107-
'\(IronPython\s*'
1108-
'[\d.]+\s*'
1109-
'\(([\d.]+)\) on ([\w.]+ [\d.]+(?: \(\d+-bit\))?)\)'
1107+
r'\(IronPython\s*'
1108+
r'[\d.]+\s*'
1109+
r'\(([\d.]+)\) on ([\w.]+ [\d.]+(?: \(\d+-bit\))?)\)'
11101110
)
11111111

11121112
_pypy_sys_version_parser = re.compile(
11131113
r'([\w.+]+)\s*'
1114-
'\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*'
1115-
'\[PyPy [^\]]+\]?')
1114+
r'\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*'
1115+
r'\[PyPy [^\]]+\]?')
11161116

11171117
_sys_version_cache = {}
11181118

0 commit comments

Comments
 (0)