This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Tim.Graham, abarry, eric.smith, ezio.melotti, martin.panter, ncoghlan, ned.deily, petr.viktorin, r.david.murray, rhettinger, serhiy.storchaka, yan12125, yselivanov
Date 2016-10-31.12:36:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Following patch just raises SyntaxError if DeprecationWarning was raised as error. Still needed tests for this.

> Also, you'll note that with or without your patch, you get the same behavior.

Not the same. New warnings contain correct information about a file and a line.

$ ./python-unpatched -Wa
_frozen_importlib:205: DeprecationWarning: invalid escape sequence '\d'

$ ./python-patched -Wa
/home/serhiy/py/cpython-3.6/ DeprecationWarning: invalid escape sequence \d

$ ./python-unpatched -We
Traceback (most recent call last):
  File "", line 1, in <module>
    import bad_escape
DeprecationWarning: invalid escape sequence '\d'

$ ./python-patched -We
Traceback (most recent call last):
  File "", line 1, in <module>
    import bad_escape
  File "/home/serhiy/py/cpython-3.6/", line 2
SyntaxError: invalid escape sequence \d
Date User Action Args
2016-10-31 12:36:07serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, ncoghlan, eric.smith, ned.deily, ezio.melotti, r.david.murray, petr.viktorin, martin.panter, yselivanov, Tim.Graham, yan12125, abarry
2016-10-31 12:36:07serhiy.storchakasetmessageid: <>
2016-10-31 12:36:07serhiy.storchakalinkissue28128 messages
2016-10-31 12:36:07serhiy.storchakacreate