With the ANSI code page 932, os.listdir(b'\xe7') return an empty list (instead
of failing), whereas os.listdir(b'\xff') raises a FileNotFoundError.
It looks like a Windows bug: b'\xe7' directory does not exist,
FindFirstFileA(b'\xe7') fails with ERROR_FILE_NOT_FOUND (2), instead of
ERROR_PATH_NOT_FOUND (3).
And other fixes for Windows:
* rename, replace and link require arguments of the same type on Windows
* readlink only supports unicode filenames on Windows
* os.open() specifies the filename on OSError
Pass the original filename argument to OSError constructor, instead of trying
to encode it to or decode it from the filesystem encoding. This change avoids
an additionnal UnicodeDecodeError on Windows if the filename cannot be decoded
from the filesystem encoding (ANSI code page).
parameter from os.remove / os.unlink.
Patch written by Georg Brandl. (I'm really looking forward to George
getting commit privileges so I don't have to keep doing checkins on his
behalf.)
Many functions now support "dir_fd" and "follow_symlinks" parameters;
some also support accepting an open file descriptor in place of of a path
string. Added os.support_* collections as LBYL helpers. Removed many
functions only previously seen in 3.3 alpha releases (often starting with
"f" or "l", or ending with "at"). Originally suggested by Serhiy Storchaka;
implemented by Larry Hastings.
when the path existed and had the S_ISGID mode bit set when it was
not explicitly asked for. This is no longer an exception as mkdir
cannot control if the OS sets that bit for it or not.
when the path existed and had the S_ISGID mode bit set when it was not
explicitly asked for. This is no longer an exception as mkdir cannot control
if the OS sets that bit for it or not.
Removed futimens as it is now redundant.
Changed shutil.copystat to use st_atime_ns and st_mtime_ns from os.stat
and ns= parameter to utime--it once again preserves exact metadata on Linux!
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
in order to make algorithmic complexity attacks on (e.g.) web apps much more complicated.
The environment variable PYTHONHASHSEED and the new command line flag -R control this
behavior.
TemporaryFileTests has tests for os.tempnam() and os.tmpfile(), functions
removed from Python 3.
Move fdopen() tests to the FileTests testcase to test fdopen() on a file
descriptor, not on a directory descriptor (which raises an error on Windows).
TemporaryFileTests has tests for os.tempnam() and os.tmpfile(), functions
removed from Python 3.
Move fdopen() tests to the FileTests testcase to test fdopen() on a file
descriptor, not on a directory descriptor (which raises an error on Windows).
We don't need to create a temporary buffered binary or text file object just to
create an empty file.
Replace also os.fdopen(handle).close() by os.close(handle).
Use of DeviceIoControl to obtain the symlink path via the reparse tag was
removed. The code now uses GetFinalPathNameByHandle in the case of a
symbolic link and works properly given the added test which creates a symbolic
link and calls os.stat on it from multiple locations.
Victor Stinner also noticed an issue with os.lstat following the os.stat
code path when being passed bytes. The posix_lstat function was adjusted to
properly hook up win32_lstat instead of the previous STAT macro (win32_stat).
thread implementation.
Skip test_lock_acquire_interruption() and test_rlock_acquire_interruption() of
test_threadsignals if a thread lock is implemented using a POSIX mutex and a
POSIX condition variable. A POSIX condition variable cannot be interrupted by a
signal (e.g. on Linux, the futex system call is restarted).
bytes on Windows if the file is a TTY to workaround a Windows bug. The Windows
console returns an error (12: not enough space error) on writing into stdout if
stdout mode is binary and the length is greater than 66,000 bytes (or less,
depending on heap usage).
Windows if the file is a TTY to workaround a Windows bug. The Windows console
returns an error (12: not enough space error) on writing into stdout if
stdout mode is binary and the length is greater than 66,000 bytes (or less,
depending on heap usage).
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87666 | amaury.forgeotdarc | 2011-01-03 01:19:11 +0100 (lun., 03 janv. 2011) | 4 lines
#8278: In the Windows implementation of stat() and utime(),
use time_t instead of int. This gives support for dates after 2038,
at least when compiled with VS2003 or later, where time_t is 64bit.
........