Skip to content

Commit 777f882

Browse files
committed
gh-101100: Fix sphinx warnings in library/socketserver.rst
1 parent 29c3a44 commit 777f882

File tree

2 files changed

+43
-22
lines changed

2 files changed

+43
-22
lines changed

Doc/library/socketserver.rst

Lines changed: 43 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -116,23 +116,23 @@ server is the address family.
116116
:class:`ForkingMixIn` and the Forking classes mentioned below are
117117
only available on POSIX platforms that support :func:`~os.fork`.
118118

119-
:meth:`socketserver.ForkingMixIn.server_close` waits until all child
119+
:meth:`!ForkingMixIn.server_close` waits until all child
120120
processes complete, except if
121-
:attr:`socketserver.ForkingMixIn.block_on_close` attribute is false.
121+
:attr:`!ForkingMixIn.block_on_close` attribute is false.
122122

123-
:meth:`socketserver.ThreadingMixIn.server_close` waits until all non-daemon
123+
:meth:`!ThreadingMixIn.server_close` waits until all non-daemon
124124
threads complete, except if
125-
:attr:`socketserver.ThreadingMixIn.block_on_close` attribute is false. Use
125+
:attr:`!ThreadingMixIn.block_on_close` attribute is false. Use
126126
daemonic threads by setting
127-
:data:`ThreadingMixIn.daemon_threads` to ``True`` to not wait until threads
127+
:data:`!ThreadingMixIn.daemon_threads` to ``True`` to not wait until threads
128128
complete.
129129

130130
.. versionchanged:: 3.7
131131

132-
:meth:`socketserver.ForkingMixIn.server_close` and
133-
:meth:`socketserver.ThreadingMixIn.server_close` now waits until all
132+
:meth:`!ForkingMixIn.server_close` and
133+
:meth:`!ThreadingMixIn.server_close` now waits until all
134134
child processes and non-daemonic threads complete.
135-
Add a new :attr:`socketserver.ForkingMixIn.block_on_close` class
135+
Add a new :attr:`!ForkingMixIn.block_on_close` class
136136
attribute to opt-in for the pre-3.7 behaviour.
137137

138138

@@ -412,13 +412,13 @@ Request Handler Objects
412412

413413
This function must do all the work required to service a request. The
414414
default implementation does nothing. Several instance attributes are
415-
available to it; the request is available as :attr:`self.request`; the client
416-
address as :attr:`self.client_address`; and the server instance as
417-
:attr:`self.server`, in case it needs access to per-server information.
415+
available to it; the request is available as :attr:`request`; the client
416+
address as :attr:`client_address`; and the server instance as
417+
:attr:`server`, in case it needs access to per-server information.
418418

419-
The type of :attr:`self.request` is different for datagram or stream
420-
services. For stream services, :attr:`self.request` is a socket object; for
421-
datagram services, :attr:`self.request` is a pair of string and socket.
419+
The type of :attr:`request` is different for datagram or stream
420+
services. For stream services, :attr:`request` is a socket object; for
421+
datagram services, :attr:`request` is a pair of string and socket.
422422

423423

424424
.. method:: finish()
@@ -428,20 +428,42 @@ Request Handler Objects
428428
raises an exception, this function will not be called.
429429

430430

431+
.. attribute:: request
432+
433+
The *new* :class:`socket.socket` object
434+
to be used to communicate with the client.
435+
436+
437+
.. attribute:: client_address
438+
439+
Client address returned by :meth:`BaseServer.get_request`.
440+
441+
442+
.. attribute:: server
443+
444+
:class:`BaseServer` object used for handling the request.
445+
446+
431447
.. class:: StreamRequestHandler
432448
DatagramRequestHandler
433449

434450
These :class:`BaseRequestHandler` subclasses override the
435451
:meth:`~BaseRequestHandler.setup` and :meth:`~BaseRequestHandler.finish`
436-
methods, and provide :attr:`self.rfile` and :attr:`self.wfile` attributes.
437-
The :attr:`self.rfile` and :attr:`self.wfile` attributes can be
438-
read or written, respectively, to get the request data or return data
439-
to the client.
440-
The :attr:`!rfile` attributes support the :class:`io.BufferedIOBase` readable interface,
441-
and :attr:`!wfile` attributes support the :class:`!io.BufferedIOBase` writable interface.
452+
methods, and provide :attr:`rfile` and :attr:`wfile` attributes.
453+
454+
.. attribute:: rfile
455+
456+
A file object from which receives the request is read.
457+
Support the :class:`io.BufferedIOBase` readable interface.
458+
459+
.. attribute:: wfile
460+
461+
A file object to which the reply is written.
462+
Support the :class:`io.BufferedIOBase` writable interface
463+
442464

443465
.. versionchanged:: 3.6
444-
:attr:`StreamRequestHandler.wfile` also supports the
466+
:attr:`wfile` also supports the
445467
:class:`io.BufferedIOBase` writable interface.
446468

447469

Doc/tools/.nitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ Doc/library/shelve.rst
108108
Doc/library/signal.rst
109109
Doc/library/smtplib.rst
110110
Doc/library/socket.rst
111-
Doc/library/socketserver.rst
112111
Doc/library/ssl.rst
113112
Doc/library/stdtypes.rst
114113
Doc/library/string.rst

0 commit comments

Comments
 (0)