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.

classification
Title: PYTHONWARNINGS entries are escaped
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8
process
Status: closed Resolution: duplicate
Dependencies: Superseder: -W option and PYTHONWARNINGS env variable does not accept module regexes
View: 34624
Assigned To: Nosy List: martin.panter, nikratio
Priority: normal Keywords:

Created on 2018-10-07 10:30 by nikratio, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
msg327272 - (view) Author: Nikolaus Rath (nikratio) * Date: 2018-10-07 10:30
According to https://docs.python.org/3/library/warnings.html#describing-warning-filters:

"The meaning of each of these fields [of PYTHONWARNINGS] is as described in <The Warnings Filter>."

The description of the "The Warnings filter" says

"module is a string containing a regular expression that the module name must match."

However, when parsing PYTHONWARNINGS, the warnings module explicitly escapes the module field.
msg327276 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2018-10-07 12:26
Déjà vu. Maybe duplicate of Issue 34624?
msg327278 - (view) Author: Nikolaus Rath (nikratio) * Date: 2018-10-07 13:02
yes, this is a duplicate.
History
Date User Action Args
2022-04-11 14:59:06adminsetgithub: 79101
2018-10-13 03:20:39martin.pantersetstatus: open -> closed
resolution: duplicate
stage: resolved
2018-10-07 13:02:05nikratiosetmessages: + msg327278
2018-10-07 12:26:54martin.pantersetsuperseder: -W option and PYTHONWARNINGS env variable does not accept module regexes

messages: + msg327276
nosy: + martin.panter
2018-10-07 10:30:17nikratiocreate