I see several warnings on a newer system (with Python 3.12.3) along the following lines:
[ 7%] /usr/bin/python3 /home/scott/lyxbuilds/master-master/repo/po/lyx_pot.py -b /home/scott/lyxbuilds/master-master/repo -o /home/scott/lyxbuilds/master-master/CMakeBuild/po/examples_templates_l10n.pot -t examples_templates --src_file=/home/scott/lyxbuilds/master-master/CMakeBuild/po/examples_templates_files cd /home/scott/lyxbuilds/master-master/CMakeBuild/po && /usr/bin/python3 /home/scott/lyxbuilds/master-master/repo/po/lyx_pot.py -b /home/scott/lyxbuilds/master-master/repo -o /home/scott/lyxbuilds/master-master/CMakeBuild/po/examples_templates_l10n.pot -t examples_templates --src_file=/home/scott/lyxbuilds/master-master/CMakeBuild/po/examples_templates_files /home/scott/lyxbuilds/master-master/repo/po/lyx_pot.py:607: SyntaxWarning: invalid escape sequence '\w' reg = re.compile('Encoding [\w-]+\s+[\w-]+\s+"([\w \-\(\)\[\]\/^"]*)"\s+["\w-]+\s+(fixed|variable|variableunsafe)\s+\w+.*') In the attached patch, I just put a 'r' in front of the string inside re.compile(). It seems to make Python happy. Is it OK to commit? Scott
diff --git a/po/lyx_pot.py b/po/lyx_pot.py index 665fdcddcf..76111bb71e 100755 --- a/po/lyx_pot.py +++ b/po/lyx_pot.py @@ -604,7 +604,7 @@ def encodings_l10n(input_files, output, base): output = io.open(output, 'w', encoding='utf_8', newline='\n') # assuming only one encodings file # Encoding utf8 utf8 "Unicode (utf8)" UTF-8 variable inputenc - reg = re.compile('Encoding [\w-]+\s+[\w-]+\s+"([\w \-\(\)\[\]\/^"]*)"\s+["\w-]+\s+(fixed|variable|variableunsafe)\s+\w+.*') + reg = re.compile(r'Encoding [\w-]+\s+[\w-]+\s+"([\w \-\(\)\[\]\/^"]*)"\s+["\w-]+\s+(fixed|variable|variableunsafe)\s+\w+.*') input = io.open(input_files[0], encoding='utf_8') for lineno, line in enumerate(input.readlines()): if not line.startswith('Encoding'):
signature.asc
Description: PGP signature
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel