bpo-32066: Support pathlib.Path in create_unix_connection; sock arg s… · python/cpython@423fd36 (original) (raw)
`@@ -391,7 +391,7 @@ Creating connections
`
391
391
`` :ref:UDP echo server protocol <asyncio-udp-echo-server-protocol>
examples.
``
392
392
``
393
393
``
394
``
`-
.. coroutinemethod:: AbstractEventLoop.create_unix_connection(protocol_factory, path, *, ssl=None, sock=None, server_hostname=None)
`
``
394
`+
.. coroutinemethod:: AbstractEventLoop.create_unix_connection(protocol_factory, path=None, *, ssl=None, sock=None, server_hostname=None)
`
395
395
``
396
396
`` Create UNIX connection: socket family :py:data:~socket.AF_UNIX
, socket
``
397
397
`` type :py:data:~socket.SOCK_STREAM
. The :py:data:~socket.AF_UNIX
socket
``
`@@ -403,13 +403,17 @@ Creating connections
`
403
403
``` coroutine returns a (transport, protocol)
pair.
```
404
404
``
405
405
` path is the name of a UNIX domain socket, and is required unless a sock
`
406
``
`` -
parameter is specified. Abstract UNIX sockets, :class:str
, and
``
407
``
`` -
:class:bytes
paths are supported.
``
``
406
`` +
parameter is specified. Abstract UNIX sockets, :class:str
,
``
``
407
`` +
:class:bytes
, and :class:~pathlib.Path
paths are supported.
``
408
408
``
409
409
`` See the :meth:AbstractEventLoop.create_connection
method for parameters.
``
410
410
``
411
411
` Availability: UNIX.
`
412
412
``
``
413
`+
.. versionchanged:: 3.7
`
``
414
+
``
415
`` +
The path parameter can now be a :class:~pathlib.Path
object.
``
``
416
+
413
417
``
414
418
`Creating listening connections
`
415
419
`------------------------------
`
`@@ -479,10 +483,18 @@ Creating listening connections
`
479
483
`` Similar to :meth:AbstractEventLoop.create_server
, but specific to the
``
480
484
`` socket family :py:data:~socket.AF_UNIX
.
``
481
485
``
``
486
`+
path is the name of a UNIX domain socket, and is required unless a sock
`
``
487
`` +
parameter is specified. Abstract UNIX sockets, :class:str
,
``
``
488
`` +
:class:bytes
, and :class:~pathlib.Path
paths are supported.
``
``
489
+
482
490
`` This method is a :ref:coroutine <coroutine>
.
``
483
491
``
484
492
` Availability: UNIX.
`
485
493
``
``
494
`+
.. versionchanged:: 3.7
`
``
495
+
``
496
`` +
The path parameter can now be a :class:~pathlib.Path
object.
``
``
497
+
486
498
`.. coroutinemethod:: BaseEventLoop.connect_accepted_socket(protocol_factory, sock, *, ssl=None)
`
487
499
``
488
500
` Handle an accepted connection.
`