summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2013-12-31 16:17:21 (GMT)
committerR David Murray <rdmurray@bitdance.com>2013-12-31 16:17:21 (GMT)
commit2bc930f0442e2bc7ea6d86b74352ad8ac90a40c8 (patch)
tree6a82711df131de4ca43c047cd00ffd48d45ce5d8 /Doc
parentd9ddd3f9ba1442c9ea630a9edd5df091ca168f5c (diff)
downloadcpython-2bc930f0442e2bc7ea6d86b74352ad8ac90a40c8.zip
cpython-2bc930f0442e2bc7ea6d86b74352ad8ac90a40c8.tar.gz
cpython-2bc930f0442e2bc7ea6d86b74352ad8ac90a40c8.tar.bz2
whatsnew: epoll supports with.
Also reworded the description of the feature in the docs.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/select.rst11
-rw-r--r--Doc/whatsnew/3.4.rst9
2 files changed, 17 insertions, 3 deletions
diff --git a/Doc/library/select.rst b/Doc/library/select.rst
index 524e411..f5f90bb 100644
--- a/Doc/library/select.rst
+++ b/Doc/library/select.rst
@@ -58,9 +58,14 @@ The module defines the following:
which can be used as Edge or Level Triggered interface for I/O
events. *sizehint* is deprecated and completely ignored. *flags* can be set
to :const:`EPOLL_CLOEXEC`, which causes the epoll descriptor to be closed
- automatically when :func:`os.execve` is called. See section
- :ref:`epoll-objects` below for the methods supported by epolling objects.
- They also support the :keyword:`with` statement.
+ automatically when :func:`os.execve` is called.
+
+ See the :ref:`epoll-objects` section below for the methods supported by
+ epolling objects.
+
+ ``epoll`` objects support the context management protocol: when used in a
+ :keyword:`with` statement, the new file descriptor is automatically closed
+ at the end of the block.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`.
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 4a097d2..5b68243 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -851,6 +851,15 @@ New :func:`resource.prlimit` function and Linux specific constants.
(Contributed by Christian Heimes in :issue:`16595` and :issue:`19324`.)
+select
+------
+
+:class:`~select.epoll` objects now support the context management protocol.
+When used in a :keyword:`with` statement, the :meth:`~select.epoll.close`
+method will be called automatically at the end of the block. (Contributed
+by Serhiy Storchaka in :issue:`16488`.)
+
+
shelve
------