| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| | |
close the binary file to fix a resource warning.
|
|\ \
| |/
| |
| |
| |
| | |
Flushing sys.stdout and sys.stderr in Py_FatalError() can call again
Py_FatalError(). Add a reentrant flag to detect this case and just abort at the
second call.
|
| |
| |
| |
| |
| |
| | |
Flushing sys.stdout and sys.stderr in Py_FatalError() can call again
Py_FatalError(). Add a reentrant flag to detect this case and just abort at the
second call.
|
|\ \
| |/
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
current exception because they can run arbitrary Python code and so no
exception must be set.
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| |
| | |
fstat(), these functions are always required.
Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and
DONT_HAVE_FSTAT.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Save and then restore errno because PyErr_CheckSignals() and
PyErr_SetFromErrno() can modify it.
|
| |
| |
| |
| | |
_Py_write() to know which test failed on the buildbot "AMD64 Snow Leop 3.x".
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Fix typo: self->fd => fd
|
| |
| |
| |
| |
| |
| |
| | |
read() is interrupted by a signal.
dev_urandom_python() now calls _Py_read() helper instead of calling directly
read().
|
| |
| |
| |
| | |
opening /dev/urandom.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
and stored in pyconfig.h as the new HAVE_GETRANDOM_SYSCALL define.
Fix os.urandom() tests using file descriptors if os.urandom() uses getrandom().
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
Detect also earlier PyMarshal_Read*() errors in zipimport.
|
| |
| |
| |
| |
| | |
Retry open()/fopen() if it fails with EINTR and the Python signal handler
doesn't raise an exception.
|
| |
| |
| |
| |
| | |
* If fopen() fails, OSError is raised with the original filename object.
* The GIL is now released while calling fopen()
|
| |
| |
| |
| |
| |
| |
| |
| | |
* _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
|
| |
| |
| |
| |
| |
| |
| | |
PyEval_CallObjectWithKeywords()
Sorry Serhiy, I missed your explanation because the review email was moved to
my Spam folder :-(
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
the errno shim.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
_set_thread_local_invalid_parameter_handler on every thread.
|
| |
| |
| |
| | |
remove unnecessary version checks.
|
| |
| |
| |
| | |
removes unused struct win32_stat and return value
|
| | |
|
| |
| |
| |
| |
| |
| | |
Windows.
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
|
| | |
|
| |
| |
| |
| | |
optimizer.
|
| | |
|
|\ \
| |/
| |
| | |
overflows. Added few missed PyErr_NoMemory().
|
| |
| |
| |
| | |
overflows. Added few missed PyErr_NoMemory().
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|