Daniel Carpenter <[email protected]> added the comment:
I'm not sure if this is an issue or by design, but this DeprecationWarning
behaves differently to other DeprecationWarnings.
A normal DeprecationWarning triggered by code in __main__ is printed by default:
$ python -c 'import warnings; warnings.warn("test", DeprecationWarning)'
<string>:1: DeprecationWarning: test
But this one is silent:
$ python -c '"\,"'
[no output]
To see this DeprecationWarning at all, I need to type:
$ python -Wdefault -c '"\,"'
<string>:1: DeprecationWarning: invalid escape sequence '\,'
But that enables this DeprecationWarning for all modules, not just __main__ .
I've tested this with Python 3.9 on debian bullseye and the 3.10 docker image.
----------
nosy: +dansebcar
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue32912>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com