summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* Issue #23834: Simplify timeout handlingVictor Stinner2015-04-031-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() functionVictor Stinner2015-04-032-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 andSerhiy Storchaka2015-04-021-16/+193
|\ | | | | | | arbitrary precision integers added in Tcl 8.5.
| * Issue #16840: Tkinter now supports 64-bit integers added in Tcl 8.4 andSerhiy Storchaka2015-04-021-16/+206
| | | | | | | | arbitrary precision integers added in Tcl 8.5.
| * Issue #23834: Fix socket.sendto(), use the C Py_ssize_t type to store theVictor Stinner2015-04-021-1/+2
| | | | | | | | result of sendto() instead of the C int type.
* | Merge 3.4 (_posixsubprocess)Victor Stinner2015-04-021-6/+6
|\ \ | |/
| * Issue #23851: close() must not be retried when it fails with EINTRVictor Stinner2015-04-021-6/+6
| | | | | | | | See the PEP 475 for the rationale.
* | Issue #23618: Ooops, remove abort() added for debug purposeVictor Stinner2015-04-021-1/+0
| |
* | Issue #23618: Fix sock_connect_impl(), set the socket error codeVictor Stinner2015-04-021-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 completesVictor Stinner2015-04-021-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 WindowsVictor Stinner2015-04-021-7/+6
| |
* | Issue #21526: Fixed support of new boolean type in Tcl 8.5.Serhiy Storchaka2015-04-021-4/+19
|\ \ | |/
| * Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.Serhiy Storchaka2015-04-021-15/+34
| |
* | Issue #23834: Fix sock_call(), set deadline_initialized to recompute the timeoutVictor Stinner2015-04-021-0/+1
| |
* | Issue #23834: Modify socket.sendall() to reuse sock_call() withVictor Stinner2015-04-011-29/+21
| | | | | | | | sock_send_impl()
* | Issue #23834: Add sock_call() helper functionVictor Stinner2015-04-011-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 callsVictor Stinner2015-04-011-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() ofVictor Stinner2015-04-011-9/+10
| | | | | | | | _posixsubprocess
* | Issue #23836: Use _Py_write_noraise() to retry on EINTR in trip_signal() ofVictor Stinner2015-04-011-3/+4
| | | | | | | | signalmodule.c
* | merge 3.4Benjamin Peterson2015-04-011-1/+2
|\ \ | |/
| * remove assignment in conditionalBenjamin Peterson2015-04-011-1/+2
| |
* | Issue #22117, issue #23485: Fix _PyTime_AsMilliseconds() andVictor Stinner2015-04-011-0/+38
| | | | | | | | | | | | _PyTime_AsMicroseconds() rounding. Add also unit tests.
* | Issue #23618: Fix EINTR handling on WindowsVictor Stinner2015-04-011-2/+2
| | | | | | | | Windows uses WSAEINTR error code, not EINTR, for socket functions.
* | Issue #23618: Enhance EINTR handling in socket.connect()Victor Stinner2015-03-311-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 Stinner2015-03-311-10/+8
| | | | | | | | | | Call PyErr_CheckSignals() if connect(), select() or getsockopt() failed with EINTR.
* | Issue #23618: Cleanup internal_connect() in socketmodule.cVictor Stinner2015-03-311-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 Hettinger2015-03-311-10/+123
| |
* | Issue #23618: Refactor internal_connect()Victor Stinner2015-03-311-79/+30
| | | | | | | | | | On Windows, internal_connect() now reuses internal_connect_select() and always calls getsockopt().
* | Issue #23618: Refactor internal_connect()Victor Stinner2015-03-311-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 WindowsVictor Stinner2015-03-311-3/+6
| |
* | Issue #23618: Fix internal_connect_select()Victor Stinner2015-03-311-1/+1
| |
* | Issue #23618: internal_connect_select() now waits also for error eventsVictor Stinner2015-03-311-6/+15
| |
* | Issue #23618: Refactor internal_select() to prepare socket.connect() for EINTRVictor Stinner2015-03-311-13/+23
| |
* | Issue #23618: Refactor the _socket moduleVictor Stinner2015-03-311-17/+11
| | | | | | | | | | * Inline internal_select() function * Rename internal_select_ex() internal_select()
* | Issue #23611: Serializing more "lookupable" objects (such as unbound methodsSerhiy Storchaka2015-03-311-47/+71
| | | | | | | | or nested classes) now are supported with pickle protocols < 4.
* | Issue #13583: sqlite3.Row now supports slice indexing.Serhiy Storchaka2015-03-311-2/+1
| | | | | | | | Tests by Jessica McKellar.
* | Merge headsSerhiy Storchaka2015-03-311-54/+97
|\ \
| * | Issue #23485: select.devpoll.poll() is now retried when interrupted by a signalVictor Stinner2015-03-311-43/+63
| | |
| * | Issue #23485: select.kqueue.control() is now retried when interrupted by a ↵Victor Stinner2015-03-311-11/+34
| | | | | | | | | | | | signal
* | | Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.Serhiy Storchaka2015-03-311-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 Storchaka2015-03-311-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 signalVictor Stinner2015-03-301-18/+51
| |
* | Issue #23485: select.poll.poll() is now retried when interrupted by a signalVictor Stinner2015-03-301-50/+83
| |
* | PEP 475: on EINTR, retry the function even if the timeout is equals to zeroVictor Stinner2015-03-303-3/+3
| | | | | | | | | | | | | | | | | | Retry: * signal.sigtimedwait() * threading.Lock.acquire() * threading.RLock.acquire() * time.sleep()
* | Issue #23485: select.select() is now retried automatically with the recomputedVictor Stinner2015-03-301-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 exceptionVictor Stinner2015-03-305-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 Storchaka2015-03-301-6/+2
|\ \ | |/
| * Issue #23785: Fixed memory leak in TextIOWrapper.tell() in rare circumstances.Serhiy Storchaka2015-03-301-6/+2
| |
* | Issue #23171: csv.Writer.writerow() now supports arbitrary iterables.Serhiy Storchaka2015-03-301-40/+39
| |
* | Issue #22117: Remove _PyTime_ROUND_DOWN and _PyTime_ROUND_UP rounding methodsVictor Stinner2015-03-301-2/+1
| | | | | | | | Use _PyTime_ROUND_FLOOR and _PyTime_ROUND_CEILING instead.