summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2017-11-20 17:26:28 -0500
committerGitHub <noreply@github.com>2017-11-20 17:26:28 -0500
commit423fd362f8e4d6c867a5afc8ac7cbeeb66cac19c (patch)
tree204591d156333450cc931abfe0e1056e66f2397a /Doc
parent895862aa01793a26e74512befb0c66a1da2587d6 (diff)
downloadcpython-git-423fd362f8e4d6c867a5afc8ac7cbeeb66cac19c.tar.gz
bpo-32066: Support pathlib.Path in create_unix_connection; sock arg should be optional (#4447)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/asyncio-eventloop.rst18
1 files changed, 15 insertions, 3 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index e635cba659..dd75a23ae4 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -391,7 +391,7 @@ Creating connections
:ref:`UDP echo server protocol <asyncio-udp-echo-server-protocol>` examples.
-.. coroutinemethod:: AbstractEventLoop.create_unix_connection(protocol_factory, path, \*, ssl=None, sock=None, server_hostname=None)
+.. coroutinemethod:: AbstractEventLoop.create_unix_connection(protocol_factory, path=None, \*, ssl=None, sock=None, server_hostname=None)
Create UNIX connection: socket family :py:data:`~socket.AF_UNIX`, socket
type :py:data:`~socket.SOCK_STREAM`. The :py:data:`~socket.AF_UNIX` socket
@@ -403,13 +403,17 @@ Creating connections
coroutine returns a ``(transport, protocol)`` pair.
*path* is the name of a UNIX domain socket, and is required unless a *sock*
- parameter is specified. Abstract UNIX sockets, :class:`str`, and
- :class:`bytes` paths are supported.
+ parameter is specified. Abstract UNIX sockets, :class:`str`,
+ :class:`bytes`, and :class:`~pathlib.Path` paths are supported.
See the :meth:`AbstractEventLoop.create_connection` method for parameters.
Availability: UNIX.
+ .. versionchanged:: 3.7
+
+ The *path* parameter can now be a :class:`~pathlib.Path` object.
+
Creating listening connections
------------------------------
@@ -479,10 +483,18 @@ Creating listening connections
Similar to :meth:`AbstractEventLoop.create_server`, but specific to the
socket family :py:data:`~socket.AF_UNIX`.
+ *path* is the name of a UNIX domain socket, and is required unless a *sock*
+ parameter is specified. Abstract UNIX sockets, :class:`str`,
+ :class:`bytes`, and :class:`~pathlib.Path` paths are supported.
+
This method is a :ref:`coroutine <coroutine>`.
Availability: UNIX.
+ .. versionchanged:: 3.7
+
+ The *path* parameter can now be a :class:`~pathlib.Path` object.
+
.. coroutinemethod:: BaseEventLoop.connect_accepted_socket(protocol_factory, sock, \*, ssl=None)
Handle an accepted connection.