Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								02f32ab47e 
								
							 
						 
						
							
							
								
								Issue  #23834 : Modify socket.sendall() to reuse sock_call() with  
							
							... 
							
							
							
							sock_send_impl() 
							
						 
						
							2015-04-01 22:53:26 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								31bf2d5073 
								
							 
						 
						
							
							
								
								Issue  #23834 : Add sock_call() helper function  
							
							... 
							
							
							
							The BEGIN_SELECT_LOOP and END_SELECT_LOOP macros of socketmodule.c don't handle
EINTR. Functions using these macros use an inner loop to handle EINTR, but they
don't recompute the timeout.
This changes replaces the two macros with a new sock_call() function which
takes a function as a parameter. sock_call() recomputes the timeout, handle
false positive and handle EINTR. 
							
						 
						
							2015-04-01 21:57:09 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Benjamin Peterson 
								
							 
						 
						
							
							
							
							
								
							
							
								81541f4480 
								
							 
						 
						
							
							
								
								merge 3.4  
							
							
							
						 
						
							2015-04-01 12:37:34 -04:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Benjamin Peterson 
								
							 
						 
						
							
							
							
							
								
							
							
								4fd929b431 
								
							 
						 
						
							
							
								
								remove assignment in conditional  
							
							
							
						 
						
							2015-04-01 11:16:40 -04:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								a772662423 
								
							 
						 
						
							
							
								
								Issue  #23618 : Fix EINTR handling on Windows  
							
							... 
							
							
							
							Windows uses WSAEINTR error code, not EINTR, for socket functions. 
							
						 
						
							2015-04-01 11:09:43 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								70a46f635f 
								
							 
						 
						
							
							
								
								Issue  #23618 : Enhance EINTR handling in socket.connect()  
							
							... 
							
							
							
							Call PyErr_CheckSignals() immediatly if connect() or select() fails with EINTR
in internal_connect().
Refactor also the code to limit indentaton and make it more readable. 
							
						 
						
							2015-03-31 22:03:59 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								ee699e9d2b 
								
							 
						 
						
							
							
								
								Issue  #23618 : Fix EINTR handling in socket.connect()  
							
							... 
							
							
							
							Call PyErr_CheckSignals() if connect(), select() or getsockopt() failed with
EINTR. 
							
						 
						
							2015-03-31 21:28:42 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								c4e819a54f 
								
							 
						 
						
							
							
								
								Issue  #23618 : Cleanup internal_connect() in socketmodule.c  
							
							... 
							
							
							
							On Windows, it looks like using the C type socklen_t for getsockopt() (instead
of int) is fine, it was already used in socket.getsockopt(). 
							
						 
						
							2015-03-31 21:23:10 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								b6c15bcad3 
								
							 
						 
						
							
							
								
								Issue  #23618 : Refactor internal_connect()  
							
							... 
							
							
							
							On Windows, internal_connect() now reuses internal_connect_select() and always
calls getsockopt(). 
							
						 
						
							2015-03-31 16:35:35 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								dd88d3db45 
								
							 
						 
						
							
							
								
								Issue  #23618 : Refactor internal_connect()  
							
							... 
							
							
							
							The function now returns the error code instead of using the global errno
(POSIX) or WSAGetLastError() (Windows).
internal_connect() now returns errno if getsockopt() fails. 
							
						 
						
							2015-03-31 16:08:22 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								1bb0aef4d1 
								
							 
						 
						
							
							
								
								Issue  #22117 : Fix integer overflow check in socket_parse_timeout() on Windows  
							
							
							
						 
						
							2015-03-31 16:31:19 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								dd83bd2f9c 
								
							 
						 
						
							
							
								
								Issue  #23618 : Fix internal_connect_select()  
							
							
							
						 
						
							2015-03-31 14:24:47 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								416f2e66ca 
								
							 
						 
						
							
							
								
								Issue  #23618 : internal_connect_select() now waits also for error events  
							
							
							
						 
						
							2015-03-31 13:56:29 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								e6951c6c8a 
								
							 
						 
						
							
							
								
								Issue  #23618 : Refactor internal_select() to prepare socket.connect() for EINTR  
							
							
							
						 
						
							2015-03-31 13:50:44 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								391fa713f7 
								
							 
						 
						
							
							
								
								Issue  #23618 : Refactor the _socket module  
							
							... 
							
							
							
							* Inline internal_select() function
* Rename internal_select_ex() internal_select() 
							
						 
						
							2015-03-31 13:15:31 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								869e1778c0 
								
							 
						 
						
							
							
								
								Issue  #22117 : Replace usage of _PyTime_ROUND_UP with _PyTime_ROUND_CEILING  
							
							... 
							
							
							
							All these functions only accept positive timeouts, so this change has no effect
in practice. 
							
						 
						
							2015-03-30 03:49:14 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								ea9c0dd2c2 
								
							 
						 
						
							
							
								
								Issue  #22117 : Fix usage of _PyTime_AsTimeval()  
							
							... 
							
							
							
							Add _PyTime_AsTimeval_noraise() function. Call it when it's not possible (or
not useful) to raise a Python exception on overflow. 
							
						 
						
							2015-03-30 02:51:13 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								71694d5c8c 
								
							 
						 
						
							
							
								
								Issue  #22117 : The socket module uses _PyTime_t timestamp for timeouts  
							
							
							
						 
						
							2015-03-28 01:18:54 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								b7df3144ef 
								
							 
						 
						
							
							
								
								Issue  #23618 ,  #22117 : refactor socketmodule.c  
							
							... 
							
							
							
							Move Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS inside internal_select_ex() to
prepare a switch to the _PyTime_t type and retry syscall on EINTR. 
							
						 
						
							2015-03-27 22:59:32 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								f50e187724 
								
							 
						 
						
							
							
								
								Fix compiler warnings: comparison between signed and unsigned numbers  
							
							
							
						 
						
							2015-03-20 11:32:24 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Serhiy Storchaka 
								
							 
						 
						
							
							
							
							
								
							
							
								8490f5acfe 
								
							 
						 
						
							
							
								
								Issue  #23001 : Few functions in modules mmap, ossaudiodev, socket, ssl, and  
							
							... 
							
							
							
							codecs, that accepted only read-only bytes-like object now accept writable
bytes-like object too. 
							
						 
						
							2015-03-20 09:00:36 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								9a8089b32a 
								
							 
						 
						
							
							
								
								Issue  #23646 : Enhance precision of time.sleep() and socket timeout when  
							
							... 
							
							
							
							interrupted by a signal
Add a new _PyTime_AddDouble() function and remove _PyTime_ADD_SECONDS() macro.
The _PyTime_ADD_SECONDS only supported an integer number of seconds, the
_PyTime_AddDouble() has subsecond resolution. 
							
						 
						
							2015-03-20 01:42:20 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Serhiy Storchaka 
								
							 
						 
						
							
							
							
							
								
							
							
								caa01f861c 
								
							 
						 
						
							
							
								
								Fixed GCC version testing.  
							
							
							
						 
						
							2015-03-05 23:42:24 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								a4c727131e 
								
							 
						 
						
							
							
								
								Fix "GCC diagnostic" in socketmodule.c  
							
							... 
							
							
							
							Fix regression of changeset 7c6e3358221a on GCC < 4.4. The _socket module
cannot be compiled on "x86 FreeBSD 7.2 3.x" buildbot anymore. 
							
						 
						
							2015-03-05 14:04:03 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Serhiy Storchaka 
								
							 
						 
						
							
							
							
							
								
							
							
								b48af340b9 
								
							 
						 
						
							
							
								
								Silenced minor GCC warnings.  
							
							
							
						 
						
							2015-02-26 15:27:57 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Serhiy Storchaka 
								
							 
						 
						
							
							
							
							
								
							
							
								4d0d982985 
								
							 
						 
						
							
							
								
								Issue  #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer  
							
							... 
							
							
							
							overflows.  Added few missed PyErr_NoMemory(). 
							
						 
						
							2015-02-16 13:33:32 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Serhiy Storchaka 
								
							 
						 
						
							
							
							
							
								
							
							
								1a1ff29659 
								
							 
						 
						
							
							
								
								Issue  #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer  
							
							... 
							
							
							
							overflows.  Added few missed PyErr_NoMemory(). 
							
						 
						
							2015-02-16 13:28:22 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Charles-François Natali 
								
							 
						 
						
							
							
							
							
								
							
							
								6e6c59b508 
								
							 
						 
						
							
							
								
								Issue  #23285 : PEP 475 -- Retry system calls failing with EINTR.  
							
							
							
						 
						
							2015-02-07 13:27:50 +00:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Serhiy Storchaka 
								
							 
						 
						
							
							
							
							
								
							
							
								b757c83ec6 
								
							 
						 
						
							
							
								
								Issue  #22581 : Use more "bytes-like object" throughout the docs and comments.  
							
							
							
						 
						
							2014-12-05 22:25:22 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Steve Dower 
								
							 
						 
						
							
							
							
							
								
							
							
								65e4cb10d9 
								
							 
						 
						
							
							
								
								Issue  #22919 : Windows build updated to support VC 14.0 (Visual Studio 2015), which will be used for the official 3.5 release.  
							
							
							
						 
						
							2014-11-22 12:54:57 -08:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Serhiy Storchaka 
								
							 
						 
						
							
							
							
							
								
							
							
								92bf919ed0 
								
							 
						 
						
							
							
								
								Issue  #22581 : Use more "bytes-like object" throughout the docs and comments.  
							
							
							
						 
						
							2014-12-05 22:26:10 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Charles-François Natali 
								
							 
						 
						
							
							
							
							
								
							
							
								ea07eb9469 
								
							 
						 
						
							
							
								
								Issue  #22378 : socket module: add SO_MARK.  
							
							
							
						 
						
							2014-09-18 23:18:46 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Serhiy Storchaka 
								
							 
						 
						
							
							
							
							
								
							
							
								d8a1447c99 
								
							 
						 
						
							
							
								
								Issue  #22215 : Now ValueError is raised instead of TypeError when str or bytes  
							
							... 
							
							
							
							argument contains not permitted null character or byte. 
							
						 
						
							2014-09-06 20:07:17 +03:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								ae58649721 
								
							 
						 
						
							
							
								
								Issue  #22043 : time.monotonic() is now always available  
							
							... 
							
							
							
							threading.Lock.acquire(), threading.RLock.acquire() and socket operations now
use a monotonic clock, instead of the system clock, when a timeout is used. 
							
						 
						
							2014-09-02 23:18:25 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								1a62a680d6 
								
							 
						 
						
							
							
								
								Issue  #22218 : Fix "comparison between signed and unsigned integers" warnings in  
							
							... 
							
							
							
							socketmodule.c. 
							
						 
						
							2014-08-17 19:33:28 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Martin v. Löwis 
								
							 
						 
						
							
							
							
							
								
							
							
								17fd1e1013 
								
							 
						 
						
							
							
								
								Issue  #22127 : fix typo.  
							
							
							
						 
						
							2014-08-05 16:13:50 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Martin v. Löwis 
								
							 
						 
						
							
							
							
							
								
							
							
								eb1c28a849 
								
							 
						 
						
							
							
								
								Issue  #22127 : Bypass IDNA for pure-ASCII host names (in particular for numeric IPs).  
							
							
							
						 
						
							2014-08-05 16:10:38 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								011428e168 
								
							 
						 
						
							
							
								
								(Merge 3.4) Fix repr(_socket.socket) on Windows 64-bit: don't fail with  
							
							... 
							
							
							
							OverflowError on closed socket. repr(socket.socket) already works fine. 
							
						 
						
							2014-07-26 14:37:57 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								e254e53c83 
								
							 
						 
						
							
							
								
								Fix repr(_socket.socket) on Windows 64-bit: don't fail with OverflowError  
							
							... 
							
							
							
							on closed socket. repr(socket.socket) already works fine. 
							
						 
						
							2014-07-26 14:36:55 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								b6dab6bce8 
								
							 
						 
						
							
							
								
								Issue  #22042 : Avoid dangerous C cast in socket.setblocking()  
							
							... 
							
							
							
							Avoid cast from (int*) to (u_long*), even if sizeof(int) == sizeof(u_long). 
							
						 
						
							2014-07-23 22:56:55 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Berker Peksag 
								
							 
						 
						
							
							
							
							
								
							
							
								d9375f121e 
								
							 
						 
						
							
							
								
								Fix typo in socket.getaddrinfo() docstring.  
							
							... 
							
							
							
							Reported by Krishna Kumar Thakur on docs@. 
							
						 
						
							2014-06-30 11:30:00 +03:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Berker Peksag 
								
							 
						 
						
							
							
							
							
								
							
							
								a6ec5ee3c8 
								
							 
						 
						
							
							
								
								Fix typo in socket.getaddrinfo() docstring.  
							
							... 
							
							
							
							Reported by Krishna Kumar Thakur on docs@. 
							
						 
						
							2014-06-30 11:28:40 +03:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								8e44aa5ae4 
								
							 
						 
						
							
							
								
								Issue  #23834 : Fix socket.sendto(), use the C Py_ssize_t type to store the  
							
							... 
							
							
							
							result of sendto() instead of the C int type. 
							
						 
						
							2015-04-02 17:16:08 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Victor Stinner 
								
							 
						 
						
							
							
							
							
								
							
							
								ef7f140366 
								
							 
						 
						
							
							
								
								All modern compilers provide a offsetof() function  
							
							... 
							
							
							
							offsetof() is used directly in many other .c files without any issue. 
							
						 
						
							2014-06-03 18:45:05 +02:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Charles-François Natali 
								
							 
						 
						
							
							
							
							
								
							
							
								644b8f52a8 
								
							 
						 
						
							
							
								
								Issue  #21455 : Add a default backlog to socket.listen().  
							
							
							
						 
						
							2014-05-22 19:45:39 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Vinay Sajip 
								
							 
						 
						
							
							
							
							
								
							
							
								ed6783f315 
								
							 
						 
						
							
							
								
								Issue  #10141 , Issue 20065: Changed #if to take CAN_RAW into account.  
							
							
							
						 
						
							2014-03-21 11:44:32 +00:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Vinay Sajip 
								
							 
						 
						
							
							
							
							
								
							
							
								ecfc98c67b 
								
							 
						 
						
							
							
								
								Issue  #10141 : updated new usages of AF_CAN to be in #ifdef AF_CAN rather than #ifdef HAVE_LINUX_CAN_H to allow compilation on older Linuxes.  
							
							
							
						 
						
							2014-03-20 12:42:42 +00:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Charles-François Natali 
								
							 
						 
						
							
							
							
							
								
							
							
								4025ac7549 
								
							 
						 
						
							
							
								
								Issue  #20065 : socketmodule: Fix build error when AF_CAN is defined without the  
							
							... 
							
							
							
							proper CAN headers. 
							
						 
						
							2014-02-08 22:54:48 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Charles-François Natali 
								
							 
						 
						
							
							
							
							
								
							
							
								b4062e8f8a 
								
							 
						 
						
							
							
								
								Issue  #20065 : socketmodule: Fix build error when AF_CAN is defined without the  
							
							... 
							
							
							
							proper CAN headers. 
							
						 
						
							2014-02-08 22:54:11 +01:00 
							
								 
							
							
								 
							
						 
					 
				
					
						
							
								
								
									Benjamin Peterson 
								
							 
						 
						
							
							
							
							
								
							
							
								901acb4d89 
								
							 
						 
						
							
							
								
								merge 3.3 ( #20251 )  
							
							
							
						 
						
							2014-01-14 00:22:50 -05:00