Antoine Pitrou
95b21460ee
Issue #18756 : Improve error reporting in os.urandom() when the failure is due to something else than /dev/urandom not existing.
2013-08-16 20:49:32 +02:00
Antoine Pitrou
ec34ab5010
Issue #18756 : Improve error reporting in os.urandom() when the failure is due to something else than /dev/urandom not existing.
2013-08-16 20:44:38 +02:00
Victor Stinner
f0e521036c
(Merge 3.3) Issue #18296 : Try to fix TestSendfile.test_trailers() of test_os on FreeBSD
2013-08-15 11:57:19 +02:00
Victor Stinner
5e4d6398a1
Issue #18296 : Try to fix TestSendfile.test_trailers() of test_os on FreeBSD
2013-08-15 11:57:02 +02:00
Terry Jan Reedy
4a0b6f70f6
Issue #15301 : skip new test method so Windows builtbots stop failing.
2013-08-10 20:58:59 -04:00
Larry Hastings
a27b83ad2d
Issue #15301 : Parsing fd, uid, and gid parameters for builtins
...
in Modules/posixmodule.c is now far more robust.
2013-08-08 00:19:50 -07:00
Jason R. Coombs
b501b565c6
Use simple call to os.symlink for broken link (intended for previous commit)
2013-05-27 23:52:43 -04:00
Jason R. Coombs
3a09286790
Issue #13772 : Restored directory detection of targets in `os.symlink` on Windows, which was temporarily removed in Python 3.2.3 due to an incomplete implementation. The implementation now works even if the symlink is created in a location other than the current directory.
2013-05-27 23:21:28 -04:00
Jason R. Coombs
fb1141cd55
Merge with 3.3
2013-05-27 23:53:02 -04:00
Jason R. Coombs
8f1a8e32b1
Merge with 3.3
2013-05-27 23:26:36 -04:00
Charles-Francois Natali
44feda3cd0
Issue #17914 : Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an
...
initial patch by Trent Nelson.
2013-05-20 14:40:46 +02:00
Victor Stinner
672559fc4f
(Merge 3.3) Issue #17702 : use assertRaises() for the unit test
2013-04-14 16:43:38 +02:00
Victor Stinner
839e5eafcb
Issue #17702 : use assertRaises() for the unit test
2013-04-14 16:43:03 +02:00
Victor Stinner
43aa0d07e2
(Merge 3.3) Close #17702 : os.environ now raises KeyError with the original
...
environment variable name (str on UNIX), instead of using the encoded name
(bytes on UNIX).
2013-04-14 16:38:35 +02:00
Victor Stinner
6d10139d70
Close #17702 : os.environ now raises KeyError with the original environment
...
variable name (str on UNIX), instead of using the encoded name (bytes on UNIX).
2013-04-14 16:35:04 +02:00
Stefan Krah
a8e59feeb5
Merge 3.3.
2013-01-17 15:34:50 +01:00
Stefan Krah
ebee49a487
Issue #14110 : Fix test failures on FreeBSD if the user is in the wheel group.
2013-01-17 15:31:00 +01:00
Victor Stinner
67eb8df902
(Merge 3.3) Issue #9644 : Add a test on os.statvfs() for the PEP 383
2013-01-01 23:17:22 +01:00
Victor Stinner
a25be07103
Issue #9644 : Add a test on os.statvfs() for the PEP 383
2013-01-01 23:11:21 +01:00
Victor Stinner
e4110dc11f
Issue #9644 : Fix the encoding used by os.statvfs(): use the filesystem encoding
...
with the surrogateescape error handler, instead of UTF-8 in strict mode.
2013-01-01 23:05:55 +01:00
Andrew Svetlov
914ab8420e
Add test coverage for os.removedirs ( #16775 )
2012-12-25 12:21:49 +02:00
Andrew Svetlov
34dcdee177
Add test coverage for os.removedirs ( #16775 )
2012-12-25 12:20:39 +02:00
Andrew Svetlov
405faed511
Add test coverage for os.removedirs ( #16775 )
2012-12-25 12:18:09 +02:00
Andrew Svetlov
8b33dd8e54
Use OESeeror instead of os.error ( #16720 )
...
Patch by Serhiy Storchaka.
2012-12-24 19:58:48 +02:00
Andrew Svetlov
2606a6f197
Issue #16719 : Get rid of WindowsError. Use OSError instead
...
Patch by Serhiy Storchaka.
2012-12-19 14:33:35 +02:00
Andrew Svetlov
a191959849
Issue #16714 : use 'raise' exceptions, don't 'throw'.
...
Patch by Serhiy Storchaka.
2012-12-18 21:27:16 +02:00
Andrew Svetlov
5b89840d9c
Issue #16714 : use 'raise' exceptions, don't 'throw'.
...
Patch by Serhiy Storchaka.
2012-12-18 21:26:36 +02:00
Andrew Svetlov
737fb89dd1
Issue #16714 : use 'raise' exceptions, don't 'throw'.
...
Patch by Serhiy Storchaka.
2012-12-18 21:14:22 +02:00
Victor Stinner
ee36c24d15
Issue #15478 : os.lchflags() is not always available when os.chflags() is available
2012-11-13 09:31:51 +01:00
Victor Stinner
e667e98faa
Issue #16218 , #16444 : Backport improvment on tests for non-ASCII characters
2012-11-12 01:23:15 +01:00
Victor Stinner
64e039af02
Issue #16414 : Fix test_os on Windows, don't test os.listdir() with undecodable
...
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).
2012-11-07 00:10:14 +01:00
Victor Stinner
8b219b2936
Issue #16414 : Add support.FS_NONASCII and support.TESTFN_NONASCII
...
These constants are used to test functions with non-ASCII data, especially
filenames.
2012-11-06 23:23:43 +01:00
Victor Stinner
afe1706457
Issue #15478 : Use source filename in OSError, not destination filename
...
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
2012-10-31 22:47:43 +01:00
Victor Stinner
a0c811e439
Issue #15478 : Fix again to fix test_os on Windows
2012-10-31 22:16:38 +01:00
Victor Stinner
bd54f0eb3a
Issue #15478 : Fix test_os on FreeBSD
...
Calling OS functions can fail with errors other than FileNotFoundError: a
FreeBSD buildbot fails for example with a PermissionError.
2012-10-31 01:12:55 +01:00
Victor Stinner
f69055efba
Issue #15478 : Fix test_os on Windows (os.chown is missing)
2012-10-31 01:04:10 +01:00
Victor Stinner
292c835548
Issue #15478 : Raising an OSError doesn't decode or encode the filename anymore
...
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).
2012-10-30 02:17:38 +01:00
Ezio Melotti
c7e139b431
#1087 : use proper skips in test_os.
2012-09-26 20:01:34 +03:00
Ned Deily
3a2b97e48a
Issue #14992 : merge from 3.2
2012-08-08 21:03:02 -07:00
Ned Deily
c622f4254b
Issue #14992 : Prevent test_os test_exist_ok_s_isgid_directory test case
...
failure on OS X built with 10.4 ABI.
2012-08-08 20:57:24 -07:00
Larry Hastings
b40380667c
Issue #15202 : Consistently use the name "follow_symlinks" for
...
new parameters in os and shutil functions. Patch by Serhiy Storchaka.
2012-07-15 10:57:38 -07:00
Richard Oudkerk
2240ac1eae
Issue #15261 : Stop os.stat(fd) crashing on Windows when fd not open.
2012-07-06 12:05:32 +01:00
Larry Hastings
c48fe98a7c
Issue #15177 : Added dir_fd parameter to os.fwalk().
2012-06-25 04:49:05 -07:00
Georg Brandl
306336bcda
Closes #15161 : add support for giving path as a fd for truncate() and pathconf().
2012-06-24 12:55:33 +02:00
Larry Hastings
b698d8e7e9
Issue #15154 : Add "dir_fd" parameter to os.rmdir, remove "rmdir"
...
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.)
2012-06-23 16:55:07 -07:00
Larry Hastings
9cf065cfdc
Issue #14626 : Large refactoring of functions / parameters in the os module.
...
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.
2012-06-22 16:30:09 -07:00
Victor Stinner
034d0aa217
Issue #14711 : os.stat_float_times() has been deprecated.
2012-06-05 01:22:15 +02:00
Gregory P. Smith
f0a9a9b502
Fixes Issue #14992 : os.makedirs(path, exist_ok=True) would raise an OSError
...
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.
2012-06-03 14:35:09 -07:00
Gregory P. Smith
a81c856436
Fixes Issue #14992 : os.makedirs(path, exist_ok=True) would raise an OSError
...
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.
2012-06-03 14:30:44 -07:00
Hynek Schlawack
39bf90d319
Add two more sorts to test_os.WalkTests I've missed before
2012-05-15 18:40:17 +02:00