[issue32912] Raise non-silent warning for invalid escape sequences

Nathaniel Smith report at bugs.python.org
Mon Aug 5 01:29:05 EDT 2019


Nathaniel Smith <njs at pobox.com> added the comment:

I think we haven't *actually* done a proper DeprecationWarning period for this. We tried, but because of the issue with byte-compiling, the warnings were unconditionally suppressed for most users -- even the users who are diligent enough to enable warnings and look at warnings in their test suites.

I can see a good argument for making the change, but if we're going to do it then it's obviously the kind of change that requires a proper deprecation period, and that hasn't happened.

Maybe .pyc files need to be extended to store a list of syntax-related DeprecationWarnings and SyntaxWarnings, that are re-issued every time the .pyc is loaded? Then we'd at least have the technical capability to deprecate this properly.

----------
nosy: +njs

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32912>
_______________________________________


More information about the Python-bugs-list mailing list