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 exarkun
Recipients exarkun
Date 2008-10-22.21:49:30
SpamBayes Score 4.78121e-06
Marked as misclassified No
Message-id <>
If a warning is emitted then a filter with the "always" rule is added
then the is emitted again, it will not be shown the second time:

  exarkun@charm:~$ python
  Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) 
  [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import warnings
  >>> def f():
  ...     warnings.warn("foo")
  >>> f()
  /home/exarkun/ UserWarning: foo
  >>> warnings.simplefilter("always")
  >>> f()

The "always" filter is documented as "always print matching warnings"
which is contrary to this behavior.  Also, the string "always" strongly
implies that it will be shown the second time.
Date User Action Args
2008-10-22 21:49:32exarkunsetrecipients: + exarkun
2008-10-22 21:49:32exarkunsetmessageid: <>
2008-10-22 21:49:31exarkunlinkissue4180 messages
2008-10-22 21:49:30exarkuncreate