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: Document that filterwarnings(message=...) matches the start of a message
Type: Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, martin.panter, python-dev
Priority: normal Keywords: patch

Created on 2016-07-16 07:47 by martin.panter, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
match-start.patch martin.panter, 2016-07-16 07:47 review
Messages (2)
msg270546 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-07-16 07:47
I assumed that the “message” parameter could be used to match any substring of a warning message, but it turns out it calls regex.match(), which is anchored at the beginning of the search string (but is not anchored at the end). I propose this patch to clarify the documentation, and add some tests.
msg270804 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-07-19 02:51
New changeset 739f638bb9f8 by Martin Panter in branch '2.7':
Issue #27528: Document and test warning messages must match at beginning
https://hg.python.org/cpython/rev/739f638bb9f8

New changeset 7571432200a2 by Martin Panter in branch '3.5':
Issue #27528: Document and test warning messages must match at beginning
https://hg.python.org/cpython/rev/7571432200a2

New changeset e0761e817deb by Martin Panter in branch 'default':
Issue #27528: Merge warning doc and test from 3.5
https://hg.python.org/cpython/rev/e0761e817deb
History
Date User Action Args
2022-04-11 14:58:33adminsetgithub: 71715
2016-07-19 03:35:38martin.pantersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2016-07-19 02:51:18python-devsetnosy: + python-dev
messages: + msg270804
2016-07-16 07:47:50martin.pantercreate