| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Patch written by Vajrasky Kok.
|
| | |
| | |
| | |
| | |
| | | |
are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
|
| | |
| | |
| | |
| | | |
_Py_char2wchar()
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Replace malloc() with PyMem_RawMalloc()
* Replace PyMem_Malloc() with PyMem_RawMalloc() where the GIL is not held.
* _Py_char2wchar() now returns a buffer allocated by PyMem_RawMalloc(), instead
of PyMem_Malloc()
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
HAVE_MBRTOWC is not defined
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ / |
|
| | | |
|
|/ /
| |
| |
| | |
Patch written by Serhiy Storchaka.
|
| |
| |
| |
| | |
the os module.
|
| |
| |
| |
| | |
SSLContext.load_dh_params() method and the ssl.OP_SINGLE_DH_USE option.
|
| | |
|
| |
| |
| |
| | |
_Py_stat() now returns -2 if an exception was raised.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* PyUnicode_DecodeLocaleAndSize() and PyUnicode_DecodeLocale() decode a string
from the current locale encoding
* _Py_char2wchar() writes an "error code" in the size argument to indicate
if the function failed because of memory allocation failure or because of a
decoding error. The function doesn't write the error message directly to
stderr.
* Fix time.strftime() (if wcsftime() is missing): decode strftime() result
from the current locale encoding, not from the filesystem encoding.
|
|/ |
|
|
|
|
| |
Explain in the documentation that conversion errors should never happen.
|
|
|
|
|
|
| |
* Add error_pos optional argument to _Py_wchar2char()
* PyUnicode_EncodeFS() raises a UnicodeEncodeError or MemoryError if
_Py_wchar2char() fails
|
|
|
|
|
|
| |
_Py_char2wchar() callers usually need the result size in characters. Since it's
trivial to compute it in _Py_char2wchar() (O(1) whereas wcslen() is O(n)), add
an option to get it.
|
|
|
|
| |
surrogate characters.
|
| |
|
|
|
|
| |
surrogate characters.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
On Windows, Py_UNICODE is wchar_t, so we can avoid the expensive Py_UNICODE*
=> wchar_t* conversion.
|
|
|
|
|
|
| |
* Don't define _Py_wstat() on Windows, Windows has its own _wstat() function
with a different API (the stat buffer has another type)
* Include windows.h
|
|
|
|
|
| |
I suppose that I reapplied my local patch creating Python/fileutils.c whereas
the file already existed.
|
|
* _Py_fopen() and _Py_stat() come from Python/import.c
* (_Py)_wrealpath() comes from Python/sysmodule.c
* _Py_char2wchar(), _Py_wchar2char() and _Py_wfopen() come from Modules/main.c
* (_Py)_wstat(), (_Py)_wgetcwd(), _Py_wreadlink() come from Modules/getpath.c
|