Python warning: lyx_pot.py:607: SyntaxWarning: invalid escape sequence '\w'
Scott Kostyshak
skostysh at lyx.org
Sat Jun 8 16:14:13 UTC 2024
On Sat, Jun 08, 2024 at 08:17:09AM GMT, José Matos wrote:
> On Sat, 2024-06-08 at 00:15 -0400, Scott Kostyshak wrote:
> > 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
>
> Yes, that is the right fix. :-)
>
> Either that or doubling the backslash but IMHO your solution is more
> readable and the reason why raw strings were introduced in Python.
Thanks, Jose! Fixed at 325f1429.
Another question: from googling it seems that the command
python -W error foobar.py
would give an error (which hopefully would stop the build).
I haven't tested, but would the way to ask our build systems to use the
flag be to use the PYTHON environment variable? (./configure --help
tells me this is used)?
I'm pretending that I will add this flag, but I'm secretly hoping you
will add it and fix all warnings before I even see them ;)
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20240608/b755819d/attachment.asc>
More information about the lyx-devel
mailing list