summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | Issue #22117: Replace usage of _PyTime_ROUND_UP with _PyTime_ROUND_CEILINGVictor Stinner2015-03-306-18/+22
| | | | | | | | | | All these functions only accept positive timeouts, so this change has no effect in practice.
* | Issue #22117: Add _PyTime_ROUND_CEILING rounding method for timestampsVictor Stinner2015-03-301-1/+1
| | | | | | | | Add also more tests for ROUNd_FLOOR.
* | Issue #23752: When built from an existing file descriptor, io.FileIO() now onlyVictor Stinner2015-03-301-24/+0
| | | | | | | | calls fstat() once. Before fstat() was called twice, which was not necessary.
* | Issue #22117: Fix usage of _PyTime_AsTimeval()Victor Stinner2015-03-304-17/+5
| | | | | | | | | | Add _PyTime_AsTimeval_noraise() function. Call it when it's not possible (or not useful) to raise a Python exception on overflow.
* | Issue #23694: Fix usage of _Py_open() in the _posixsubprocess moduleVictor Stinner2015-03-301-2/+1
| | | | | | | | | | | | | | Don't call _Py_open() from _close_open_fds_safe() because it is call just after fork(). It's not good to play with locks (the GIL) between fork() and exec(). Use instead _Py_open_noraise() which doesn't touch to the GIL.
* | Issue #22117: Fix rounding of fromtimestamp() methods of datetime.datetime andVictor Stinner2015-03-291-2/+3
| | | | | | | | | | datetime.time: round towards minus infinity ("floor") instead of rounding towards zero ("down").
* | Issue #22117: Fix os.utime(), it now rounds the timestamp towards minusVictor Stinner2015-03-291-2/+2
| | | | | | | | | | | | infinity (-inf) instead of rounding towards zero. Replace _PyTime_ROUND_DOWN with _PyTime_ROUND_FLOOR.
* | Issue #22117: Use the _PyTime_t API in _datetime.datetime() constructorVictor Stinner2015-03-292-5/+15
| | | | | | | | | | * Remove _PyTime_gettimeofday() * Add _PyTime_GetSystemClock()
* | Issue #14260: The groupindex attribute of regular expression pattern objectSerhiy Storchaka2015-03-291-1/+14
| | | | | | | | now is non-modifiable mapping.
* | Removed unintentional trailing spaces in text files.Serhiy Storchaka2015-03-291-1/+1
| |
* | Issue #22117: Add the new _PyTime_ROUND_FLOOR rounding method for the datetimeVictor Stinner2015-03-282-3/+4
| | | | | | | | | | module. time.clock_settime() now uses this rounding method instead of _PyTime_ROUND_DOWN to handle correctly dates before 1970.
* | Issue #22117: Use the _PyTime_t API for time.clock_settime()Victor Stinner2015-03-281-5/+5
| | | | | | | | Remove also the now unused _PyTime_AddDouble() function.
* | Issue #22117: Use the new _PyTime_t API in the select moduleVictor Stinner2015-03-281-39/+20
| |
* | Issue #22117: The thread module uses the new _PyTime_t timestamp APIVictor Stinner2015-03-281-75/+64
| | | | | | | | | | | | | | | | | | Add also a new _PyTime_AsMicroseconds() function. threading.TIMEOUT_MAX is now be smaller: only 292 years instead of 292,271 years on 64-bit system for example. Sorry, your threads will hang a *little bit* shorter. Call me if you want to ensure that your locks wait longer, I can share some tricks with you.
* | Issue #22117: Fix ssl to use _PyTime_t API on sock_timeoutVictor Stinner2015-03-281-11/+14
| | | | | | | | I didn't notice that the ssl module uses private attributes of socket objects.
* | Issue #22117: The socket module uses _PyTime_t timestamp for timeoutsVictor Stinner2015-03-282-91/+124
| |
* | Issue #22117: Write unit tests for _PyTime_AsTimeval()Victor Stinner2015-03-282-1/+35
| | | | | | | | | | | | | | * _PyTime_AsTimeval() now ensures that tv_usec is always positive * _PyTime_AsTimespec() now ensures that tv_nsec is always positive * _PyTime_AsTimeval() now returns an integer on overflow instead of raising an exception
* | Issue #23618, #22117: refactor socketmodule.cVictor Stinner2015-03-271-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.
* | Issue #22117: The signal modules uses the new _PyTime_t APIVictor Stinner2015-03-272-14/+33
| | | | | | | | | | * Add _PyTime_AsTimespec() * Add unit tests for _PyTime_AsTimespec()
* | Issue #22117: The gc module now uses _PyTime_t timestampVictor Stinner2015-03-271-6/+6
| |
* | Issue #22117: time.time() now uses the new _PyTime_t APIVictor Stinner2015-03-271-3/+5
| | | | | | | | * Add _PyTime_GetSystemClockWithInfo()
* | Issue #22117: time.monotonic() now uses the new _PyTime_t APIVictor Stinner2015-03-272-4/+21
| | | | | | | | | | | | * Add _PyTime_FromNanoseconds() * Add _PyTime_AsSecondsDouble() * Add unit tests for _PyTime_AsSecondsDouble()
* | Issue #22117: Fix rounding in _PyTime_FromSecondsObject()Victor Stinner2015-03-272-1/+18
| | | | | | | | | | | | * Rename _PyTime_FromObject() to _PyTime_FromSecondsObject() * Add _PyTime_AsNanosecondsObject() and _testcapi.pytime_fromsecondsobject() * Add unit tests
* | Issue #22117: Add a new Python timestamp format _PyTime_t to pytime.hVictor Stinner2015-03-271-21/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In practice, _PyTime_t is a number of nanoseconds. Its C type is a 64-bit signed number. It's integer value is in the range [-2^63; 2^63-1]. In seconds, the range is around [-292 years; +292 years]. In term of Epoch timestamp (1970-01-01), it can store a date between 1677-09-21 and 2262-04-11. The API has a resolution of 1 nanosecond and use integer number. With a resolution on 1 nanosecond, 64-bit IEEE 754 floating point numbers loose precision after 194 days. It's not the case with this API. The drawback is overflow for values outside [-2^63; 2^63-1], but these values are unlikely for most Python modules, except of the datetime module. New functions: - _PyTime_GetMonotonicClock() - _PyTime_FromObject() - _PyTime_AsMilliseconds() - _PyTime_AsTimeval() This change uses these new functions in time.sleep() to avoid rounding issues. The new API will be extended step by step, and the old API will be removed step by step. Currently, some code is duplicated just to be able to move incrementally, instead of pushing a large change at once.
* | Issue #22364: Improved some re error messages using regex for hints.Serhiy Storchaka2015-03-251-3/+3
| |
* | Closes #9445: Removes detection of GetFinalPathNameByHandleSteve Dower2015-03-211-50/+6
| |
* | Issue #23765: Remove IsBadStringPtr calls in ctypesSteve Dower2015-03-251-20/+4
| | | | | | | | Also renames a local to avoid warnings about shadowing
* | Fix typoRaymond Hettinger2015-03-251-1/+1
| |
* | Minor code and comment cleanups.Raymond Hettinger2015-03-251-21/+18
| |
* | Issue #21802: The reader in BufferedRWPair now is closed even when closingSerhiy Storchaka2015-03-241-4/+10
|\ \ | |/ | | | | writer failed in BufferedRWPair.close().
| * Issue #21802: The reader in BufferedRWPair now is closed even when closingSerhiy Storchaka2015-03-241-4/+10
| | | | | | | | writer failed in BufferedRWPair.close().
* | Issue #23753: Move _Py_wstat() from Python/fileutils.c to Modules/getpath.cVictor Stinner2015-03-241-0/+17
| | | | | | | | | | | | | | I expected more users of _Py_wstat(), but in practice it's only used by Modules/getpath.c. Move the function because it's not needed on Windows. Windows uses PC/getpathp.c which uses the Win32 API (ex: GetFileAttributesW()) not the POSIX API.
* | Issue #23753: Python doesn't support anymore platforms without stat() orVictor Stinner2015-03-242-24/+0
| | | | | | | | | | | | | | fstat(), these functions are always required. Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and DONT_HAVE_FSTAT.
* | Improve and fix-up comments.Raymond Hettinger2015-03-241-25/+46
| |
* | Issue 23744: Minor speed-up for deque.__bool__().Raymond Hettinger2015-03-241-1/+24
| |