[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Jon Dufresne
Jon Dufresne added the comment: Understood. Thanks for the response. I'll have to keep this in mind as I debug these warnings in the future. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is how Python works. This can't be changed without changing the compiler, the format of .pyc files (for saving warnings) and importing system. And this may slow down normal compilation due to generating warnings for saving them in .pyc files. I don't th

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Jon Dufresne
Jon Dufresne added the comment: I see. I think if the goal is for developers to see and fix these DeprecationWarnings, it would help if the warnings were reproducible without taking steps different from normal Python development. TBH, this is the first time I've ever used the -B CLI argument.

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This warning is emitted by the compiler when it compiles string literals with invalid escape sequences. Once the source is compiled to the bytecode and saved to the .pyc file the compiler no longer involved. You can disable writing compiled bytecode by calli

[issue30091] DeprecationWarning: invalid escape sequence: Only appears on first run

2017-04-17 Thread Jon Dufresne
New submission from Jon Dufresne: 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 war