summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-05-10 15:09:37 (GMT)
committerMats Wichmann <mats@linux.com>2019-05-13 15:23:34 (GMT)
commit2845da6416d522cc6a15308b7787de65c22f200b (patch)
tree28ee4ad55d1d44d834c6214e802c48e75f94d9b1 /src/engine
parent8d800a37f1d0bdeae4fba560c0d66ab75129a570 (diff)
downloadSCons-2845da6416d522cc6a15308b7787de65c22f200b.zip
SCons-2845da6416d522cc6a15308b7787de65c22f200b.tar.gz
SCons-2845da6416d522cc6a15308b7787de65c22f200b.tar.bz2
Fix some regexes for Python 3.8 complaints
Regexes that contained unescaped backslashes and were not listed in raw string form caused one more test failure when Python 3.8 was experimentally turned on in the Travis CI build. Also one utility script had the same, not affecting tests - found through inspection. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Scanner/D.py2
-rw-r--r--src/engine/SCons/Scanner/LaTeX.py2
-rw-r--r--src/engine/SCons/Scanner/SWIG.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/engine/SCons/Scanner/D.py b/src/engine/SCons/Scanner/D.py
index 95496d5..b3fb29e 100644
--- a/src/engine/SCons/Scanner/D.py
+++ b/src/engine/SCons/Scanner/D.py
@@ -46,7 +46,7 @@ class D(SCons.Scanner.Classic):
name = "DScanner",
suffixes = '$DSUFFIXES',
path_variable = 'DPATH',
- regex = '(?:import\s+)([\w\s=,.]+)(?:\s*:[\s\w,=]+)?(?:;)'
+ regex = r'(?:import\s+)([\w\s=,.]+)(?:\s*:[\s\w,=]+)?(?:;)'
)
def find_include(self, include, source_dir, path):
diff --git a/src/engine/SCons/Scanner/LaTeX.py b/src/engine/SCons/Scanner/LaTeX.py
index 1cf2567..fd0391b 100644
--- a/src/engine/SCons/Scanner/LaTeX.py
+++ b/src/engine/SCons/Scanner/LaTeX.py
@@ -348,7 +348,7 @@ class LaTeX(SCons.Scanner.Base):
# Cache the includes list in node so we only scan it once:
# path_dict = dict(list(path))
# add option for whitespace (\s) before the '['
- noopt_cre = re.compile('\s*\[.*$')
+ noopt_cre = re.compile(r'\s*\[.*$')
if node.includes is not None:
includes = node.includes
else:
diff --git a/src/engine/SCons/Scanner/SWIG.py b/src/engine/SCons/Scanner/SWIG.py
index 2650e4b..a333134 100644
--- a/src/engine/SCons/Scanner/SWIG.py
+++ b/src/engine/SCons/Scanner/SWIG.py
@@ -34,7 +34,7 @@ import SCons.Scanner
SWIGSuffixes = [ '.i' ]
def SWIGScanner():
- expr = '^[ \t]*%[ \t]*(?:include|import|extern)[ \t]*(<|"?)([^>\s"]+)(?:>|"?)'
+ expr = r'^[ \t]*%[ \t]*(?:include|import|extern)[ \t]*(<|"?)([^>\s"]+)(?:>|"?)'
scanner = SCons.Scanner.ClassicCPP("SWIGScanner", ".i", "SWIGPATH", expr)
return scanner