Index: doc/library/warnings.rst =================================================================== --- doc/library/warnings.rst (revision 76294) +++ doc/library/warnings.rst (working copy) @@ -178,7 +178,9 @@ While within the context manager all warnings will simply be ignored. This allows you to use known-deprecated code without having to see the warning while not suppressing the warning for other code that might not be aware of its use -of deprecated code. +of deprecated code. Note: This can only be guaranteed in a single-threaded +application. If two or more threads use the :class:`catch_warnings` context +manager at the same time, the behavior is undefined. .. _warning-testing: @@ -216,7 +218,8 @@ when the context was entered. This prevents tests from changing the warnings filter in unexpected ways between tests and leading to indeterminate test results. The :func:`showwarning` function in the module is also restored to -its original value. +its original value. Note: If two or more threads alter the warnings filter +at the same time, its final state is undefined. When testing multiple operations that raise the same kind of warning, it is important to test them in a manner that confirms each operation is raising