| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Being able to read non-python text files is not a purpose of linecache, but it
does work and people use it. This changeset adjusts the language to make it
clear that Python files are not treated uniquely, but does not go so far as to
say reading non-python files is explicitly supported.
|
| | |
|
| | |
|
|\ \
| |/
| |
| | |
Indexing bytes retiurns an integer, not bytes.
|
| |
| |
| |
| | |
Indexing bytes retiurns an integer, not bytes.
|
|\ \
| |/
| |
| |
| |
| | |
some circunstances while NamedTemporaryFile object was living. This causes
failing test_csv. Changed the implementation of NamedTemporaryFile.__iter__
to make tests passed.
|
| |
| |
| |
| |
| |
| | |
some circunstances while NamedTemporaryFile object was living. This causes
failing test_csv. Changed the implementation of NamedTemporaryFile.__iter__
to make tests passed.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
None on Windows.
When the file is not readable, the error occurs at open on UNIX. On Windows,
the error only occurs at the first operation on the open file. It would require
to many changes to set __context__ to an OSError for all file operations, for a
little benefit (__context__ is almost never used).
|
| |
| |
| |
| | |
signal.sigtimedwait() if functions are missing
|
| |
| |
| |
| | |
If Python failed, show also stdout in the assertion error.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
when interrupted by a signal not in the *sigset* parameter, if the signal
handler does not raise an exception. signal.sigtimedwait() recomputes the
timeout with a monotonic clock when it is retried.
Remove test_signal.test_sigwaitinfo_interrupted() because sigwaitinfo() doesn't
raise InterruptedError anymore if it is interrupted by a signal not in its
sigset parameter.
|
| |
| |
| |
| |
| | |
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".
|
| | |
|
| |
| |
| |
| |
| | |
The module is now also "SSIZE_T clean" (for PyArg_Parse...() functions) since
it switched to Py_buffer ("y*" argument format).
|
| | |
|
| |
| |
| |
| |
| | |
compatible with regular files (in particular it now supports the context
management protocol).
|
| |
| |
| |
| |
| | |
codecs, that accepted only read-only bytes-like object now accept writable
bytes-like object too.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
a signal (PEP 475).
Use he new _Py_read() and _Py_write() functions.
|
|\ \
| |/ |
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | | |
Fix typo: self->fd => fd
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
read() is interrupted by a signal.
dev_urandom_python() now calls _Py_read() helper instead of calling directly
read().
|
| | |
| | |
| | |
| | |
| | |
| | | |
by a signal (EINTR).
Modify devpoll_flush() to use _Py_write() instead of calling directly write().
|
| | |
| | |
| | |
| | | |
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.
|
|/ /
| |
| |
| | |
multi-dimensional memoryviews).
|
| |
| |
| |
| |
| |
| | |
and stored in pyconfig.h as the new HAVE_GETRANDOM_SYSCALL define.
Fix os.urandom() tests using file descriptors if os.urandom() uses getrandom().
|
| |
| |
| |
| |
| |
| |
| | |
retried with the recomputed delay, except if the signal handler raises an
exception (PEP 475).
Modify also test_signal to use a monotonic clock instead of the system clock.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/
| |
| | |
Jan 30 of previous year. Based on patch by Jim Carroll.
|
| |
| |
| |
| | |
Jan 30 of previous year. Based on patch by Jim Carroll.
|
|\ \
| |/
| |
| | |
NamedTemporaryFile instance. Patch by Bohuslav Kabrda.
|
| |
| |
| |
| | |
NamedTemporaryFile instance. Patch by Bohuslav Kabrda.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
add private method to enum to support replacing global constants with Enum members:
- search for candidate constants via supplied filter
- create new enum class and members
- insert enum class and replace constants with members via supplied module name
- replace __reduce_ex__ with function that returns member name, so previous Python versions can unpickle
modify IntEnum classes to use new method
|
|\ \
| |/
| |
| | |
importing a test module is now picklable.
|
| |
| |
| |
| | |
importing a test module is now picklable.
|
|\ \
| |/ |
|