From 9b46d3fc54dc19f29a4d7503e8c06dcfbebd7b5a Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 19 Aug 2008 17:56:33 +0000 Subject: #2834: Change re module semantics, so that str and bytes mixing is forbidden, and str (unicode) patterns get full unicode matching by default. The re.ASCII flag is also introduced to ask for ASCII matching instead. --- cygwinccompiler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cygwinccompiler.py') diff --git a/cygwinccompiler.py b/cygwinccompiler.py index 48875230..da2c74a2 100644 --- a/cygwinccompiler.py +++ b/cygwinccompiler.py @@ -409,7 +409,7 @@ def get_versions(): out = os.popen(gcc_exe + ' -dumpversion','r') out_string = out.read() out.close() - result = re.search('(\d+\.\d+(\.\d+)*)',out_string) + result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII) if result: gcc_version = StrictVersion(result.group(1)) else: @@ -421,7 +421,7 @@ def get_versions(): out = os.popen(ld_exe + ' -v','r') out_string = out.read() out.close() - result = re.search('(\d+\.\d+(\.\d+)*)',out_string) + result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII) if result: ld_version = StrictVersion(result.group(1)) else: @@ -433,7 +433,7 @@ def get_versions(): out = os.popen(dllwrap_exe + ' --version','r') out_string = out.read() out.close() - result = re.search(' (\d+\.\d+(\.\d+)*)',out_string) + result = re.search(' (\d+\.\d+(\.\d+)*)', out_string, re.ASCII) if result: dllwrap_version = StrictVersion(result.group(1)) else: -- cgit v1.2.1