Deprecate contextlib.nested(). The with-statement now provides this functionality directly.
diff --git a/Doc/library/contextlib.rst b/Doc/library/contextlib.rst
index d6ce9a7..7403a35 100644
--- a/Doc/library/contextlib.rst
+++ b/Doc/library/contextlib.rst
@@ -80,6 +80,8 @@
:meth:`__exit__` methods should avoid raising exceptions, and in particular they
should not re-raise a passed-in exception.
+ .. deprecated:: 3.1
+ The with-statement now supports this functionality directly.
.. function:: closing(thing)
diff --git a/Doc/whatsnew/3.1.rst b/Doc/whatsnew/3.1.rst
index 8a3a01f..468eda8 100644
--- a/Doc/whatsnew/3.1.rst
+++ b/Doc/whatsnew/3.1.rst
@@ -164,6 +164,9 @@
... if '<critical>' in line:
... outfile.write(line)
+ With the new syntax, the :func:`contextlib.nested` function is no longer
+ needed and is not deprecated.
+
(Contributed by Georg Brandl and Mattias Brändström;
`appspot issue 53094 <http://codereview.appspot.com/53094>`_.)