summaryrefslogtreecommitdiffstats
path: root/Lib/socket.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #26778: Fixed "a/an/and" typos in code comment and documentation.Serhiy Storchaka2016-04-171-1/+1
|
* Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. TheVictor Stinner2015-01-061-1/+5
| | | | | availability of the function is checked during the compilation. Patch written by Bernard Spil.
* issue #879399Kristján Valur Jónsson2012-12-251-2/+2
| | | | Fix line buffering of socket._fileobject
* Merged revisions 84597-84599 via svnmerge fromAntoine Pitrou2010-09-071-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. ........
* Issue #808164: Fixed socket.close to avoid references to globals, toDaniel Stutzbach2010-08-311-1/+3
| | | | avoid issues when socket.close is called from a __del__ method.
* Adds an optional source_address parameter to socket.create_connection().Gregory P. Smith2010-01-031-3/+9
| | | | For use by issue3972.
* Fix py3k warnings in the socket moduleAntoine Pitrou2009-10-141-9/+10
|
* Fix issue1628205: Socket file objects returned by socket.socket.makefile() nowGregory P. Smith2009-08-131-13/+56
| | | | | properly handles EINTR within the read, readline, write & flush methods. The socket.sendall() method now properly handles interrupted system calls.
* http://bugs.python.org/issue6117Kristján Valur Jónsson2009-06-021-10/+9
| | | | Fix O(n**2) performance problem in socket._fileobject
* Typo in socket.py. Thanks Pablo Torres Navarrete.Mark Dickinson2009-06-021-1/+1
|
* remove unpleasant execChris Withers2009-04-111-5/+11
|
* add create_connection to __all__ #5711Benjamin Peterson2009-04-061-1/+1
|
* Remove buffer() usage in the socket module by just slicing directly on theBrett Cannon2008-08-081-6/+6
| | | | object. This removes all warnings for the module caused by running under -3.
* Fixed the semantic of timeout for socket.create_connection andFacundo Batista2008-05-291-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, :)
* Fix a bug introduced in r62627. see issue2760 and issue2632.Gregory P. Smith2008-05-051-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.
* This should fix issue2632. A long description of the two competingGregory P. Smith2008-05-021-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.
* #1389051, #1092502: fix excessively large allocations when using read() on a ↵Andrew M. Kuchling2008-02-231-1/+1
| | | | socket
* socket.ioctl is only available on WindowsChristian Heimes2008-01-041-1/+4
|
* Added interface to Windows' WSAIoctl and a simple example for a network sniffer.Christian Heimes2008-01-041-1/+1
|
* Revert dummy commit now that the build slave is building.Georg Brandl2007-12-161-1/+0
|
* Dummy commit to investigate #1617.Georg Brandl2007-12-161-0/+1
|
* More work on SSL support.Bill Janssen2007-09-101-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.
* This contains a number of things:Bill Janssen2007-08-291-12/+28
| | | | | | | | | | | | | | | | 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.
* Server-side SSL and certificate validation, by Bill Janssen.Guido van Rossum2007-08-251-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).
* Bug #978833: Close https sockets by releasing the _ssl object.Martin v. Löwis2007-07-271-0/+4
|
* Whitespace normalization. Ugh, we really need to do this more often.Neal Norwitz2007-04-251-5/+5
| | | | You might want to review this change as it's my first time. Be gentle. :-)
* Added a 'create_connect()' function to socket.py, which creates aFacundo Batista2007-03-231-0/+29
| | | | | connection with an optional timeout, and modified httplib.py to use this function in HTTPConnection. Applies patch 1676823.
* Bug #978833: Revert r50844, as it broke _socketobject.dup.Martin v. Löwis2007-03-231-3/+0
| | | | Will backport.
* Patch #1627441: close sockets properly in urllib2.Georg Brandl2007-01-211-2/+6
|
* Bug #978833: Really close underlying socket in _socketobject.close.Martin v. Löwis2006-07-261-0/+3
| | | | | Fix httplib.HTTPConnection.getresponse to not close the socket if it is still needed for the response.
* Release all forwarded functions in .close. Fixes #1513223.Martin v. Löwis2006-07-011-12/+14
|
* Fixes in struct and socket from merge reviews.Martin Blais2006-06-041-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.
* Support for buffer protocol for socket and struct.Martin Blais2006-05-261-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.
* Patch #1466993: remove wrong comment in socket.pyGeorg Brandl2006-04-091-8/+0
|
* Whitespace normalization.Tim Peters2006-03-221-1/+1
|
* Correct API design mistake from rev. 43126: make socket attributes readonly ↵Georg Brandl2006-03-211-18/+4
| | | | properties.
* RFE #567972: Socket objects' family, type and proto properties areGeorg Brandl2006-03-171-0/+18
| | | | now exposed via new get...() methods.
* Fix test for socket.getfqdn() to also include the name returned byBrett Cannon2005-03-111-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.
* Patch #1003700: Add socketpair function to socket module.Dave Cole2004-08-091-0/+1
|
* Add weakref support to sockets and re pattern objects.Raymond Hettinger2004-05-311-1/+2
|
* SF bug 924242: socket._fileobject._getclosed() returns wrong valueTim Peters2004-03-281-1/+1
| | | | | | The .closed property always returned the wrong result. Bugfix candidate!
* Always unwrap _socketobj in socket.ssl. Revert httplib.py 1.25.Martin v. Löwis2003-06-141-10/+6
| | | | Fixes #754447.
* I saw errors from _fileobject.__del__ about missing self._sock. ThisGuido van Rossum2003-05-291-1/+5
| | | | | can happen if __init__ doesn't complete. Fix it by adding a try/except to __del__.
* Patch #734231: Update RiscOS support. In particular, correctMartin v. Löwis2003-05-101-1/+3
| | | | riscospath.extsep, and use os.extsep throughout.
* Extract the errno value to use from the errno module if possible.Fred Drake2003-04-291-1/+6
|
* Regain throughput lost with the _socketobject wrapper. TheSkip Montanaro2003-04-291-3/+9
| | | | | throughput-sensitive methods are grabbed from the underlying _socket.socket object. Closes SF patch 729293.
* Patch by Jp Calderone:Guido van Rossum2003-04-251-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).
* The socket module now always uses the _socketobject wrapper class, even onSkip Montanaro2003-03-301-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.
* On Windows, make sure SocketType is the same as socket. (SF bugGuido van Rossum2002-08-221-1/+1
| | | | 598097)
* Delete junk attributes left behind by _socketobject class construction.Tim Peters2002-08-081-0/+1
|