summaryrefslogtreecommitdiffstats
path: root/Modules
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | Merge 3.4 (faulthandler ICC)Victor Stinner2015-03-231-1/+8
|\ \ | |/
| * Issue #23654: Fix faulthandler._stack_overflow() for the Intel C Compiler (ICC)Victor Stinner2015-03-231-1/+8
| | | | | | | | | | | | | | Issue #23654: Turn off ICC's tail call optimization for the stack_overflow generator. ICC turns the recursive tail call into a loop. Patch written by Matt Frank.
* | Issue #21526: Tkinter now supports new boolean type in Tcl 8.5.Serhiy Storchaka2015-03-221-8/+12
| |
* | Issue #23571: _Py_CheckFunctionResult() now gives the name of the functionVictor Stinner2015-03-211-0/+22
| | | | | | | | | | | | | | | | | | | | | | which returned an invalid result (result+error or no result without error) in the exception message. Add also unit test to check that the exception contains the name of the function. Special case: the final _PyEval_EvalFrameEx() check doesn't mention the function since it didn't execute a single function but a whole frame.
* | Minor nit. Make the rotate() success/fail tests consistent.Raymond Hettinger2015-03-211-3/+3
| |
* | For safety, wait to decref deleted values until the deque state has been ↵Raymond Hettinger2015-03-211-4/+4
| | | | | | | | restored.
* | Fix minor formatting nits and remove unnecessary comment.Raymond Hettinger2015-03-211-4/+3
| |
* | Issue 23704: Add index(), copy(), and insert() to deques. Register deques ↵Raymond Hettinger2015-03-211-0/+91
| | | | | | | | as a MutableSequence.
* | Issue 23705: Improve the performance of __contains__ checks for deques.Raymond Hettinger2015-03-201-1/+33
| |
* | Issue #22832: Tweaked parameter names for fcntl module to better matchSerhiy Storchaka2015-03-202-43/+41
| | | | | | | | | | official POSIX documentation. Updated the documenttion for Python 3. Patch by Alex Shkop.
* | Issue #23715: signal.sigwaitinfo() and signal.sigtimedwait() are now retriedVictor Stinner2015-03-201-26/+47
| | | | | | | | | | | | | | | | | | | | when interrupted by a signal not in the *sigset* parameter, if the signal handler does not raise an exception. signal.sigtimedwait() recomputes the timeout with a monotonic clock when it is retried. Remove test_signal.test_sigwaitinfo_interrupted() because sigwaitinfo() doesn't raise InterruptedError anymore if it is interrupted by a signal not in its sigset parameter.
* | Fix compiler warnings: comparison between signed and unsigned numbersVictor Stinner2015-03-201-1/+1
| |
* | Issue #23696: Chain ZipImportError to the OSErrorVictor Stinner2015-03-201-1/+5
| |
* | Issue #23709, #23001: ossaudiodev now uses Py_ssize_t for sizes instead of intVictor Stinner2015-03-201-6/+7
| | | | | | | | | | The module is now also "SSIZE_T clean" (for PyArg_Parse...() functions) since it switched to Py_buffer ("y*" argument format).
* | Issue #23001: Fix typoVictor Stinner2015-03-201-1/+1
| |
* | Issue #23001: Few functions in modules mmap, ossaudiodev, socket, ssl, andSerhiy Storchaka2015-03-205-75/+111
| | | | | | | | | | codecs, that accepted only read-only bytes-like object now accept writable bytes-like object too.
* | Issue #23646: Fix test_threading on WindowsVictor Stinner2015-03-201-1/+1
| |
* | Issue #23646: Enhance precision of time.sleep() and socket timeout whenVictor Stinner2015-03-202-3/+3
| | | | | | | | | | | | | | | | 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.
* | Issue #23709: The ossaudiodev module now retries read/write when interrupted byVictor Stinner2015-03-191-28/+22
| | | | | | | | | | | | a signal (PEP 475). Use he new _Py_read() and _Py_write() functions.
* | Issue #23708: select.devpoll now retries its internal write() when interruptedVictor Stinner2015-03-191-7/+3
| | | | | | | | | | | | by a signal (EINTR). Modify devpoll_flush() to use _Py_write() instead of calling directly write().
* | Issue #23708: Add _Py_read() and _Py_write() functions to factorize code handleVictor Stinner2015-03-192-152/+36
| | | | | | | | | | | | | | | | EINTR error and special cases for Windows. These functions now truncate the length to PY_SSIZE_T_MAX to have a portable and reliable behaviour. For example, read() result is undefined if counter is greater than PY_SSIZE_T_MAX on Linux.
* | Issue #23646: If time.sleep() is interrupted by a signal, the sleep is nowVictor Stinner2015-03-191-51/+56
| | | | | | | | | | | | | | retried with the recomputed delay, except if the signal handler raises an exception (PEP 475). Modify also test_signal to use a monotonic clock instead of the system clock.
* | Removed unintentional trailing spaces in non-external and non-generated C files.Serhiy Storchaka2015-03-189-25/+25
| |