summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-11-28 20:33:20 (GMT)
committerGitHub <noreply@github.com>2017-11-28 20:33:20 (GMT)
commitac577d7d0bd27a69921ced14c09172235ceebab5 (patch)
tree0d8e39b6dbab0cd260764fa8acaf0390a8c509b6 /Doc
parent4d193bcc2560b824389e4d98d9d8b9b34e33dbaf (diff)
downloadcpython-ac577d7d0bd27a69921ced14c09172235ceebab5.zip
cpython-ac577d7d0bd27a69921ced14c09172235ceebab5.tar.gz
cpython-ac577d7d0bd27a69921ced14c09172235ceebab5.tar.bz2
bpo-32154: Remove asyncio.windows_utils.socketpair (#4609)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/asyncio-eventloop.rst5
-rw-r--r--Doc/library/asyncio-protocol.rst5
-rw-r--r--Doc/library/asyncio-stream.rst5
-rw-r--r--Doc/whatsnew/3.7.rst6
4 files changed, 9 insertions, 12 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index 1919b10..760640f 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -967,10 +967,7 @@ Wait until a file descriptor received some data using the
:meth:`AbstractEventLoop.add_reader` method and then close the event loop::
import asyncio
- try:
- from socket import socketpair
- except ImportError:
- from asyncio.windows_utils import socketpair
+ from socket import socketpair
# Create a pair of connected file descriptors
rsock, wsock = socketpair()
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst
index cd84ae7..af46200 100644
--- a/Doc/library/asyncio-protocol.rst
+++ b/Doc/library/asyncio-protocol.rst
@@ -690,10 +690,7 @@ Wait until a socket receives data using the
the event loop ::
import asyncio
- try:
- from socket import socketpair
- except ImportError:
- from asyncio.windows_utils import socketpair
+ from socket import socketpair
# Create a pair of connected sockets
rsock, wsock = socketpair()
diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst
index 491afdd..78091d6 100644
--- a/Doc/library/asyncio-stream.rst
+++ b/Doc/library/asyncio-stream.rst
@@ -426,10 +426,7 @@ Coroutine waiting until a socket receives data using the
:func:`open_connection` function::
import asyncio
- try:
- from socket import socketpair
- except ImportError:
- from asyncio.windows_utils import socketpair
+ from socket import socketpair
@asyncio.coroutine
def wait_for_data(loop):
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index 4973080..e4600fe 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -686,6 +686,12 @@ Changes in Python behavior
Changes in the Python API
-------------------------
+* The ``asyncio.windows_utils.socketpair()`` function has been
+ removed: use directly :func:`socket.socketpair` which is available on all
+ platforms since Python 3.5 (before, it wasn't available on Windows).
+ ``asyncio.windows_utils.socketpair()`` was just an alias to
+ ``socket.socketpair`` on Python 3.5 and newer.
+
* :mod:`asyncio`: The module doesn't export :mod:`selectors` and
:mod:`_overlapped` modules as ``asyncio.selectors`` and
``asyncio._overlapped``. Replace ``from asyncio import selectors`` with