Message279784
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 escape_warning.py
_frozen_importlib:205: DeprecationWarning: invalid escape sequence '\d'
\d
$ ./python-patched -Wa escape_warning.py
/home/serhiy/py/cpython-3.6/bad_escape.py:2: DeprecationWarning: invalid escape sequence \d
print('\d')
\d
$ ./python-unpatched -We escape_warning.py
Traceback (most recent call last):
File "escape_warning.py", line 1, in <module>
import bad_escape
DeprecationWarning: invalid escape sequence '\d'
$ ./python-patched -We escape_warning.py
Traceback (most recent call last):
File "escape_warning.py", line 1, in <module>
import bad_escape
File "/home/serhiy/py/cpython-3.6/bad_escape.py", line 2
print('\d')
^
SyntaxError: invalid escape sequence \d |
|
Date |
User |
Action |
Args |
2016-10-31 12:36:07 | serhiy.storchaka | set | recipients:
+ 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:07 | serhiy.storchaka | set | messageid: <1477917367.46.0.0620395401845.issue28128@psf.upfronthosting.co.za> |
2016-10-31 12:36:07 | serhiy.storchaka | link | issue28128 messages |
2016-10-31 12:36:07 | serhiy.storchaka | create | |
|