summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
* Issue #23708: Save/restore errno in _Py_read() and _Py_write()Victor Stinner2015-03-201-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() andVictor Stinner2015-03-201-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 Stinner2015-03-201-13/+19
|
* Issue #23646: Enhance precision of time.sleep() and socket timeout whenVictor Stinner2015-03-201-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 WindowsVictor Stinner2015-03-191-1/+1
| | | | Fix typo: self->fd => fd
* Issue #23707: On UNIX, os.urandom() now calls the Python signal handler whenVictor Stinner2015-03-191-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() beforeVictor Stinner2015-03-191-4/+4
| | | | opening /dev/urandom.
* Issue #23708: Add _Py_read() and _Py_write() functions to factorize code handleVictor Stinner2015-03-191-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 Stinner2015-03-191-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 Storchaka2015-03-184-12/+12
|
* Initialize variables to prevent GCC warningsVictor Stinner2015-03-182-3/+5
|
* Fix compiler warning in dtoa.cVictor Stinner2015-03-181-2/+2
|
* Issue #22181: On Linux, os.urandom() now uses the new getrandom() syscall ifVictor Stinner2015-03-181-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 Stinner2015-03-181-2/+6
| | | | Detect also earlier PyMarshal_Read*() errors in zipimport.
* Issue #23694: Handle EINTR in _Py_open() and _Py_fopen_obj()Victor Stinner2015-03-181-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 errorVictor Stinner2015-03-183-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 exceptionsVictor Stinner2015-03-172-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()); inVictor Stinner2015-03-161-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 Dower2015-03-141-6/+6
|\
| * Fixes incorrect use of GetLastError where errno should be used.Steve Dower2015-03-141-6/+6
| |
* | Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet.Serhiy Storchaka2015-03-111-2/+2
|\ \ | |/
| * Issue #23192: Fixed generator lambdas. Patch by Bruno Cauet.Serhiy Storchaka2015-03-111-2/+2
| |
* | Issue #23524: Change back to using Windows errors for _Py_fstat instead of ↵Steve Dower2015-03-081-3/+5
| | | | | | | | the errno shim.
* | Issue #23571: PyObject_Call(), PyCFunction_Call() and call_function() nowVictor Stinner2015-03-061-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 Dower2015-03-062-5/+114
| | | | | | | | _set_thread_local_invalid_parameter_handler on every thread.
* | Issue #23451: Update pyconfig.h for Windows to require Vista headers and ↵Steve Dower2015-03-022-47/+10
| | | | | | | | remove unnecessary version checks.
* | Issue #23152: Renames time_t_to_FILE_TIME to _Py_time_t_to_FILE_TIME, ↵Steve Dower2015-02-211-4/+2
| | | | | | | | removes unused struct win32_stat and return value
* | Issue #23152: Renames attribute_data_to_stat to _Py_attribute_data_to_statSteve Dower2015-02-211-2/+2
| |
* | Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on ↵Steve Dower2015-02-215-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 Storchaka2015-02-171-1/+1
| |
* | Issue #23450: Silenced compiler warnings and added asserts in peephole ↵Serhiy Storchaka2015-02-161-3/+9
| | | | | | | | optimizer.
* | Issue #23450: Fixed possible integer overflows.Serhiy Storchaka2015-02-162-2/+2
| |
* | Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integerSerhiy Storchaka2015-02-161-2/+2
|\ \ | |/ | | | | overflows. Added few missed PyErr_NoMemory().
| * Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integerSerhiy Storchaka2015-02-161-2/+2
| | | | | | | | overflows. Added few missed PyErr_NoMemory().
* | Fixed few compiler warnings.Serhiy Storchaka2015-02-163-5/+5
| |
* | merge 3.4 (#22633)Benjamin Peterson2015-02-141-6/+9
|\ \ | |/
| * avoid reading unallocated memory when argc == 0 (closes #22633)Benjamin Peterson2015-02-141-6/+9
| |
* | Splitted the WFILE structure to WFILE and RFILE.Serhiy Storchaka2015-02-111-6/+11
| |
* | Issue #23344: marshal.dumps() is now 20-25% faster on average.Serhiy Storchaka2015-02-111-21/+62
| |
* | Issue #20416: marshal.dumps() with protocols 3 and 4 is now 40-50% faster onSerhiy Storchaka2015-02-111-40/+55
| | | | | | | | average.
* | Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-14/+22
|\ \ | |/ | | | | and PyObject_AsWriteBuffer().
| * Issue #22896: Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()Serhiy Storchaka2015-02-021-13/+21
| | | | | | | | and PyObject_AsWriteBuffer().
* | merge 3.4 (#21295)Benjamin Peterson2015-02-022-371/+362
|\ \ | |/
| * revert lineno and col_offset changes from #16795 (closes #21295)Benjamin Peterson2015-02-022-3917/+3908
| |
* | Merge 3.4 (generator)Victor Stinner2015-01-311-3/+4
|\ \ | |/
| * Issue #23353: Fix the exception handling of generators in PyEval_EvalFrameEx().Victor Stinner2015-01-311-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 Storchaka2015-01-281-1/+3
|\ \ | |/
| * Fixed memory leak in marshal.Serhiy Storchaka2015-01-281-1/+3
| |
* | Issue #22286: The "backslashreplace" error handlers now works withSerhiy Storchaka2015-01-251-53/+91
| | | | | | | | decoding and translating.
* | Issue #23181: More "codepoint" -> "code point".Serhiy Storchaka2015-01-181-1/+1
|\ \ | |/