summaryrefslogtreecommitdiff
path: root/Lib/socket.py
AgeCommit message (Collapse)AuthorLines
2016-04-17Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka-1/+1
2015-01-06Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. TheVictor Stinner-1/+5
availability of the function is checked during the compilation. Patch written by Bernard Spil.
2012-12-25issue #879399Kristján Valur Jónsson-2/+2
Fix line buffering of socket._fileobject
2010-09-07Merged revisions 84597-84599 via svnmerge fromAntoine Pitrou-3/+7
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84597 | antoine.pitrou | 2010-09-07 22:42:19 +0200 (mar., 07 sept. 2010) | 5 lines Issue #8574: better implementation of test.support.transient_internet(). Original patch by Victor. ........ r84598 | antoine.pitrou | 2010-09-07 23:05:49 +0200 (mar., 07 sept. 2010) | 6 lines Issue #9792: In case of connection failure, socket.create_connection() would swallow the exception and raise a new one, making it impossible to fetch the original errno, or to filter timeout errors. Now the original error is re-raised. ........ r84599 | antoine.pitrou | 2010-09-07 23:09:09 +0200 (mar., 07 sept. 2010) | 4 lines Improve transient_internet() again to detect more network errors, and use it in test_robotparser. Fixes #8574. ........
2010-08-31Issue #808164: Fixed socket.close to avoid references to globals, toDaniel Stutzbach-1/+3
avoid issues when socket.close is called from a __del__ method.
2010-01-03Adds an optional source_address parameter to socket.create_connection().Gregory P. Smith-3/+9
For use by issue3972.
2009-10-14Fix py3k warnings in the socket moduleAntoine Pitrou-9/+10
2009-08-13Fix issue1628205: Socket file objects returned by socket.socket.makefile() nowGregory P. Smith-13/+56
properly handles EINTR within the read, readline, write & flush methods. The socket.sendall() method now properly handles interrupted system calls.
2009-06-02http://bugs.python.org/issue6117Kristján Valur Jónsson-10/+9
Fix O(n**2) performance problem in socket._fileobject
2009-06-02Typo in socket.py. Thanks Pablo Torres Navarrete.Mark Dickinson-1/+1
2009-04-11remove unpleasant execChris Withers-5/+11
2009-04-06add create_connection to __all__ #5711Benjamin Peterson-1/+1
2008-08-08Remove buffer() usage in the socket module by just slicing directly on theBrett Cannon-6/+6
object. This removes all warnings for the module caused by running under -3.
2008-05-29Fixed the semantic of timeout for socket.create_connection andFacundo Batista-7/+10
all the upper level libraries that use it, including urllib2. Added and fixed some tests, and changed docs correspondingly. Thanks to John J Lee for the patch and the pusing, :)
2008-05-05Fix a bug introduced in r62627. see issue2760 and issue2632.Gregory P. Smith-19/+18
An assertion in readline() would fail as data was already in the internal buffer even though the socket was in unbuffered read mode. That case is now handled. More importantly, read() has been fixed to not over-recv() and leave newly recv()d data in the _fileobject buffer. The max() vs min() issue in read() is now gone. Neither was correct. On bounded reads, always ask recv() for the exact amount of data we still need. Candidate for backporting to release25-maint along with r62627.
2008-05-02This should fix issue2632. A long description of the two competingGregory P. Smith-59/+104
problems is in the bug report (one old, one recently introduced trying to fix the old one). In short: buffer data during socket._fileobject.read() and readlines() within a cStringIO object instead of a [] of str()s returned from the recv() call. This prevents excessive memory use due to the size parameter being passed to recv() being grossly larger than the actual size of the data returned *and* prevents excessive cpu usage due to looping in python calling recv() with a very tiny size value if min() is used as the previous memory-use bug "fix" did. It also documents what the socket._fileobject._rbufsize member is actually used for. This is a candidate for back porting to 2.5.
2008-02-23#1389051, #1092502: fix excessively large allocations when using read() on a ↵Andrew M. Kuchling-1/+1
socket
2008-01-04socket.ioctl is only available on WindowsChristian Heimes-1/+4
2008-01-04Added interface to Windows' WSAIoctl and a simple example for a network sniffer.Christian Heimes-1/+1
2007-12-16Revert dummy commit now that the build slave is building.Georg Brandl-1/+0
2007-12-16Dummy commit to investigate #1617.Georg Brandl-0/+1
2007-09-10More work on SSL support.Bill Janssen-2/+2
* Much expanded test suite: All protocols tested against all other protocols. All protocols tested with all certificate options. Tests for bad key and bad cert. Test of STARTTLS functionality. Test of RAND_* functions. * Fixes for threading/malloc bug. * Issue 1065 fixed: sslsocket class renamed to SSLSocket. sslerror class renamed to SSLError. Function "wrap_socket" now used to wrap an existing socket. * Issue 1583946 finally fixed: Support for subjectAltName added. Subject name now returned as proper DN list of RDNs. * SSLError exported from socket as "sslerror". * RAND_* functions properly exported from ssl.py. * Documentation improved: Example of how to create a self-signed certificate. Better indexing.
2007-08-29This contains a number of things:Bill Janssen-11/+27
1) Improve the documentation of the SSL module, with a fuller explanation of certificate usage, another reference, proper formatting of this and that. 2) Fix Windows bug in ssl.py, and general bug in sslsocket.close(). Remove some unused code from ssl.py. Allow accept() to be called on sslsocket sockets. 3) Use try-except-else in import of ssl in socket.py. Deprecate use of socket.ssl(). 4) Remove use of socket.ssl() in every library module, except for test_socket_ssl.py and test_ssl.py.
2007-08-25Server-side SSL and certificate validation, by Bill Janssen.Guido van Rossum-4/+3
While cleaning up Bill's C style, I may have cleaned up some code he didn't touch as well (in _ssl.c).
2007-07-27Bug #978833: Close https sockets by releasing the _ssl object.Martin v. Löwis-0/+4
2007-04-25Whitespace normalization. Ugh, we really need to do this more often.Neal Norwitz-5/+5
You might want to review this change as it's my first time. Be gentle. :-)
2007-03-23Added a 'create_connect()' function to socket.py, which creates aFacundo Batista-0/+29
connection with an optional timeout, and modified httplib.py to use this function in HTTPConnection. Applies patch 1676823.
2007-03-23Bug #978833: Revert r50844, as it broke _socketobject.dup.Martin v. Löwis-3/+0
Will backport.
2007-01-21Patch #1627441: close sockets properly in urllib2.Georg Brandl-2/+6
2006-07-26Bug #978833: Really close underlying socket in _socketobject.close.Martin v. Löwis-0/+3
Fix httplib.HTTPConnection.getresponse to not close the socket if it is still needed for the response.
2006-07-01Release all forwarded functions in .close. Fixes #1513223.Martin v. Löwis-12/+14
2006-06-04Fixes in struct and socket from merge reviews.Martin Blais-3/+3
- Following Guido's comments, renamed * pack_to -> pack_into * recv_buf -> recv_into * recvfrom_buf -> recvfrom_into - Made fixes to _struct.c according to Neal Norwitz comments on the checkins list. - Converted some ints into the appropriate -- I hope -- ssize_t and size_t.
2006-05-26Support for buffer protocol for socket and struct.Martin Blais-1/+5
* Added socket.recv_buf() and socket.recvfrom_buf() methods, that use the buffer protocol (send and sendto already did). * Added struct.pack_to(), that is the corresponding buffer compatible method to unpack_from(). * Fixed minor typos in arraymodule.
2006-04-09Patch #1466993: remove wrong comment in socket.pyGeorg Brandl-8/+0
2006-03-22Whitespace normalization.Tim Peters-1/+1
2006-03-21Correct API design mistake from rev. 43126: make socket attributes readonly ↵Georg Brandl-18/+4
properties.
2006-03-17RFE #567972: Socket objects' family, type and proto properties areGeorg Brandl-0/+18
now exposed via new get...() methods.
2005-03-11Fix test for socket.getfqdn() to also include the name returned byBrett Cannon-1/+1
socket.gethostname() in the check for a valid return. Also clarified docs (official and docstring) that the value from gethostname() is returned if gethostbyaddr() doesn't do the job.
2004-08-09Patch #1003700: Add socketpair function to socket module.Dave Cole-0/+1
2004-05-31Add weakref support to sockets and re pattern objects.Raymond Hettinger-1/+2
2004-03-28SF bug 924242: socket._fileobject._getclosed() returns wrong valueTim Peters-1/+1
The .closed property always returned the wrong result. Bugfix candidate!
2003-06-14Always unwrap _socketobj in socket.ssl. Revert httplib.py 1.25.Martin v. Löwis-10/+6
Fixes #754447.
2003-05-29I saw errors from _fileobject.__del__ about missing self._sock. ThisGuido van Rossum-1/+5
can happen if __init__ doesn't complete. Fix it by adding a try/except to __del__.
2003-05-10Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis-1/+3
riscospath.extsep, and use os.extsep throughout.
2003-04-29Extract the errno value to use from the errno module if possible.Fred Drake-1/+6
2003-04-29Regain throughput lost with the _socketobject wrapper. TheSkip Montanaro-3/+9
throughput-sensitive methods are grabbed from the underlying _socket.socket object. Closes SF patch 729293.
2003-04-25Patch by Jp Calderone:Guido van Rossum-0/+1
- The socket module now provides the functions inet_pton and inet_ntop for converting between string and packed representation of IP addresses. See SF patch #658327. This still needs a bit of work in the doc area, because it is not available on all platforms (especially not on Windows).
2003-03-30The socket module now always uses the _socketobject wrapper class, even onSkip Montanaro-5/+1
platforms which have dup(2). The makefile() method is built directly on top of the socket without duplicating the file descriptor, allowing timeouts to work properly. Includes a new test case (urllibnet) which requires the network resource. Closes bug 707074.
2002-08-22On Windows, make sure SocketType is the same as socket. (SF bugGuido van Rossum-1/+1
598097)
2002-08-08Delete junk attributes left behind by _socketobject class construction.Tim Peters-0/+1