@@ -403,11 +403,11 @@ Opening network connections
403403 Open a streaming transport connection to a given
404404 address specified by *host * and *port *.
405405
406- The socket family can be either :py:data : `~socket.AF_INET ` or
407- :py:data : `~socket.AF_INET6 ` depending on *host * (or the *family *
406+ The socket family can be either :py:const : `~socket.AF_INET ` or
407+ :py:const : `~socket.AF_INET6 ` depending on *host * (or the *family *
408408 argument, if provided).
409409
410- The socket type will be :py:data : `~socket.SOCK_STREAM `.
410+ The socket type will be :py:const : `~socket.SOCK_STREAM `.
411411
412412 *protocol_factory * must be a callable returning an
413413 :ref: `asyncio protocol <asyncio-protocol >` implementation.
@@ -509,7 +509,7 @@ Opening network connections
509509
510510 .. versionchanged :: 3.6
511511
512- The socket option :py:data : `~socket.TCP_NODELAY ` is set by default
512+ The socket option :py:const : `~socket.TCP_NODELAY ` is set by default
513513 for all TCP connections.
514514
515515 .. versionchanged :: 3.7
@@ -552,11 +552,11 @@ Opening network connections
552552
553553 Create a datagram connection.
554554
555- The socket family can be either :py:data : `~socket.AF_INET `,
556- :py:data : `~socket.AF_INET6 `, or :py:data : `~socket.AF_UNIX `,
555+ The socket family can be either :py:const : `~socket.AF_INET `,
556+ :py:const : `~socket.AF_INET6 `, or :py:const : `~socket.AF_UNIX `,
557557 depending on *host * (or the *family * argument, if provided).
558558
559- The socket type will be :py:data : `~socket.SOCK_DGRAM `.
559+ The socket type will be :py:const : `~socket.SOCK_DGRAM `.
560560
561561 *protocol_factory * must be a callable returning a
562562 :ref: `protocol <asyncio-protocol >` implementation.
@@ -581,7 +581,7 @@ Opening network connections
581581 * *reuse_port * tells the kernel to allow this endpoint to be bound to the
582582 same port as other existing endpoints are bound to, so long as they all
583583 set this flag when being created. This option is not supported on Windows
584- and some Unixes. If the :py:data : `~socket.SO_REUSEPORT ` constant is not
584+ and some Unixes. If the :py:const : `~socket.SO_REUSEPORT ` constant is not
585585 defined then this capability is unsupported.
586586
587587 * *allow_broadcast * tells the kernel to allow this endpoint to send
@@ -607,7 +607,7 @@ Opening network connections
607607
608608 .. versionchanged :: 3.8.1
609609 The *reuse_address * parameter is no longer supported, as using
610- :py:data : `~sockets.SO_REUSEADDR ` poses a significant security concern for
610+ :py:const : `~sockets.SO_REUSEADDR ` poses a significant security concern for
611611 UDP. Explicitly passing ``reuse_address=True `` will raise an exception.
612612
613613 When multiple processes with differing UIDs assign sockets to an
@@ -616,7 +616,7 @@ Opening network connections
616616
617617 For supported platforms, *reuse_port * can be used as a replacement for
618618 similar functionality. With *reuse_port *,
619- :py:data : `~sockets.SO_REUSEPORT ` is used instead, which specifically
619+ :py:const : `~sockets.SO_REUSEPORT ` is used instead, which specifically
620620 prevents processes with differing UIDs from assigning sockets to the same
621621 socket address.
622622
@@ -634,8 +634,8 @@ Opening network connections
634634
635635 Create a Unix connection.
636636
637- The socket family will be :py:data : `~socket.AF_UNIX `; socket
638- type will be :py:data : `~socket.SOCK_STREAM `.
637+ The socket family will be :py:const : `~socket.AF_UNIX `; socket
638+ type will be :py:const : `~socket.SOCK_STREAM `.
639639
640640 A tuple of ``(transport, protocol) `` is returned on success.
641641
@@ -671,7 +671,7 @@ Creating network servers
671671 ssl_shutdown_timeout=None, \
672672 start_serving=True)
673673
674- Create a TCP server (socket type :data : `~socket.SOCK_STREAM `) listening
674+ Create a TCP server (socket type :const : `~socket.SOCK_STREAM `) listening
675675 on *port * of the *host * address.
676676
677677 Returns a :class: `Server ` object.
@@ -699,10 +699,10 @@ Creating network servers
699699 be selected (note that if *host * resolves to multiple network interfaces,
700700 a different random port will be selected for each interface).
701701
702- * *family * can be set to either :data : `socket.AF_INET ` or
703- :data : `~socket.AF_INET6 ` to force the socket to use IPv4 or IPv6.
702+ * *family * can be set to either :const : `socket.AF_INET ` or
703+ :const : `~socket.AF_INET6 ` to force the socket to use IPv4 or IPv6.
704704 If not set, the *family * will be determined from host name
705- (defaults to :data : `~socket.AF_UNSPEC `).
705+ (defaults to :const : `~socket.AF_UNSPEC `).
706706
707707 * *flags * is a bitmask for :meth: `getaddrinfo `.
708708
@@ -756,7 +756,7 @@ Creating network servers
756756 .. versionchanged :: 3.6
757757
758758 Added *ssl_handshake_timeout * and *start_serving * parameters.
759- The socket option :py:data : `~socket.TCP_NODELAY ` is set by default
759+ The socket option :py:const : `~socket.TCP_NODELAY ` is set by default
760760 for all TCP connections.
761761
762762 .. versionchanged :: 3.11
@@ -777,7 +777,7 @@ Creating network servers
777777 start_serving=True)
778778
779779 Similar to :meth: `loop.create_server ` but works with the
780- :py:data : `~socket.AF_UNIX ` socket family.
780+ :py:const : `~socket.AF_UNIX ` socket family.
781781
782782 *path * is the name of a Unix domain socket, and is required,
783783 unless a *sock * argument is provided. Abstract Unix sockets,
0 commit comments