Bug#1076214: libreoffice-lightproof-en: SyntaxWarning: invalid escape sequence
Package: libreoffice-lightproof-en
Version: 0.4.3+1.6-3
Severity: normal
With python3.12 now as default, starting LibreOffice gives the
following warnings on the console:
/usr/lib/libreoffice/share/extensions/lightproof_en/pythonpath/lightproof_impl_lightproof_en.py:129: SyntaxWarning: invalid escape sequence '\w'
a = re.match("(?u)( [-.\w%%]+){" + str(n-1) + "}( [-.\w%%]+)", s)
/usr/lib/libreoffice/share/extensions/lightproof_en/pythonpath/lightproof_impl_lightproof_en.py:129: SyntaxWarning: invalid escape sequence '\w'
a = re.match("(?u)( [-.\w%%]+){" + str(n-1) + "}( [-.\w%%]+)", s)
/usr/lib/libreoffice/share/extensions/lightproof_en/pythonpath/lightproof_impl_lightproof_en.py:136: SyntaxWarning: invalid escape sequence '\w'
a = re.search("(?u)([-.\w%%]+ )([-.\w%%]+ ){" + str(n-1) + "}$", s)
This is because Python 3.12 is now warning about these broken strings;
they could be fixed by making them raw strings
(e.g. re.match(r"(?u)...) or by replacing the offending backslashes
with double backslashes.
Best wishes,
Julian
Reply to: