Benjamin Peterson
eaa5eeef57
Backed out changeset 709850f1ec67
14 years ago
Larry Hastings
cfe6f2af3c
Update Misc/NEWS for issues #14127 and #14705 . (And, technically, #10148.)
14 years ago
Stefan Krah
6b03f2ce45
Fix typo in exception message.
14 years ago
Benjamin Peterson
fbd85a0fbf
initialization not needed
14 years ago
Richard Oudkerk
f072b45e34
Fix for fatal errors in os.*utime*()
The address of an object was being decreffed instead of the object.
14 years ago
Larry Hastings
b333640aba
Issue #14127 : Fix two bugs with the Windows implementation.
14 years ago
Benjamin Peterson
9bd9d74996
what is a invalid tuple?
14 years ago
Benjamin Peterson
b399ab2c5c
clean up converted path on error
14 years ago
Benjamin Peterson
3e2e368f3b
avoid unitialized memory
14 years ago
Benjamin Peterson
35a8f0dee5
check correct variable for error
14 years ago
Larry Hastings
76ad59b7e8
Issue #14127 : Add ns= parameter to utime, futimes, and lutimes.
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!
14 years ago
Jesus Cea
990eff0776
Backing out 86dc014cdd74. Not ready yet
14 years ago
Jesus Cea
2b47f0a23f
Close #10142 : Support for SEEK_HOLE/SEEK_DATA
14 years ago
Jesus Cea
1d642d2af1
Closes Issue #14661 : posix module: add O_EXEC, O_SEARCH, O_TTY_INIT (I add some Solaris constants too)
14 years ago
Jesus Cea
cf381206fc
Issue #14661 : posix module: add O_EXEC, O_SEARCH, O_TTY_INIT
14 years ago
Larry Hastings
6fe20b3aee
Issue #14127 : Add st_{cma}time_ns fields to os.stat() result object.
14 years ago
Benjamin Peterson
2dbda07a17
fix condition ( #14296 )
14 years ago
Benjamin Peterson
7b51b8de38
try to fix compilation on glibc's with cpu sets ( #14296 )
14 years ago
Victor Stinner
5d272cc6a2
Close #14180 : Factorize code to convert a number of seconds to time_t, timeval or timespec
time.ctime(), gmtime(), time.localtime(), datetime.date.fromtimestamp(),
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
raises an OverflowError, instead of a ValueError, if the timestamp does not fit
in time_t.
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now
round microseconds towards zero instead of rounding to nearest with ties going
away from zero.
14 years ago
Brett Cannon
efb00c0cc1
Issue #14153 Create _Py_device_encoding() to prevent _io from having to import
the os module.
14 years ago
Georg Brandl
2daf6ae249
Issue #13703 : add a way to randomize the hash values of basic types (str, bytes, datetime)
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.
14 years ago
Antoine Pitrou
bcf2b59fb5
Issue #13609 : Add two functions to query the terminal size:
os.get_terminal_size (low level) and shutil.get_terminal_size (high level).
Patch by Zbigniew Jędrzejewski-Szmek.
14 years ago
Victor Stinner
4195b5caea
Backout f8409b3d6449: the PEP 410 is not accepted yet
14 years ago
Victor Stinner
ccd5715a14
PEP 410
14 years ago
Victor Stinner
1aa54a417d
Issue #13964 : Skip os.*utime*() tests if os.stat() doesn't support timestamp
with a subsecond resolution
14 years ago
Victor Stinner
a2f7c00638
Issue #13964 : Split os.*utime*() subsecond tests into multiple tests to help
debugging
14 years ago
Charles-François Natali
7794090251
Following Nick's suggestion, rename posix.fdlistdir() to posix.flistdir(), to
be consistent with other functions accepting file descriptors (fdlistdir() was
added in 3.3, so hasn't been released yet).
14 years ago
Antoine Pitrou
f3b2d88b67
Issue #8828 : Add new function os.replace(), for cross-platform renaming with overwriting.
14 years ago
Antoine Pitrou
5311c1d7ab
Issue #13772 : In os.symlink() under Windows, do not try to guess the link
target's type (file or directory). The detection was buggy and made the
call non-atomic (therefore prone to race conditions).
14 years ago
Martin v. Löwis
50590f111b
Use GetModuleHandleW to avoid *A functions where possible.
14 years ago
Victor Stinner
e83f899364
Issue #13530 : Document os.lseek() result
Patch written by Jérémy Anger.
14 years ago
Charles-François Natali
76961faaa0
Issue #13757 : Change os.fdlistdir() so that it duplicates the passed file
descriptor (instead of closing it).
14 years ago
Charles-François Natali
f2840a8890
Backed out changeset 36f2e236c601: For some reason, rewinddir() doesn't work as
it should on OpenIndiana.
14 years ago
Charles-François Natali
38f425e475
Issue #13739 : It's simpler and more direct to call rewinddir() at the
beginning.
14 years ago
Charles-François Natali
7546ad327d
Issue #13739 : In os.listdir(), rewind the directory stream (so that listdir()
can be called again on the same open file).
14 years ago
Victor Stinner
1b57967b96
Issue #13560 : Locale codec functions use the classic "errors" parameter,
instead of surrogateescape
So it would be possible to support more error handlers later.
14 years ago
Victor Stinner
1f33f2b0c3
Issue #13560 : os.strerror() now uses the current locale encoding instead of UTF-8
14 years ago
Charles-François Natali
6613c18ea2
Issue #13415 : Test in configure if unsetenv() has a return value or not.
14 years ago
Victor Stinner
984890fcbb
Close #13415 : Test in configure if unsetenv() has a return value or not.
Patch written by Charles-François Natali.
14 years ago
Benjamin Peterson
06403cff16
decref correct object
14 years ago
Benjamin Peterson
4bb867d3ec
plug refleak
14 years ago
Victor Stinner
60b385e813
Issue #13415 : os.unsetenv() doesn't ignore errors anymore.
14 years ago
Victor Stinner
f8facacf30
Fix compiler warnings
14 years ago
Victor Stinner
9d3b93ba30
Use the new Unicode API
* Replace PyUnicode_FromUnicode(NULL, 0) by PyUnicode_New(0, 0)
* Replce PyUnicode_FromUnicode(str, len) by PyUnicode_FromWideChar(str, len)
* Replace Py_UNICODE by wchar_t
* posix_putenv() uses PyUnicode_FromFormat() to create the string, instead
of PyUnicode_FromUnicode() + _snwprintf()
14 years ago
Victor Stinner
f7c5ae2257
Issue #13374 : Deprecate os.getcwdb() on Windows
14 years ago
Victor Stinner
1ab6c2d2c2
Issue #13374 : The Windows bytes API has been deprecated in the os module. Use
Unicode filenames instead of bytes filenames to not depend on the ANSI code
page anymore and to support any filename.
14 years ago
Victor Stinner
6139c1bfa3
Issue #12442 : nt._getdiskusage() is now using the Windows Unicode API
15 years ago
Jesus Cea
d03a49150f
Commit 59dca1e2363d for issue #13327 introduced a compilation warning
15 years ago
Brian Curtin
569b494320
Fix #13327 . utimensat now has the atime and mtime arguments set as optional,
defaulting to None like the other utimes family members. It now accepts
keyword arguments because, unlike other other functions in the family,
it has a `flags` value at the end of the argument list (which
retains its 0 default).
15 years ago
Brian Curtin
7ef53ef916
Forgot to apply the futimesat change.
15 years ago