[Python-checkins] r79607 - python/trunk/Doc/library/warnings.rst
andrew.kuchling
python-checkins at python.org
Fri Apr 2 19:48:23 CEST 2010
Author: andrew.kuchling
Date: Fri Apr 2 19:48:23 2010
New Revision: 79607
Log:
#6647: document that catch_warnings is not thread-safe
Modified:
python/trunk/Doc/library/warnings.rst
Modified: python/trunk/Doc/library/warnings.rst
==============================================================================
--- python/trunk/Doc/library/warnings.rst (original)
+++ python/trunk/Doc/library/warnings.rst Fri Apr 2 19:48:23 2010
@@ -383,6 +383,14 @@
.. note::
+ The :class:`catch_warnings` manager works by replacing and
+ then later restoring the module's
+ :func:`showwarning` function and internal list of filter
+ specifications. This means the context manager is modifying
+ global state and therefore is not thread-safe.
+
+ .. note::
+
In Python 3.0, the arguments to the constructor for
:class:`catch_warnings` are keyword-only arguments.
More information about the Python-checkins
mailing list