Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 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 #22117: Add a new _PyTime_FromSeconds() function | Victor Stinner | 2015-04-03 | 2 | -1/+14 |
| | | | | | Fix also _Py_InitializeEx_Private(): initialize time before initializing import, import_init() uses the _PyTime API (for thread locks). | ||||
* | Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and | Serhiy Storchaka | 2015-04-02 | 1 | -16/+193 |
|\ | | | | | | | arbitrary precision integers added in Tcl 8.5. | ||||
| * | Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 and | Serhiy Storchaka | 2015-04-02 | 1 | -16/+206 |
| | | | | | | | | arbitrary precision integers added in Tcl 8.5. | ||||
| * | Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store the | Victor Stinner | 2015-04-02 | 1 | -1/+2 |
| | | | | | | | | result of sendto() instead of the C int type. | ||||
* | | Merge 3.4 (_posixsubprocess) | Victor Stinner | 2015-04-02 | 1 | -6/+6 |
|\ \ | |/ | |||||
| * | Issue #23851: close() must not be retried when it fails with EINTR | Victor Stinner | 2015-04-02 | 1 | -6/+6 |
| | | | | | | | | See the PEP 475 for the rationale. | ||||
* | | 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 #21526: Fixed support of new boolean type in Tcl 8.5. | Serhiy Storchaka | 2015-04-02 | 1 | -4/+19 |
|\ \ | |/ | |||||
| * | Issue #21526: Tkinter now supports new boolean type in Tcl 8.5. | Serhiy Storchaka | 2015-04-02 | 1 | -15/+34 |
| | | |||||
* | | 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. | ||||
* | | Issue #23836: Fix the faulthandler module to handle reentrant calls | Victor Stinner | 2015-04-01 | 1 | -40/+45 |
| | | | | | | | | | | | | | | | | | | | | to its signal handlers. Use also _Py_write_noraise() instead of write() to retry write() if it is interrupted by a signal (fail with EINTR). faulthandler.dump_traceback() also calls PyErr_CheckSignals() to call the Python signal handler if a signal was received. | ||||
* | | Issue #23836: Use _Py_write_noraise() to retry on EINTR in child_exec() of | Victor Stinner | 2015-04-01 | 1 | -9/+10 |
| | | | | | | | | _posixsubprocess | ||||
* | | Issue #23836: Use _Py_write_noraise() to retry on EINTR in trip_signal() of | Victor Stinner | 2015-04-01 | 1 | -3/+4 |
| | | | | | | | | signalmodule.c | ||||
* | | merge 3.4 | Benjamin Peterson | 2015-04-01 | 1 | -1/+2 |
|\ \ | |/ | |||||
| * | remove assignment in conditional | Benjamin Peterson | 2015-04-01 | 1 | -1/+2 |
| | | |||||
* | | Issue #22117, issue #23485: Fix _PyTime_AsMilliseconds() and | Victor Stinner | 2015-04-01 | 1 | -0/+38 |
| | | | | | | | | | | | | _PyTime_AsMicroseconds() rounding. Add also unit tests. | ||||
* | | 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 23793: Add deque support for __add__(), __mul__(), and __imul__(). | Raymond Hettinger | 2015-03-31 | 1 | -10/+123 |
| | | |||||
* | | 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 #23611: Serializing more "lookupable" objects (such as unbound methods | Serhiy Storchaka | 2015-03-31 | 1 | -47/+71 |
| | | | | | | | | or nested classes) now are supported with pickle protocols < 4. | ||||
* | | Issue #13583: sqlite3.Row now supports slice indexing. | Serhiy Storchaka | 2015-03-31 | 1 | -2/+1 |
| | | | | | | | | Tests by Jessica McKellar. | ||||
* | | Merge heads | Serhiy Storchaka | 2015-03-31 | 1 | -54/+97 |
|\ \ | |||||
| * | | Issue #23485: select.devpoll.poll() is now retried when interrupted by a signal | Victor Stinner | 2015-03-31 | 1 | -43/+63 |
| | | | |||||
| * | | Issue #23485: select.kqueue.control() is now retried when interrupted by a ↵ | Victor Stinner | 2015-03-31 | 1 | -11/+34 |
| | | | | | | | | | | | | signal | ||||
* | | | Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings. | Serhiy Storchaka | 2015-03-31 | 1 | -12/+14 |
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | Fixed ambigious reverse mappings. Added many new mappings. Import mapping is no longer applied to modules already mapped with full name mapping. Added tests for compatible pickling and unpickling and for consistency of _compat_pickle mappings. | ||||
| * | Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings. | Serhiy Storchaka | 2015-03-31 | 1 | -12/+14 |
| | | | | | | | | | | | | | | | | Fixed ambigious reverse mappings. Added many new mappings. Import mapping is no longer applied to modules already mapped with full name mapping. Added tests for compatible pickling and unpickling and for consistency of _compat_pickle mappings. | ||||
* | | Issue #23485: select.epoll.poll() is now retried when interrupted by a signal | Victor Stinner | 2015-03-30 | 1 | -18/+51 |
| | | |||||
* | | Issue #23485: select.poll.poll() is now retried when interrupted by a signal | Victor Stinner | 2015-03-30 | 1 | -50/+83 |
| | | |||||
* | | PEP 475: on EINTR, retry the function even if the timeout is equals to zero | Victor Stinner | 2015-03-30 | 3 | -3/+3 |
| | | | | | | | | | | | | | | | | | | Retry: * signal.sigtimedwait() * threading.Lock.acquire() * threading.RLock.acquire() * time.sleep() | ||||
* | | Issue #23485: select.select() is now retried automatically with the recomputed | Victor Stinner | 2015-03-30 | 1 | -14/+39 |
| | | | | | | | | | | | | | | | | | | timeout when interrupted by a signal, except if the signal handler raises an exception. This change is part of the PEP 475. The asyncore and selectors module doesn't catch the InterruptedError exception anymore when calling select.select(), since this function should not raise InterruptedError anymore. | ||||
* | | Issue #23752: _Py_fstat() is now responsible to raise the Python exception | Victor Stinner | 2015-03-30 | 5 | -29/+24 |
| | | | | | | | | Add _Py_fstat_noraise() function when a Python exception is not welcome. | ||||
* | | Issue #23785: Fixed memory leak in TextIOWrapper.tell() in rare circumstances. | Serhiy Storchaka | 2015-03-30 | 1 | -6/+2 |
|\ \ | |/ | |||||
| * | Issue #23785: Fixed memory leak in TextIOWrapper.tell() in rare circumstances. | Serhiy Storchaka | 2015-03-30 | 1 | -6/+2 |
| | | |||||
* | | Issue #23171: csv.Writer.writerow() now supports arbitrary iterables. | Serhiy Storchaka | 2015-03-30 | 1 | -40/+39 |
| | | |||||
* | | Issue #22117: Remove _PyTime_ROUND_DOWN and _PyTime_ROUND_UP rounding methods | Victor Stinner | 2015-03-30 | 1 | -2/+1 |
| | | | | | | | | Use _PyTime_ROUND_FLOOR and _PyTime_ROUND_CEILING instead. |