Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | (Merge 3.4) Issue #23571: Py_FatalError() now tries to flush sys.stdout and | Victor Stinner | 2015-03-24 | 1 | -4/+26 |
|\ | | | | | | | | | | | | | sys.stderr It should help to see exceptions when stderr if buffered: PyErr_Display() calls sys.stderr.write(), it doesn't write into stderr file descriptor directly. | ||||
| * | Issue #23571: Py_FatalError() now tries to flush sys.stdout and sys.stderr | Victor Stinner | 2015-03-24 | 1 | -4/+26 |
| | | | | | | | | | | It should help to see exceptions when stderr if buffered: PyErr_Display() calls sys.stderr.write(), it doesn't write into stderr file descriptor directly. | ||||
* | | Issue #23571: PyErr_FormatV() and PyErr_SetObject() now always clear the | Victor Stinner | 2015-03-24 | 1 | -8/+7 |
| | | | | | | | | | | current exception because they can run arbitrary Python code and so no exception must be set. | ||||
* | | Issue #23753: Move _Py_wstat() from Python/fileutils.c to Modules/getpath.c | Victor Stinner | 2015-03-24 | 1 | -17/+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. | ||||
* | | (Merge 3.4) Issue #23571: Enhance Py_FatalError() | Victor Stinner | 2015-03-24 | 1 | -13/+59 |
|\ \ | |/ | | | | | | | | | | | | | | | * Display the current Python stack if an exception was raised but the exception has no traceback * Disable faulthandler if an exception was raised (before it was only disabled if no exception was raised) * To display the current Python stack, call PyGILState_GetThisThreadState() which works even if the GIL was released | ||||
| * | Issue #23571: Enhance Py_FatalError() | Victor Stinner | 2015-03-24 | 1 | -13/+60 |
| | | | | | | | | | | | | | | | | | | * Display the current Python stack if an exception was raised but the exception has no traceback * Disable faulthandler if an exception was raised (before it was only disabled if no exception was raised) * To display the current Python stack, call PyGILState_GetThisThreadState() which works even if the GIL was released | ||||
* | | Issue #23753: Python doesn't support anymore platforms without stat() or | Victor Stinner | 2015-03-24 | 2 | -20/+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 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-18 | 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-07 | 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-03 | 1 | -14/+22 |
|\ \ | |/ | | | | | and PyObject_AsWriteBuffer(). | ||||
| * | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer() | Serhiy Storchaka | 2015-02-03 | 1 | -13/+21 |
| | | | | | | | | and PyObject_AsWriteBuffer(). |