classification
Title: inability to ignore multiline warnings -- request to add re.DOTALL to re.compile
Type: enhancement Stage:
Components: Versions:
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: Nosy List: doko, georg.brandl
Priority: normal Keywords:

Created on 2009-04-04 15:29 by doko, last changed 2010-10-27 07:06 by georg.brandl. This issue is now closed.

Messages (2)
msg85402 - (view) Author: Matthias Klose (doko) (Python committer) Date: 2009-04-04 15:29
[forwarded from http://bugs.debian.org/519454]

"""
As of now, warnings.py provides only re.I flag to re.compile on
warnings.py:160.  Recent python-numpy issues way too many warnings, I
was trying to filter them out using warnings.filterwarnings, but was
unable to filter out multiline warning (numpy.histogram).  Adding
re.DOTALL to re.I should help to resolve the problem and allow users to
match also multiline warning messages.
"""
msg85467 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-04-05 08:56
I don't really understand this; first, the regex doesn't have to match
the entire warning message (and I hope the important things are in the
first line, otherwise the warning message is bad) and second, it's
always possible to use ``(.|\n)`` instead of plain ``.``. Ah yes, third,
there are also inline flags: ``(?s)``.
History
Date User Action Args
2010-10-27 07:06:13georg.brandlsetstatus: open -> closed
resolution: works for me
2009-04-05 08:56:48georg.brandlsetnosy: + georg.brandl
messages: + msg85467
2009-04-04 15:29:20dokocreate