Mercurial > cpython-lru_cache-weakref
changeset 60171:1ff8dd67be82 legacy-trunk
#6647: document that catch_warnings is not thread-safe
| author | Andrew M. Kuchling <amk@amk.ca> |
|---|---|
| date | Fri, 02 Apr 2010 17:48:23 +0000 |
| parents | 43a837d2728a |
| children | 2f5dc2fa0e56 |
| files | Doc/library/warnings.rst |
| diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Doc/library/warnings.rst Fri Apr 02 17:26:42 2010 +0000 +++ b/Doc/library/warnings.rst Fri Apr 02 17:48:23 2010 +0000 @@ -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.
