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 jayman
Recipients jayman
Date 2021-09-11.21:10:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631394606.92.0.819675114557.issue45175@roundup.psfhosted.org>
In-reply-to
Content
I have a script which always produces a warning when you run it. If I import always_warns from another script, that script will only produce a warning once.

Steps to reproduce:
$ python -W always always_warns.py
/tmp/Bug reproduction/always_warns.py:1: DeprecationWarning: invalid escape sequence \ 
  "\ "
$ python -W always always_warns.py
/tmp/Bug reproduction/always_warns.py:1: DeprecationWarning: invalid escape sequence \ 
  "\ "
$ python -W always imports_always_warns.py
/tmp/Bug reproduction/always_warns.py:1: DeprecationWarning: invalid escape sequence \ 
  "\ "
$ python -W always imports_always_warns.py
$

There should be a warning for that last one, but there isn’t. If I delete __pycache__, imports_always_warns.py makes the warning appear again.
History
Date User Action Args
2021-09-11 21:10:07jaymansetrecipients: + jayman
2021-09-11 21:10:06jaymansetmessageid: <1631394606.92.0.819675114557.issue45175@roundup.psfhosted.org>
2021-09-11 21:10:06jaymanlinkissue45175 messages
2021-09-11 21:10:06jaymancreate