Kaydet (Commit) e9e8c9bd authored tarafından Georg Brandl's avatar Georg Brandl

#10739: document that on Windows, socket.makefile() does not make a file that…

#10739: document that on Windows, socket.makefile() does not make a file that has a true file descriptor usable where such a thing is expected.
üst 9d9848e7
...@@ -111,6 +111,7 @@ docs@python.org), and we'll be glad to correct the problem. ...@@ -111,6 +111,7 @@ docs@python.org), and we'll be glad to correct the problem.
* Andrew M. Kuchling * Andrew M. Kuchling
* Dave Kuhlman * Dave Kuhlman
* Erno Kuusela * Erno Kuusela
* Ross Lagerwall
* Thomas Lamb * Thomas Lamb
* Detlef Lannert * Detlef Lannert
* Piers Lauder * Piers Lauder
......
...@@ -634,18 +634,24 @@ correspond to Unix system calls applicable to sockets. ...@@ -634,18 +634,24 @@ correspond to Unix system calls applicable to sockets.
is system-dependent (usually 5). is system-dependent (usually 5).
.. method:: socket.makefile(mode='r', buffering=None, *, encoding=None, errors=None, newline=None) .. method:: socket.makefile(mode='r', buffering=None, *, encoding=None, \
errors=None, newline=None)
.. index:: single: I/O control; buffering .. index:: single: I/O control; buffering
Return a :term:`file object` associated with the socket. The exact Return a :term:`file object` associated with the socket. The exact returned
returned type depends on the arguments given to :meth:`makefile`. These type depends on the arguments given to :meth:`makefile`. These arguments are
arguments are interpreted the same way as by the built-in :func:`open` interpreted the same way as by the built-in :func:`open` function.
function.
Closing the file object won't close the socket unless there are no Closing the file object won't close the socket unless there are no remaining
remaining references to the socket. The socket must be in blocking mode references to the socket. The socket must be in blocking mode (it can not
(it can not have a timeout). have a timeout).
.. note::
On Windows, the file-like object created by :meth:`makefile` cannot be
used where a file object with a file descriptor is expected, such as the
stream arguments of :meth:`subprocess.Popen`.
.. method:: socket.recv(bufsize[, flags]) .. method:: socket.recv(bufsize[, flags])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment