Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #23571: _Py_CheckFunctionResult() now gives the name of the function | Victor Stinner | 2015-03-21 | 1 | -3/+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. | ||||
* | Issue #23708: Save/restore errno in _Py_read() and _Py_write() | Victor Stinner | 2015-03-20 | 1 | -15/+21 |
| | | | | | Save and then restore errno because PyErr_CheckSignals() and PyErr_SetFromErrno() can modify it. | ||||
* | Issue #23708: Split assertion expression in two assertions in _Py_read() and | Victor Stinner | 2015-03-20 | 1 | -2/+4 |
| | | | | _Py_write() to know which test failed on the buildbot "AMD64 Snow Leop 3.x". | ||||
* | Cleanup pytime.c: add XXX_TO_YYY constants (ex: SEC_TO_US) | Victor Stinner | 2015-03-20 | 1 | -13/+19 |
| | |||||
* | Issue #23646: Enhance precision of time.sleep() and socket timeout when | Victor Stinner | 2015-03-20 | 1 | -0/+17 |
| | | | | | | | | 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: Fix _Py_read() compilation error on Windows | Victor Stinner | 2015-03-19 | 1 | -1/+1 |
| | | | | Fix typo: self->fd => fd | ||||
* | Issue #23707: On UNIX, os.urandom() now calls the Python signal handler when | Victor Stinner | 2015-03-19 | 1 | -19/+11 |
| | | | | | | | read() is interrupted by a signal. dev_urandom_python() now calls _Py_read() helper instead of calling directly read(). | ||||
* | Issue #22181: Fix dev_urandom_noraise(), try calling py_getrandom() before | Victor Stinner | 2015-03-19 | 1 | -4/+4 |
| | | | | opening /dev/urandom. | ||||
* | Issue #23708: Add _Py_read() and _Py_write() functions to factorize code handle | Victor Stinner | 2015-03-19 | 1 | -0/+149 |
| | | | | | | | | 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 #22181: The availability of the getrandom() is now checked in configure, | Victor Stinner | 2015-03-19 | 1 | -8/+5 |
| | | | | | | and stored in pyconfig.h as the new HAVE_GETRANDOM_SYSCALL define. Fix os.urandom() tests using file descriptors if os.urandom() uses getrandom(). | ||||
* | Removed unintentional trailing spaces in non-external and non-generated C files. | Serhiy Storchaka | 2015-03-18 | 4 | -12/+12 |
| | |||||
* | Initialize variables to prevent GCC warnings | Victor Stinner | 2015-03-18 | 2 | -3/+5 |
| | |||||
* | Fix compiler warning in dtoa.c | Victor Stinner | 2015-03-18 | 1 | -2/+2 |
| | |||||
* | Issue #22181: On Linux, os.urandom() now uses the new getrandom() syscall if | Victor Stinner | 2015-03-18 | 1 | -6/+84 |
| | | | | | | available, syscall introduced in the Linux kernel 3.17. It is more reliable and more secure, because it avoids the need of a file descriptor and waits until the kernel has enough entropy. | ||||
* | Issue #19428: Handle PyMarshal_Read*() errors in run_pyc_file() | Victor Stinner | 2015-03-18 | 1 | -2/+6 |
| | | | | Detect also earlier PyMarshal_Read*() errors in zipimport. | ||||
* | Issue #23694: Handle EINTR in _Py_open() and _Py_fopen_obj() | Victor Stinner | 2015-03-18 | 1 | -13/+40 |
| | | | | | Retry open()/fopen() if it fails with EINTR and the Python signal handler doesn't raise an exception. | ||||
* | Issue #23694: Enhance _Py_fopen(), it now raises an exception on error | Victor Stinner | 2015-03-18 | 3 | -14/+40 |
| | | | | | * If fopen() fails, OSError is raised with the original filename object. * The GIL is now released while calling fopen() | ||||
* | Issue #23694: Enhance _Py_open(), it now raises exceptions | Victor Stinner | 2015-03-17 | 2 | -24/+58 |
| | | | | | | | | * _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 #23571: Restore removed assert(!PyErr_Occurred()); in | Victor Stinner | 2015-03-16 | 1 | -0/+7 |
| | | | | | | | PyEval_CallObjectWithKeywords() Sorry Serhiy, I missed your explanation because the review email was moved to my Spam folder :-( | ||||
* | Fixes incorrect use of GetLastError where errno should be used. | Steve Dower | 2015-03-14 | 1 | -6/+6 |
|\ | |||||
| * | Fixes incorrect use of GetLastError where errno should be used. | Steve Dower | 2015-03-14 | 1 | -6/+6 |
| | | |||||
* | | Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet. | Serhiy Storchaka | 2015-03-11 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet. | Serhiy Storchaka | 2015-03-11 | 1 | -2/+2 |
| | | |||||
* | | Issue #23524: Change back to using Windows errors for _Py_fstat instead of ↵ | Steve Dower | 2015-03-08 | 1 | -3/+5 |
| | | | | | | | | the errno shim. | ||||
* | | Issue #23571: PyObject_Call(), PyCFunction_Call() and call_function() now | Victor Stinner | 2015-03-06 | 1 | -19/+11 |
| | | | | | | | | | | | | | | | | | | | | | | 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 Dower | 2015-03-06 | 2 | -5/+114 |
| | | | | | | | | _set_thread_local_invalid_parameter_handler on every thread. | ||||
* | | Issue #23451: Update pyconfig.h for Windows to require Vista headers and ↵ | Steve Dower | 2015-03-02 | 2 | -47/+10 |
| | | | | | | | | remove unnecessary version checks. | ||||
* | | Issue #23152: Renames time_t_to_FILE_TIME to _Py_time_t_to_FILE_TIME, ↵ | Steve Dower | 2015-02-21 | 1 | -4/+2 |
| | | | | | | | | removes unused struct win32_stat and return value | ||||
* | | Issue #23152: Renames attribute_data_to_stat to _Py_attribute_data_to_stat | Steve Dower | 2015-02-21 | 1 | -2/+2 |
| | | |||||
* | | Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on ↵ | Steve Dower | 2015-02-21 | 5 | -15/+157 |
| | | | | | | | | | | | | Windows. fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer. | ||||
* | | Issue #22883: Got rid of outdated references to PyInt and PyString in comments. | Serhiy Storchaka | 2015-02-17 | 1 | -1/+1 |
| | | |||||
* | | Issue #23450: Silenced compiler warnings and added asserts in peephole ↵ | Serhiy Storchaka | 2015-02-16 | 1 | -3/+9 |
| | | | | | | | | optimizer. | ||||
* | | Issue #23450: Fixed possible integer overflows. | Serhiy Storchaka | 2015-02-16 | 2 | -2/+2 |
| | | |||||
* | | Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer | Serhiy Storchaka | 2015-02-16 | 1 | -2/+2 |
|\ \ | |/ | | | | | overflows. Added few missed PyErr_NoMemory(). | ||||
| * | Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer | Serhiy Storchaka | 2015-02-16 | 1 | -2/+2 |
| | | | | | | | | overflows. Added few missed PyErr_NoMemory(). | ||||
* | | Fixed few compiler warnings. | Serhiy Storchaka | 2015-02-16 | 3 | -5/+5 |
| | | |||||
* | | merge 3.4 (#22633) | Benjamin Peterson | 2015-02-14 | 1 | -6/+9 |
|\ \ | |/ | |||||
| * | avoid reading unallocated memory when argc == 0 (closes #22633) | Benjamin Peterson | 2015-02-14 | 1 | -6/+9 |
| | | |||||
* | | Splitted the WFILE structure to WFILE and RFILE. | Serhiy Storchaka | 2015-02-11 | 1 | -6/+11 |
| | | |||||
* | | Issue #23344: marshal.dumps() is now 20-25% faster on average. | Serhiy Storchaka | 2015-02-11 | 1 | -21/+62 |
| | | |||||
* | | Issue #20416: marshal.dumps() with protocols 3 and 4 is now 40-50% faster on | Serhiy Storchaka | 2015-02-11 | 1 | -40/+55 |
| | | | | | | | | average. | ||||
* | | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer() | Serhiy Storchaka | 2015-02-02 | 1 | -14/+22 |
|\ \ | |/ | | | | | and PyObject_AsWriteBuffer(). | ||||
| * | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer() | Serhiy Storchaka | 2015-02-02 | 1 | -13/+21 |
| | | | | | | | | and PyObject_AsWriteBuffer(). | ||||
* | | merge 3.4 (#21295) | Benjamin Peterson | 2015-02-02 | 2 | -371/+362 |
|\ \ | |/ | |||||
| * | revert lineno and col_offset changes from #16795 (closes #21295) | Benjamin Peterson | 2015-02-02 | 2 | -3917/+3908 |
| | | |||||
* | | Merge 3.4 (generator) | Victor Stinner | 2015-01-31 | 1 | -3/+4 |
|\ \ | |/ | |||||
| * | Issue #23353: Fix the exception handling of generators in PyEval_EvalFrameEx(). | Victor Stinner | 2015-01-31 | 1 | -3/+4 |
| | | | | | | | | | | | | | | At entry, save or swap the exception state even if PyEval_EvalFrameEx() is called with throwflag=0. At exit, the exception state is now always restored or swapped, not only if why is WHY_YIELD or WHY_RETURN. Patch co-written with Antoine Pitrou. | ||||
* | | Fixed memory leak in marshal. | Serhiy Storchaka | 2015-01-28 | 1 | -1/+3 |
|\ \ | |/ | |||||
| * | Fixed memory leak in marshal. | Serhiy Storchaka | 2015-01-28 | 1 | -1/+3 |
| | | |||||
* | | Issue #22286: The "backslashreplace" error handlers now works with | Serhiy Storchaka | 2015-01-25 | 1 | -53/+91 |
| | | | | | | | | decoding and translating. |