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 dansebcar
Recipients CuriousLearner, Eric Wieser, abarry, asmeurer, dansebcar, gregory.p.smith, lukasz.langa, mark.dickinson, miss-islington, ncoghlan, njs, r.david.murray, rhettinger, serhiy.storchaka, steve.dower, terry.reedy, xtreak
Date 2022-01-13.16:38:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642091906.09.0.654682158295.issue32912@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2022-01-13 16:38:26dansebcarsetrecipients: + dansebcar, rhettinger, terry.reedy, gregory.p.smith, mark.dickinson, ncoghlan, r.david.murray, njs, lukasz.langa, serhiy.storchaka, steve.dower, abarry, CuriousLearner, miss-islington, asmeurer, xtreak, Eric Wieser
2022-01-13 16:38:26dansebcarsetmessageid: <1642091906.09.0.654682158295.issue32912@roundup.psfhosted.org>
2022-01-13 16:38:26dansebcarlinkissue32912 messages
2022-01-13 16:38:26dansebcarcreate