[reportlab-users] deprecation warning

Christoph Zwerschke cito at online.de
Fri Mar 19 06:21:00 EDT 2021


On 19.03.2021 10:45, Robin Becker wrote:
 > I don't know how many tests I have to run, but I don't see this
 > warning in 2.7.18, 3.7.5, 3.8.6, 3.9.2 & 3.10.0a6. It doesn't show in
 > the various github action / appveyor wheel builds.
 >
 > Jürgen can you say what OS, exact version of python 3.8 and what
 > command line options if any were used?
 >
 > I will put this into the latest release.

Robin, this warning will certainly only show up since Python 3.8.

The docs for the re module say since Python 3.8: "Please note that any 
invalid escape sequences in Python’s usage of the backslash in string 
literals now generate a DeprecationWarning and in the future this will 
become a SyntaxError. This behaviour will happen even if it is a valid 
escape sequence for a regular expression."

So it's important to fix this.

If you run flake8 on the source, you should find all such instances of 
invalid escape sequences (reported as warning W605).

-- Christoph


More information about the reportlab-users mailing list