Kaydet (Commit) d8862904 authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

#6647: document that catch_warnings is not thread-safe

üst f37592fd
......@@ -381,6 +381,14 @@ Available Context Managers
protected. This argument exists primarily for testing the :mod:`warnings`
module itself.
.. 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment