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: Warning filter message/module documentation is misleading
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: ananyadatta88, docs@python, kevinoid
Priority: normal Keywords: patch

Created on 2020-11-05 20:06 by kevinoid, last changed 2022-04-11 14:59 by admin.

Files
File name Uploaded Description Edit
D365 Finance cert learning path.pdf ananyadatta88, 2021-08-28 08:27 Financial services
Pull Requests
URL Status Linked Edit
PR 23172 open kevinoid, 2020-11-05 20:12
Messages (2)
msg380429 - (view) Author: Kevin Locke (kevinoid) * Date: 2020-11-05 20:06
"The Warnings Filter" section of the documentation for the warnings module describes the message and module filters as "a string containing a regular expression".  While that is true when they are arguments to the filterwarnings function, it is not true when they appear in -W or $PYTHONWARNINGS where they are matched literally (after stripping any starting/ending whitespace).

Additionally, in the "Describing Warning Filters" section, the example "error:::mymodule[.*]" does not behave as described.  If it were used as an argument to filterwarnings, where it would be treated as a regular expression, it would match the (invalid) module names mymodule. or mymodule* while it would match mymodule[.*] literally if passed via -W or $PYTHONWARNINGS.
msg400464 - (view) Author: Ananya Datta (ananyadatta88) Date: 2021-08-28 08:27
No comments
History
Date User Action Args
2022-04-11 14:59:37adminsetgithub: 86438
2021-08-28 08:27:10ananyadatta88setfiles: + D365 Finance cert learning path.pdf
nosy: + ananyadatta88
messages: + msg400464

2020-11-05 20:12:08kevinoidsetkeywords: + patch
stage: patch review
pull_requests: + pull_request22084
2020-11-05 20:06:37kevinoidcreate