summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2010-04-02 17:48:23 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2010-04-02 17:48:23 (GMT)
commitd8862904641efabcded42a8db16f255f171e59e7 (patch)
treeb2e1f8962e88447aaa2b13da8c92b1e1c658fdcb /Doc
parentf37592fda1f3ab3e23d7e3e72faa57f599b9dc9f (diff)
downloadcpython-d8862904641efabcded42a8db16f255f171e59e7.zip
cpython-d8862904641efabcded42a8db16f255f171e59e7.tar.gz
cpython-d8862904641efabcded42a8db16f255f171e59e7.tar.bz2
#6647: document that catch_warnings is not thread-safe
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/warnings.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst
index e4343e8..91ab085 100644
--- a/Doc/library/warnings.rst
+++ b/Doc/library/warnings.rst
@@ -383,6 +383,14 @@ Available Context Managers
.. 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.