diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-10 20:43:41 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-09-10 20:43:41 (GMT) |
commit | 148679982f851e2952b9d34e6ae7932f89650c1d (patch) | |
tree | 38a4387a2b29b3a3e0bea0944a0dfea2006ce340 /Doc/whatsnew | |
parent | 964feabd79633624f5865a0faac7f8f727b176ce (diff) | |
download | cpython-148679982f851e2952b9d34e6ae7932f89650c1d.zip cpython-148679982f851e2952b9d34e6ae7932f89650c1d.tar.gz cpython-148679982f851e2952b9d34e6ae7932f89650c1d.tar.bz2 |
Issue #22369: Change "context manager protocol" to "context management protocol".
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/2.7.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/3.1.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/3.2.rst | 6 | ||||
-rw-r--r-- | Doc/whatsnew/3.3.rst | 4 | ||||
-rw-r--r-- | Doc/whatsnew/3.4.rst | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/Doc/whatsnew/2.7.rst b/Doc/whatsnew/2.7.rst index cbd83da..a622496 100644 --- a/Doc/whatsnew/2.7.rst +++ b/Doc/whatsnew/2.7.rst @@ -1612,7 +1612,7 @@ changes, or look through the Subversion logs for all the details. resulting archive. This is more powerful than the existing *exclude* argument, which has therefore been deprecated. (Added by Lars Gustäbel; :issue:`6856`.) - The :class:`~tarfile.TarFile` class also now supports the context manager protocol. + The :class:`~tarfile.TarFile` class also now supports the context management protocol. (Added by Lars Gustäbel; :issue:`7232`.) * The :meth:`~threading.Event.wait` method of the :class:`threading.Event` class diff --git a/Doc/whatsnew/3.1.rst b/Doc/whatsnew/3.1.rst index ab327f5..42c44a0 100644 --- a/Doc/whatsnew/3.1.rst +++ b/Doc/whatsnew/3.1.rst @@ -238,7 +238,7 @@ New, Improved, and Deprecated Modules (Contributed by Guilherme Polo; :issue:`2983`.) * The :class:`gzip.GzipFile` and :class:`bz2.BZ2File` classes now support - the context manager protocol:: + the context management protocol:: >>> # Automatically close file after writing >>> with gzip.GzipFile(filename, "wb") as f: diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index aa69df2..c4047c5 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -522,7 +522,7 @@ Some smaller changes made to the core Python language are: (Proposed and implemented by Mark Dickinson; :issue:`9337`.) * :class:`memoryview` objects now have a :meth:`~memoryview.release()` method - and they also now support the context manager protocol. This allows timely + and they also now support the context management protocol. This allows timely release of any resources that were acquired when requesting a buffer from the original object. @@ -1315,7 +1315,7 @@ contexts that correspond to the decimal interchange formats specified in IEEE ftp --- -The :class:`ftplib.FTP` class now supports the context manager protocol to +The :class:`ftplib.FTP` class now supports the context management protocol to unconditionally consume :exc:`socket.error` exceptions and to close the FTP connection when done:: @@ -1595,7 +1595,7 @@ The :mod:`socket` module has two new improvements. descriptor. The latter can then be reused for other purposes. (Added by Antoine Pitrou; :issue:`8524`.) -* :func:`socket.create_connection` now supports the context manager protocol +* :func:`socket.create_connection` now supports the context management protocol to unconditionally consume :exc:`socket.error` exceptions and to close the socket when done. (Contributed by Giampaolo Rodolà; :issue:`9794`.) diff --git a/Doc/whatsnew/3.3.rst b/Doc/whatsnew/3.3.rst index cda63e4..32b8581 100644 --- a/Doc/whatsnew/3.3.rst +++ b/Doc/whatsnew/3.3.rst @@ -1556,7 +1556,7 @@ Schlawack in :issue:`12708`.) nntplib ------- -The :class:`nntplib.NNTP` class now supports the context manager protocol to +The :class:`nntplib.NNTP` class now supports the context management protocol to unconditionally consume :exc:`socket.error` exceptions and to close the NNTP connection when done:: @@ -1861,7 +1861,7 @@ to specify the ``(host, port)`` to use as the source address in the bind call when creating the outgoing socket. (Contributed by Paulo Scardine in :issue:`11281`.) -:class:`~smtplib.SMTP` now supports the context manager protocol, allowing an +:class:`~smtplib.SMTP` now supports the context management protocol, allowing an ``SMTP`` instance to be used in a ``with`` statement. (Contributed by Giampaolo Rodolà in :issue:`11289`.) diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 177208a..e02e4d2 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -608,7 +608,7 @@ aifc The :meth:`~aifc.aifc.getparams` method now returns a namedtuple rather than a plain tuple. (Contributed by Claudiu Popa in :issue:`17818`.) -:func:`aifc.open` now supports the context manager protocol: when used in a +:func:`aifc.open` now supports the context management protocol: when used in a :keyword:`with` block, the :meth:`~aifc.aifc.close` method of the returned object will be called automatically at the end of the block. (Contributed by Serhiy Storchacha in :issue:`16486`.) @@ -1521,7 +1521,7 @@ sunau The :meth:`~sunau.getparams` method now returns a namedtuple rather than a plain tuple. (Contributed by Claudiu Popa in :issue:`18901`.) -:meth:`sunau.open` now supports the context manager protocol: when used in a +:meth:`sunau.open` now supports the context management protocol: when used in a :keyword:`with` block, the ``close`` method of the returned object will be called automatically at the end of the block. (Contributed by Serhiy Storchaka in :issue:`18878`.) @@ -1723,7 +1723,7 @@ wave The :meth:`~wave.getparams` method now returns a namedtuple rather than a plain tuple. (Contributed by Claudiu Popa in :issue:`17487`.) -:meth:`wave.open` now supports the context manager protocol. (Contributed +:meth:`wave.open` now supports the context management protocol. (Contributed by Claudiu Popa in :issue:`17616`.) :mod:`wave` can now :ref:`write output to unseekable files |