cpython: a7391c31ec4e (original) (raw)

Mercurial > cpython

changeset 100260:a7391c31ec4e 3.5

Issue #16915: Clarify that mode parameter of socket.makefile() does not accept the same values as open(). [#16915]

Berker Peksag berker.peksag@gmail.com
date Thu, 18 Feb 2016 17:34:00 +0200
parents 651a6d47bc78
children bbfbde6ee9d0 537608bafa5a
files Doc/library/socket.rst Lib/socket.py Lib/test/test_socket.py
diffstat 3 files changed, 19 insertions(+), 4 deletions(-)[+] [-] Doc/library/socket.rst 3 Lib/socket.py 6 Lib/test/test_socket.py 14

line wrap: on

line diff

--- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -1006,7 +1006,8 @@ to sockets. Return a :term:file object associated with the socket. The exact returned type depends on the arguments given to :meth:makefile. These arguments are

--- a/Lib/socket.py +++ b/Lib/socket.py @@ -209,10 +209,10 @@ class socket(_socket.socket): encoding=None, errors=None, newline=None): """makefile(...) -> an I/O stream connected to the socket

--- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1374,6 +1374,20 @@ class GeneralModuleTests(unittest.TestCa self.assertRaises(ValueError, fp.writable) self.assertRaises(ValueError, fp.seekable)

+

+ def test_pickle(self): sock = socket.socket() with sock: