summaryrefslogtreecommitdiffstats
path: root/Include
Commit message (Collapse)AuthorAgeFilesLines
* Issue #23524: Replace _PyVerify_fd function with calls to ↵Steve Dower2015-04-122-1/+21
| | | | _set_thread_local_invalid_parameter_handler.
* Issue #23834: Fix the default socket timeoutVictor Stinner2015-04-091-1/+6
| | | | Use -1 second by default, not -1 nanosecond.
* Removed trailing whitespaces in miscalenous files.Serhiy Storchaka2015-04-031-2/+2
|
* Issue #22117: Add a new _PyTime_FromSeconds() functionVictor Stinner2015-04-031-1/+4
| | | | | Fix also _Py_InitializeEx_Private(): initialize time before initializing import, import_init() uses the _PyTime API (for thread locks).
* Issue #23836: Add _Py_write_noraise() functionVictor Stinner2015-04-011-0/+5
| | | | | Helper to write() which retries write() if it is interrupted by a signal (fails with EINTR).
* Issue #23485: Add _PyTime_FromMillisecondsObject() functionVictor Stinner2015-03-301-1/+7
|
* Fix PY_VERSION in Include/patchlevel.h to reflect our post-3.5.0a3 state.Larry Hastings2015-03-301-1/+1
|
* Merge 3.5.0a3 release engineering changes back into trunk.Larry Hastings2015-03-302-56/+56
|\
| * Issue #23752: _Py_fstat() is now responsible to raise the Python exceptionVictor Stinner2015-03-301-2/+6
| | | | | | | | Add _Py_fstat_noraise() function when a Python exception is not welcome.
| * Issue #22117: Remove _PyTime_ROUND_DOWN and _PyTime_ROUND_UP rounding methodsVictor Stinner2015-03-301-6/+1
| | | | | | | | Use _PyTime_ROUND_FLOOR and _PyTime_ROUND_CEILING instead.
| * Issue #22117: Add _PyTime_ROUND_CEILING rounding method for timestampsVictor Stinner2015-03-301-1/+4
| | | | | | | | Add also more tests for ROUNd_FLOOR.
| * Issue #22117: Fix usage of _PyTime_AsTimeval()Victor Stinner2015-03-301-1/+7
| | | | | | | | | | Add _PyTime_AsTimeval_noraise() function. Call it when it's not possible (or not useful) to raise a Python exception on overflow.
| * Issue #22117: Cleanup pytime.c/.hVictor Stinner2015-03-291-37/+37
| |
| * Issue #22117: Use the _PyTime_t API in _datetime.datetime() constructorVictor Stinner2015-03-291-14/+6
| | | | | | | | | | * Remove _PyTime_gettimeofday() * Add _PyTime_GetSystemClock()
* | Release bump for Python 3.5.0a3.v3.5.0a3Larry Hastings2015-03-291-2/+2
|/
* Issue #22117: Add the new _PyTime_ROUND_FLOOR rounding method for the datetimeVictor Stinner2015-03-281-2/+9
| | | | | 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/+0
| | | | Remove also the now unused _PyTime_AddDouble() function.
* Issue #22117: Use the new _PyTime_t API in the select moduleVictor Stinner2015-03-281-1/+1
|
* Issue #22117: The thread module uses the new _PyTime_t timestamp APIVictor Stinner2015-03-281-18/+6
| | | | | | | | | 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: remove _PyTime_INTERVAL() macroVictor Stinner2015-03-281-10/+0
|
* Issue #22117: Write unit tests for _PyTime_AsTimeval()Victor Stinner2015-03-281-1/+3
| | | | | | | * _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 #22117: The signal modules uses the new _PyTime_t APIVictor Stinner2015-03-271-0/+6
| | | | | * Add _PyTime_AsTimespec() * Add unit tests for _PyTime_AsTimespec()
* Issue #22117: time.time() now uses the new _PyTime_t APIVictor Stinner2015-03-271-0/+8
| | | | * Add _PyTime_GetSystemClockWithInfo()
* Issue #22117: time.monotonic() now uses the new _PyTime_t APIVictor Stinner2015-03-271-1/+20
| | | | | | * Add _PyTime_FromNanoseconds() * Add _PyTime_AsSecondsDouble() * Add unit tests for _PyTime_AsSecondsDouble()
* Issue #22117: Fix rounding in _PyTime_FromSecondsObject()Victor Stinner2015-03-271-3/+6
| | | | | | * 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-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 #23753: Move _Py_wstat() from Python/fileutils.c to Modules/getpath.cVictor Stinner2015-03-241-4/+0
| | | | | | | 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-28/+0
| | | | | | | fstat(), these functions are always required. Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and DONT_HAVE_FSTAT.
* Issue #23571: _Py_CheckFunctionResult() now gives the name of the functionVictor Stinner2015-03-211-2/+3
| | | | | | | | | | | 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.
* Removed trailing tabs.Serhiy Storchaka2015-03-212-2/+2
|
* Issue #23646: Enhance precision of time.sleep() and socket timeout whenVictor Stinner2015-03-201-7/+5
| | | | | | | | 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 #23708: Add _Py_read() and _Py_write() functions to factorize code handleVictor Stinner2015-03-191-0/+10
| | | | | | | | 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.
* Removed unintentional trailing spaces in non-external and non-generated C files.Serhiy Storchaka2015-03-183-5/+5
|
* Issue #23694: Enhance _Py_open(), it now raises exceptionsVictor Stinner2015-03-171-0/+4
| | | | | | | | * _Py_open() now raises exceptions on error. If open() fails, it raises an OSError with the filename. * _Py_open() now releases the GIL while calling open() * Add _Py_open_noraise() when _Py_open() cannot be used because the GIL is not held
* Issue #23644: Fix issues with C++ when compiling Python extensionsVictor Stinner2015-03-172-12/+10
| | | | | | | | Disable completly pyatomic.h on C++, because <stdatomic.h> is not compatible with C++. <pyatomic.h> is only needed by the optimized PyThreadState_GET() macro in pystate.h. Instead, declare PyThreadState_GET() as an alias to PyThreadState_Get(), as done for limited API.
* Issue #23644, #22038: Move #include <stdatomic.c> inside the extern "C" { ... }Victor Stinner2015-03-121-4/+4
| | | | block in pyatomic.h
* Post-release changes for 3.5.0a2.Larry Hastings2015-03-091-1/+1
|
* Release bump for 3.5.0a2.v3.5.0a2Larry Hastings2015-03-081-2/+2
|
* Issue #23571: PyObject_Call(), PyCFunction_Call() and call_function() nowVictor Stinner2015-03-061-0/+5
| | | | | | | | | | | raise a SystemError if a function returns a result and raises an exception. The SystemError is chained to the previous exception. Refactor also PyObject_Call() and PyCFunction_Call() to make them more readable. Remove some checks which became useless (duplicate checks). Change reviewed by Serhiy Storchaka.
* Issue #23524: Replace _PyVerify_fd function with calling ↵Steve Dower2015-03-062-11/+12
| | | | _set_thread_local_invalid_parameter_handler on every thread.
* Issue #23152: Move declarations back to posixmodule.c.Serhiy Storchaka2015-02-221-4/+0
| | | | | | | Declarations of Windows-specific auxilary functions need Windows types from windows.h. Instead of including windows.h in Python.h and making it available to all Windows users, it is simpler and safer just move declarations to the single file that needs them.
* Issue #23152: Move declaration into a header and exclude from stable API.Serhiy Storchaka2015-02-221-0/+6
|
* Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on ↵Steve Dower2015-02-211-1/+30
| | | | | | Windows. fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
* Merge 3.4 (typo)Victor Stinner2015-02-111-1/+1
|\
| * Fix typo: PyMem_Alloc => PyMem_MallocVictor Stinner2015-02-111-1/+1
| |
| * Post-release updates for Python 3.4.3rc1.Larry Hastings2015-02-081-1/+1
| |
| * Version bump for 3.4.3rc1.Larry Hastings2015-02-081-4/+4
| |
* | Post-release updates for Python 3.5.0a1.Larry Hastings2015-02-081-1/+1
| |
* | Release bump for 3.5.0a1.Larry Hastings2015-02-081-2/+2
| |
* | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-1/+1
|\ \ | |/ | | | | and PyObject_AsWriteBuffer().