While not a total solution, it seems like it might be worthwhile forcing flake8 or similar checks when uploading PyPI modules.

That would catch the illegal escape sequences where it really matters - before they enter the ecosystem.

(general) fathead:pyxll-www sholden$ cat t.py
"Docstring with illegal \escape sequence"
(general) fathead:pyxll-www sholden$ flake8 t.py
t.py:1:25: W605 invalid escape sequence '\e'

while this won't mitigate the case for existing packages, it should reduce the number of packages containing potentially erroneous string constants, preparing the ground for the eventual introduction of the syntax error.

Steve Holden


On Sat, Aug 10, 2019 at 8:07 AM Serhiy Storchaka <storchaka@gmail.com> wrote:
10.08.19 02:04, Gregory P. Smith пише:
> I've merged the PR reverting the behavior in 3.8 and am doing the same
> in the master branch.

I was going to rebase it to master and go in normal backporting process
if we decide that DeprecationWarning should be in master. I waited the
end of the discussion.

> Recall the nightmare caused by md5.py and sha.py DeprecationWarning's in
> 2.5...  this would be similar.

It is very different because DeprecationWarning for md5.py and sha.py is
emitted at runtime.
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-leave@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/H5VXWS6UT2OZBTXG7HUERKAQQIQ4BYEA/