Message291805
After upgrading to Python 3.6, I'm working towards cleaning up "DeprecationWarning: invalid escape sequence". I've noticed that the Deprecation warning only appears on the first run. It looks like once the code is compiled to `__pycache__`, the deprecation warning does not show. This makes debugging more difficult as I need clean out `__pycache__` directories for the runs to be reproducible.
Example script:
foo.py
```
import bar
```
bar.py
```
s = '\.'
```
First run
```
$ python36 -Wall foo.py
.../test/bar.py:1: DeprecationWarning: invalid escape sequence \.
s = '\.'
```
Second run (no DeprecationWarning)
```
$ python36 -Wall foo.py
```
Third run after cleaning
```
$ rm -rf __pycache__
$ python36 -Wall foo.py
.../test/bar.py:1: DeprecationWarning: invalid escape sequence \.
s = '\.'
```
I expect the deprecation warning to output on every run. |
|
Date |
User |
Action |
Args |
2017-04-17 17:19:05 | jdufresne | set | recipients:
+ jdufresne |
2017-04-17 17:19:05 | jdufresne | set | messageid: <1492449545.72.0.587764680133.issue30091@psf.upfronthosting.co.za> |
2017-04-17 17:19:05 | jdufresne | link | issue30091 messages |
2017-04-17 17:19:05 | jdufresne | create | |
|