| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
bpo-29619: os.stat() and os.DirEntry.inodeo() now convert inode
(st_ino) using unsigned integers.
|
|
|
|
|
| |
to/from UTF-8, instead of the locale encoding to avoid inconsistencies with
os.fsencode() and os.fsdecode() which are already using UTF-8.
|
|
|
|
| |
that do not have the ioctl FIOCLEX and FIONCLEX commands
|
|
|
|
|
| |
Issue #27938: Normalize aliases of the ASCII encoding, because
_Py_normalize_encoding() now correctly normalize encoding names.
|
| |
|
|\ |
|
| |
| |
| |
| | |
Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
Issue #27057: Fix os.set_inheritable() on Android, ioctl() is blocked by
SELinux and fails with EACCESS. The function now falls back to fcntl().
Patch written by Michał Bednarski.
|
| |
| |
| |
| |
| |
| | |
Issue #26770: set_inheritable() avoids calling fcntl() twice if the FD_CLOEXEC
is already set/cleared. This change only impacts platforms using the fcntl()
implementation of set_inheritable() (not Linux nor Windows).
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Issue #10915, #15751, #26558:
* PyGILState_Check() now returns 1 (success) before the creation of the GIL and
after the destruction of the GIL. It allows to use the function early in
Python initialization and late in Python finalization.
* Add a flag to disable PyGILState_Check(). Disable PyGILState_Check() when
Py_NewInterpreter() is called
* Add assert(PyGILState_Check()) to: _Py_dup(), _Py_fstat(), _Py_read()
and _Py_write()
|
| |
|
|
|
|
|
|
|
|
| |
Add "#ifdef WITH_THREAD" around cals to:
* PyGILState_Check()
* _PyImport_AcquireLock()
* _PyImport_ReleaseLock()
|
|
|
|
| |
_set_thread_local_invalid_parameter_handler.
|
| |
|
|
|
|
|
| |
Helper to write() which retries write() if it is interrupted by a signal (fails
with EINTR).
|
|
|
|
| |
Add _Py_fstat_noraise() function when a Python exception is not welcome.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
fstat(), these functions are always required.
Remove HAVE_STAT and HAVE_FSTAT defines, and stop supporting DONT_HAVE_STAT and
DONT_HAVE_FSTAT.
|
|
|
|
|
| |
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".
|
|
|
|
| |
Fix typo: self->fd => fd
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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
|
|\ |
|
| | |
|
| |
| |
| |
| | |
the errno shim.
|
| |
| |
| |
| | |
_set_thread_local_invalid_parameter_handler on every thread.
|
| |
| |
| |
| | |
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.
|
|\ \
| |/ |
|
| |\ |
|
| | |\ |
|
| | | | |
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | |
| | | | |
Illumos. This platform exposes the function ioctl(FIOCLEX), but calling it
fails with errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable()
now falls back to the slower fcntl() (F_GETFD and then F_SETFD).
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This platform exposes the function ioctl(FIOCLEX), but calling it fails with
errno is ENOTTY: "Inappropriate ioctl for device". set_inheritable() now falls
back to the slower fcntl() (F_GETFD and then F_SETFD).
|
| | | |
| | | |
| | | |
| | | |
| | | | |
``_Py_wchar2char()`` to :c:func:`Py_EncodeLocale`, and document these
functions.
|
|/ / /
| | |
| | |
| | |
| | | |
set the blocking mode of a file descriptor (False if the O_NONBLOCK flag is
set, True otherwise). These functions are not available on Windows.
|
|\ \ \
| |/ / |
|
| | | |
|
|\ \ \
| |/ /
| | |
| | | |
PATH_MAX is not declared on IRIX nor Windows.
|
| | |
| | |
| | |
| | | |
PATH_MAX is not declared on IRIX nor Windows.
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
|
| | | |
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding
(which may be ASCII if no locale environment variable is set), to avoid
inconsistencies with os.fsencode() and os.fsdecode() functions which are
already using UTF-8/surrogateescape.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding
(which may be ASCII if no locale environment variable is set), to avoid
inconsistencies with os.fsencode() and os.fsdecode() functions which are
already using UTF-8/surrogateescape.
|