Fix strings containing deprecated illegal escape sequences (#648)
Python 3.6 and above has deprecated illegal string escape sequences. Escape sequences are preceded by a '\' and valid ones are "\n\t\r" etc. Illegal ones are not in the list https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals. Previous to Python 3.6 these illegal sequences were ignored and the '\' was left in place. Pylint has been noting these for a while now. This PR corrects these sequences in Gramps. I used find . -name "*.py" | xargs -t -n 1 python3 -Wd -m py_compile 2>&1 | grep Depre to locate the failing strings.
This commit is contained in:
3
setup.py
3
setup.py
@@ -80,7 +80,8 @@ def intltool_version():
|
||||
Return the version of intltool as a tuple.
|
||||
'''
|
||||
if sys.platform == 'win32':
|
||||
cmd = ["perl", "-e print qx(intltool-update --version) =~ m/(\d+.\d+.\d+)/;"]
|
||||
cmd = ["perl",
|
||||
r"-e print qx(intltool-update --version) =~ m/(\d+.\d+.\d+)/;"]
|
||||
try:
|
||||
ver, ret = subprocess.Popen(cmd ,stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE, shell=True).communicate()
|
||||
|
Reference in New Issue
Block a user