Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #24732, #23834: Fix sock_accept_impl() on Windows | Victor Stinner | 2015-07-27 | 1 | -0/+5 |
| | | | | accept() returns INVALID_SOCKET on error, it's not necessary a negative number. | ||||
* | Issue #22631: Added Linux-specific socket constant CAN_RAW_FD_FRAMES. | Larry Hastings | 2015-04-13 | 1 | -0/+3 |
| | | | | Patch courtesy of Joe Jevnik. | ||||
* | Issue #23618: Fix internal_select() for negative timeout (blocking socket) when | Victor Stinner | 2015-04-09 | 1 | -4/+9 |
| | | | | | | | poll() is not available. select() doesn't accept negative timeout, the timeout parameter must be NULL to block on select(). | ||||
* | Issue #23834: Fix the default socket timeout | Victor Stinner | 2015-04-09 | 1 | -1/+2 |
| | | | | Use -1 second by default, not -1 nanosecond. | ||||
* | Issue #22117: Fix sock_call_ex() for non-blocking socket | Victor Stinner | 2015-04-06 | 1 | -1/+1 |
| | | | | | Call internal_select() with a timeout of 0 second, not a timeout of -1 second (blocking)! | ||||
* | Issue #23853: socket.socket.sendall() does no more reset the socket timeout | Victor Stinner | 2015-04-06 | 1 | -16/+41 |
| | | | | | each time data is sent successfuly. The socket timeout is now the maximum total duration to send all data. | ||||
* | Issue #23834: Fix initial value of the socket timeout | Victor Stinner | 2015-04-06 | 1 | -2/+2 |
| | | | | | | Use _PyTime_FromSeconds() to initialize the default socket timeout to -1 second, instead of -1 nanosecond which causes rounding issues in internal_select(). | ||||
* | Issue #23834: Simplify timeout handling | Victor Stinner | 2015-04-03 | 1 | -27/+13 |
| | | | | | | | | | | | * Use the new _PyTime_FromSeconds() function to set the timeout to -1 second for socket.settimeout(None). It avoids a special case in internal_select() because of a rounding issue: -1 nanosecond is rounded to 0 millisecond which means non-blocking, instead of blocking. * Check if the interval the negative in sock_call_ex() instead of doing the check in internal_select(). sock_call_ex() remembers if the socket has a timeout or not, which avoids a race condition if the timeout is modified in a different thread. | ||||
* | Issue #23618: Ooops, remove abort() added for debug purpose | Victor Stinner | 2015-04-02 | 1 | -1/+0 |
| | |||||
* | Issue #23618: Fix sock_connect_impl(), set the socket error code | Victor Stinner | 2015-04-02 | 1 | -1/+7 |
| | | | | | sock_call_ex() gets the socket error code when the socket function fails. sock_connect_impl() didn't set the error correctly. | ||||
* | Issue #23618: socket.socket.connect() now waits until the connection completes | Victor Stinner | 2015-04-02 | 1 | -124/+178 |
| | | | | | | | | instead of raising InterruptedError if the connection is interrupted by signals, signal handlers don't raise an exception and the socket is blocking or has a timeout. socket.socket.connect() still raise InterruptedError for non-blocking sockets. | ||||
* | Issue #23618: Don't declare recvmsg/sendmsg helper functions on Windows | Victor Stinner | 2015-04-02 | 1 | -7/+6 |
| | |||||
* | Issue #23834: Fix sock_call(), set deadline_initialized to recompute the timeout | Victor Stinner | 2015-04-02 | 1 | -0/+1 |
| | |||||
* | Issue #23834: Modify socket.sendall() to reuse sock_call() with | Victor Stinner | 2015-04-01 | 1 | -29/+21 |
| | | | | sock_send_impl() | ||||
* | Issue #23834: Add sock_call() helper function | Victor Stinner | 2015-04-01 | 1 | -256/+323 |
| | | | | | | | | | | 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. | ||||
* | merge 3.4 | Benjamin Peterson | 2015-04-01 | 1 | -1/+2 |
|\ | |||||
| * | remove assignment in conditional | Benjamin Peterson | 2015-04-01 | 1 | -1/+2 |
| | | |||||
* | | Issue #23618: Fix EINTR handling on Windows | Victor Stinner | 2015-04-01 | 1 | -2/+2 |
| | | | | | | | | Windows uses WSAEINTR error code, not EINTR, for socket functions. | ||||
* | | Issue #23618: Enhance EINTR handling in socket.connect() | Victor Stinner | 2015-03-31 | 1 | -35/+37 |
| | | | | | | | | | | | | | | 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. | ||||
* | | Issue #23618: Fix EINTR handling in socket.connect() | Victor Stinner | 2015-03-31 | 1 | -10/+8 |
| | | | | | | | | | | Call PyErr_CheckSignals() if connect(), select() or getsockopt() failed with EINTR. | ||||
* | | Issue #23618: Cleanup internal_connect() in socketmodule.c | Victor Stinner | 2015-03-31 | 1 | -3/+1 |
| | | | | | | | | | | 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(). | ||||
* | | Issue #23618: Refactor internal_connect() | Victor Stinner | 2015-03-31 | 1 | -79/+30 |
| | | | | | | | | | | On Windows, internal_connect() now reuses internal_connect_select() and always calls getsockopt(). | ||||
* | | Issue #23618: Refactor internal_connect() | Victor Stinner | 2015-03-31 | 1 | -35/+57 |
| | | | | | | | | | | | | | | 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. | ||||
* | | Issue #22117: Fix integer overflow check in socket_parse_timeout() on Windows | Victor Stinner | 2015-03-31 | 1 | -3/+6 |
| | | |||||
* | | Issue #23618: Fix internal_connect_select() | Victor Stinner | 2015-03-31 | 1 | -1/+1 |
| | | |||||
* | | Issue #23618: internal_connect_select() now waits also for error events | Victor Stinner | 2015-03-31 | 1 | -6/+15 |
| | | |||||
* | | Issue #23618: Refactor internal_select() to prepare socket.connect() for EINTR | Victor Stinner | 2015-03-31 | 1 | -13/+23 |
| | | |||||
* | | Issue #23618: Refactor the _socket module | Victor Stinner | 2015-03-31 | 1 | -17/+11 |
| | | | | | | | | | | * Inline internal_select() function * Rename internal_select_ex() internal_select() | ||||
* | | Issue #22117: Replace usage of _PyTime_ROUND_UP with _PyTime_ROUND_CEILING | Victor Stinner | 2015-03-30 | 1 | -6/+7 |
| | | | | | | | | | | All these functions only accept positive timeouts, so this change has no effect in practice. | ||||
* | | Issue #22117: Fix usage of _PyTime_AsTimeval() | Victor Stinner | 2015-03-30 | 1 | -6/+2 |
| | | | | | | | | | | Add _PyTime_AsTimeval_noraise() function. Call it when it's not possible (or not useful) to raise a Python exception on overflow. | ||||
* | | Issue #22117: The socket module uses _PyTime_t timestamp for timeouts | Victor Stinner | 2015-03-28 | 1 | -90/+123 |
| | | |||||
* | | Issue #23618, #22117: refactor socketmodule.c | Victor Stinner | 2015-03-27 | 1 | -83/+113 |
| | | | | | | | | | | 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. | ||||
* | | Fix compiler warnings: comparison between signed and unsigned numbers | Victor Stinner | 2015-03-20 | 1 | -1/+1 |
| | | |||||
* | | Issue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, and | Serhiy Storchaka | 2015-03-20 | 1 | -47/+60 |
| | | | | | | | | | | codecs, that accepted only read-only bytes-like object now accept writable bytes-like object too. | ||||
* | | Issue #23646: Enhance precision of time.sleep() and socket timeout when | Victor Stinner | 2015-03-20 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | 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. | ||||
* | | Fixed GCC version testing. | Serhiy Storchaka | 2015-03-05 | 1 | -2/+2 |
| | | |||||
* | | Fix "GCC diagnostic" in socketmodule.c | Victor Stinner | 2015-03-05 | 1 | -2/+2 |
| | | | | | | | | | | Fix regression of changeset 7c6e3358221a on GCC < 4.4. The _socket module cannot be compiled on "x86 FreeBSD 7.2 3.x" buildbot anymore. | ||||
* | | Silenced minor GCC warnings. | Serhiy Storchaka | 2015-02-26 | 1 | -0/+7 |
| | | |||||
* | | Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer | Serhiy Storchaka | 2015-02-16 | 1 | -2/+4 |
|\ \ | |/ | | | | | overflows. Added few missed PyErr_NoMemory(). | ||||
| * | Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer | Serhiy Storchaka | 2015-02-16 | 1 | -2/+4 |
| | | | | | | | | overflows. Added few missed PyErr_NoMemory(). | ||||
* | | Issue #23285: PEP 475 -- Retry system calls failing with EINTR. | Charles-François Natali | 2015-02-07 | 1 | -112/+127 |
| | | |||||
* | | Issue #22919: Windows build updated to support VC 14.0 (Visual Studio 2015), ↵ | Steve Dower | 2014-11-22 | 1 | -1/+10 |
| | | | | | | | | which will be used for the official 3.5 release. | ||||
* | | Issue #22581: Use more "bytes-like object" throughout the docs and comments. | Serhiy Storchaka | 2014-12-05 | 1 | -3/+3 |
|\ \ | |/ | |||||
| * | Issue #22581: Use more "bytes-like object" throughout the docs and comments. | Serhiy Storchaka | 2014-12-05 | 1 | -3/+3 |
| | | |||||
* | | Issue #22378: socket module: add SO_MARK. | Charles-François Natali | 2014-09-18 | 1 | -0/+3 |
| | | |||||
* | | Issue #22215: Now ValueError is raised instead of TypeError when str or bytes | Serhiy Storchaka | 2014-09-06 | 1 | -1/+1 |
| | | | | | | | | argument contains not permitted null character or byte. | ||||
* | | Issue #22043: time.monotonic() is now always available | Victor Stinner | 2014-09-02 | 1 | -2/+2 |
| | | | | | | | | | | threading.Lock.acquire(), threading.RLock.acquire() and socket operations now use a monotonic clock, instead of the system clock, when a timeout is used. | ||||
* | | Issue #22218: Fix "comparison between signed and unsigned integers" warnings in | Victor Stinner | 2014-08-17 | 1 | -5/+6 |
| | | | | | | | | socketmodule.c. | ||||
* | | Issue #22127: fix typo. | Martin v. Löwis | 2014-08-05 | 1 | -1/+1 |
| | | |||||
* | | Issue #22127: Bypass IDNA for pure-ASCII host names (in particular for ↵ | Martin v. Löwis | 2014-08-05 | 1 | -10/+75 |
| | | | | | | | | numeric IPs). |