diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-06-29 10:12:22 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-06-29 10:12:22 (GMT) |
commit | 34eeed42901666fce099947f93dfdfc05411f286 (patch) | |
tree | 26bd3fea92143532a1a7fd725d08733819a779d1 /Doc | |
parent | 7acc3486d64c7625d9a366c5834028aa81ae162c (diff) | |
download | cpython-34eeed42901666fce099947f93dfdfc05411f286.zip cpython-34eeed42901666fce099947f93dfdfc05411f286.tar.gz cpython-34eeed42901666fce099947f93dfdfc05411f286.tar.bz2 |
Issue #26721: Change StreamRequestHandler.wfile to BufferedIOBase
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/http.server.rst | 7 | ||||
-rw-r--r-- | Doc/library/socketserver.rst | 9 | ||||
-rw-r--r-- | Doc/whatsnew/3.6.rst | 6 |
3 files changed, 20 insertions, 2 deletions
diff --git a/Doc/library/http.server.rst b/Doc/library/http.server.rst index c3584f5..c1ea873 100644 --- a/Doc/library/http.server.rst +++ b/Doc/library/http.server.rst @@ -98,8 +98,8 @@ of which this module provides three different variants: .. attribute:: rfile - Contains an input stream, positioned at the start of the optional input - data. + An :class:`io.BufferedIOBase` input stream, ready to read from + the start of the optional input data. .. attribute:: wfile @@ -107,6 +107,9 @@ of which this module provides three different variants: client. Proper adherence to the HTTP protocol must be used when writing to this stream. + .. versionchanged:: 3.6 + This is an :class:`io.BufferedIOBase` stream. + :class:`BaseHTTPRequestHandler` has the following attributes: .. attribute:: server_version diff --git a/Doc/library/socketserver.rst b/Doc/library/socketserver.rst index dac9281..3eb27e3 100644 --- a/Doc/library/socketserver.rst +++ b/Doc/library/socketserver.rst @@ -409,6 +409,15 @@ Request Handler Objects read or written, respectively, to get the request data or return data to the client. + The :attr:`rfile` attributes of both classes support the + :class:`io.BufferedIOBase` readable interface, and + :attr:`DatagramRequestHandler.wfile` supports the + :class:`io.BufferedIOBase` writable interface. + + .. versionchanged:: 3.6 + :attr:`StreamRequestHandler.wfile` also supports the + :class:`io.BufferedIOBase` writable interface. + Examples -------- diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index d3a588b..a8802a4 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -373,6 +373,12 @@ defined in :mod:`http.server`, :mod:`xmlrpc.server` and protocol. (Contributed by Aviv Palivoda in :issue:`26404`.) +The :attr:`~socketserver.StreamRequestHandler.wfile` attribute of +:class:`~socketserver.StreamRequestHandler` classes now implements +the :class:`io.BufferedIOBase` writable interface. In particular, +calling :meth:`~io.BufferedIOBase.write` is now guaranteed to send the +data in full. (Contributed by Martin Panter in :issue:`26721`.) + subprocess ---------- |