summaryrefslogtreecommitdiffstats
path: root/Lib/socket.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix host in address of socket.create_server example. (GH-17706)Karthikeyan Singaravelan2020-01-111-1/+1
| | | Host as None in address raises TypeError since it should be string, bytes or bytearray.
* bpo-36820: Break unnecessary cycle in socket.py, codeop.py and dyld.py ↵Mario Corchero2019-12-061-1/+5
| | | | | | | | | | | | (GH-13135) Break cycle generated when saving an exception in socket.py, codeop.py and dyld.py as they keep alive not only the exception but user objects through the ``__traceback__`` attribute. https://bugs.python.org/issue36820 Automerge-Triggered-By: @pablogsal
* bpo-38319: Fix shutil._fastcopy_sendfile(): set sendfile() max block size ↵Giampaolo Rodola2019-10-011-2/+2
| | | | (GH-16491)
* bpo-28724: Add methods send_fds and recv_fds to the socket module (GH-12889)Joannah Nanjekye2019-09-111-0/+36
| | | | | | | The socket module now has the socket.send_fds() and socket.recv.fds() functions. Contributed by Joannah Nanjekye, Shinya Okano (original patch) and Victor Stinner. Co-Authored-By: Victor Stinner <vstinner@redhat.com>
* bpo-11953: Extend table of Windows WSA* error codes (GH-15004)Ngalim Siregar2019-09-091-1/+82
|
* closes bpo-37566: Remove _realsocket from socket.py. (GH-14711)Hai Shi2019-07-121-2/+0
|
* BPO-17561: set create_server backlog default to None (GH-12735)Giampaolo Rodola2019-04-091-2/+5
| | | | | | | | | It turns out doing socket.listen(0) does not equal to "choose a reasonable default". It actually means "set backlog to 0". As such set backlog=None as the default for socket.create_server. Fixes the following BB failures: https://github.com/python/cpython/pull/11784#issuecomment-481036369 Ref. BPO-1756, GH-11784.
* bpo-35934: Add socket.create_server() utility function (GH-11784)Giampaolo Rodola2019-04-081-2/+85
|
* bpo-33138: Change standard error message for non-pickleable and non-copyable ↵Serhiy Storchaka2018-10-311-1/+1
| | | | types. (GH-6239)
* bpo-34282: Fix Enum._convert shadowing members named _convert (GH-8568)orlnub1232018-09-121-4/+4
| | | | | * Fix enum members getting shadowed by parent attributes * Move Enum._convert to EnumMeta._convert_ * Deprecate _convert
* bpo-28134: Auto-detect socket values from file descriptor (#1349)Christian Heimes2018-01-291-1/+8
| | | | | | | | | | | | | | | Fix socket(fileno=fd) by auto-detecting the socket's family, type, and proto from the file descriptor. The auto-detection can be overruled by passing in family, type, and proto explicitly. Without the fix, all socket except for TCP/IP over IPv4 are basically broken: >>> s = socket.create_connection(('www.python.org', 443)) >>> s <socket.socket fd=3, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('2003:58:bc4a:3b00:56ee:75ff:fe47:ca7b', 59730, 0, 0), raddr=('2a04:4e42:1b::223', 443, 0, 0)> >>> socket.socket(fileno=s.fileno()) <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('2003:58:bc4a:3b00::%2550471192', 59730, 0, 2550471192), raddr=('2a04:4e42:1b:0:700c:e70b:ff7f:0%2550471192', 443, 0, 2550471192)> Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32331: Fix socket.type when SOCK_NONBLOCK is available (#4877)Yury Selivanov2017-12-191-5/+1
|
* bpo-31234, socket.create_connection(): Fix ref cycle (#3546)Victor Stinner2017-09-131-0/+2
|
* Issue #26384: Merge from 3.5Berker Peksag2016-09-171-1/+1
|\
| * Issue #26384: Fix UnboundLocalError in socket._sendfile_use_sendfileBerker Peksag2016-09-171-1/+1
| |
* | issue28083: add IntFlag constantsEthan Furman2016-09-111-1/+11
|/
* Issue #27698: Add socketpair to socket.__all__ on WindowsVictor Stinner2016-08-171-0/+1
|
* Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
|
* Issue #16915: Clarify that mode parameter of socket.makefile() does not acceptBerker Peksag2016-02-181-3/+3
| | | | the same values as open().
* merge 3.4 (#25471)Benjamin Peterson2015-10-251-1/+5
|\
| * accepted sockets shouldn't inherit the SOCK_NONBLOCK flag (closes #25471)Benjamin Peterson2015-10-251-1/+5
| |
| * issue23673Ethan Furman2015-03-191-9/+9
| | | | | | | | | | | | | | | | | | add private method to enum to support replacing global constants with Enum members: - search for candidate constants via supplied filter - create new enum class and members - insert enum class and replace constants with members via supplied module name - replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle modify IntEnum classes to use new method
* | issue23673Ethan Furman2015-03-191-8/+8
| | | | | | | | | | | | | | | | | | add private method to enum to support replacing global constants with Enum members: - search for candidate constants via supplied filter - create new enum class and members - insert enum class and replace constants with members via supplied module name - replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle modify IntEnum classes to use new method
* | Issue #23285: PEP 475 -- Retry system calls failing with EINTR.Charles-François Natali2015-02-071-2/+0
| |
* | merge 3.4 (#23221)Benjamin Peterson2015-01-131-1/+1
|\ \ | |/
| * fix instances of consecutive articles (closes #23221)Benjamin Peterson2015-01-131-1/+1
| | | | | | | | Patch by Karan Goel.
* | Issue #20604: Added missed invalid mode in error message of socket.makefile().Serhiy Storchaka2014-11-191-3/+2
|\ \ | |/ | | | | Based on patch by Franck Michea.
| * Issue #20604: Added missed invalid mode in error message of socket.makefile().Serhiy Storchaka2014-11-191-3/+2
| | | | | | | | Based on patch by Franck Michea.
* | Issue20689: add missing API pieces to __all__Ethan Furman2014-10-181-1/+3
|\ \ | |/
| * Issue20689: add missing API pieces to __all__Ethan Furman2014-10-181-1/+3
| |
* | Issue20386: SocketType is again socket.socket; the IntEnum SOCK constants ↵Ethan Furman2014-10-151-5/+7
|\ \ | |/ | | | | are SocketKind
| * Issue20386: SocketType is again socket.socket; the IntEnum SOCK constants ↵Ethan Furman2014-10-151-5/+7
| | | | | | | | are SocketKind
* | Issue #18643: Add socket.socketpair() on Windows.Charles-François Natali2014-10-141-0/+51
| |
* | Issue #22032: __qualname__ instead of __name__ is now always used to formatSerhiy Storchaka2014-07-221-1/+1
| | | | | | | | fully qualified class names of Python implemented classes.
* | fix issue #17552: add socket.sendfile() method allowing to send a file over ↵Giampaolo Rodola'2014-06-111-1/+147
|/ | | | a socket by using high-performance os.sendfile() on UNIX. Patch by Giampaolo Rodola'·
* Provide a more readable representation of socket on repr().Giampaolo Rodola'2013-10-031-1/+1
| | | | | | | | Before: <socket.socket fd=3, family=2, type=1, proto=0, laddr=('0.0.0.0', 0)> Now: <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 0)>
* Switch the AF_* and SOCK_* constants in the socket module to IntEnum.Eli Bendersky2013-08-311-1/+65
| | | | Closes #18720.
* Issue #18571: Implementation of the PEP 446: file descriptors and file handlesVictor Stinner2013-08-271-1/+16
| | | | | are now created non-inheritable; add functions os.get/set_inheritable(), os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
* Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)Brett Cannon2013-07-041-1/+1
|
* Issue #18200: Update the stdlib (except tests) to useBrett Cannon2013-06-141-1/+1
| | | | ModuleNotFoundError.
* Fix issue #17675: make socket repr() provide local and remote addresses (if ↵Giampaolo Rodola'2013-04-101-7/+26
| | | | any).
* Replace IOError with OSError (#16715)Andrew Svetlov2012-12-251-1/+1
|
* Issue #15842: the SocketIO.{readable,writable,seekable} methods now raise ↵Antoine Pitrou2012-09-141-2/+13
|\ | | | | | | | | | | ValueError when the file-like object is closed. Patch by Alessandro Moura.
| * Issue #15842: the SocketIO.{readable,writable,seekable} methods now raise ↵Antoine Pitrou2012-09-141-2/+13
| | | | | | | | | | | | ValueError when the file-like object is closed. Patch by Alessandro Moura.
* | Issue #14310: inter-process socket duplication for windowsKristján Valur Jónsson2012-04-071-1/+9
| |
* | Issue #13872: socket.detach() now marks the socket closed (as mirrored in ↵Antoine Pitrou2012-03-311-0/+11
|\ \ | |/ | | | | | | | | the socket repr()). Patch by Matt Joiner.
| * Issue #13872: socket.detach() now marks the socket closed (as mirrored in ↵Antoine Pitrou2012-03-311-0/+11
| | | | | | | | | | | | the socket repr()). Patch by Matt Joiner.
| * Merged revisions 88622 via svnmerge fromAntoine Pitrou2011-02-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88622 | antoine.pitrou | 2011-02-26 00:07:44 +0100 (sam., 26 févr. 2011) | 5 lines Issue #7322: Trying to read from a socket's file-like object after a timeout occurred now raises an error instead of silently losing data. Patch by Ross Lagerwall. ........
* | Use InterruptedError instead of checking for EINTRAntoine Pitrou2011-10-231-5/+3
| |
* | Issue #11127: Raise a TypeError when trying to pickle a socket object.Antoine Pitrou2011-03-201-0/+3
| |