Commit Graph

519 Commits

Author SHA1 Message Date
Victor Stinner 8c663fd60e
Replace KB unit with KiB (#4293)
kB (*kilo* byte) unit means 1000 bytes, whereas KiB ("kibibyte")
means 1024 bytes. KB was misused: replace kB or KB with KiB when
appropriate.

Same change for MB and GB which become MiB and GiB.

Change the output of Tools/iobench/iobench.py.

Round also the size of the documentation from 5.5 MB to 5 MiB.
2017-11-08 14:44:44 -08:00
Victor Stinner c29b585fd4
bpo-31784: Implement PEP 564: add time.time_ns() (#3989)
Add new time functions:

* time.clock_gettime_ns()
* time.clock_settime_ns()
* time.monotonic_ns()
* time.perf_counter_ns()
* time.process_time_ns()
* time.time_ns()

Add new _PyTime functions:

* _PyTime_FromTimespec()
* _PyTime_FromNanosecondsObject()
* _PyTime_FromTimeval()

Other changes:

* Add also os.times() tests to test_os.
* pytime_fromtimeval() and pytime_fromtimeval() now return
  _PyTime_MAX or _PyTime_MIN on overflow, rather than undefined
  behaviour
* _PyTime_FromNanoseconds() parameter type changes from long long to
  _PyTime_t
2017-11-02 07:28:27 -07:00
Benjamin Peterson 4eaf7f9490 fixes bpo-31866: remove code pertaining to AtheOS support (#4115)
We stop support this OS in 2007 with commit
19fab761b7. Let's finish.
2017-10-25 23:55:14 -07:00
Victor Stinner 01b5aab7bf bpo-31827: Remove os.stat_float_times() (GH-4061) 2017-10-24 02:02:00 -07:00
Victor Stinner a8e7d903d7 os.test_utime_current(): tolerate 50 ms delta (#3646) 2017-09-18 08:49:45 -07:00
Antoine Pitrou a6a4dc816d bpo-31370: Remove support for threads-less builds (#3385)
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
Ville Skyttä 49b2734bf1 Spelling fixes (#2902) 2017-08-03 09:00:59 +03:00
Victor Stinner d1cc037d14 bpo-30908: Fix dangling thread in test_os.TestSendfile (#2680)
tearDown() now clears explicitly the self.server variable to make
sure that the thread is completely cleared when tearDownClass()
checks if all threads have been cleaned up.

Fix the following warning:

$ ./python -m test --fail-env-changed -m test.test_os.TestSendfile.test_keywords -R 3:1 test_os
(...)
Warning -- threading_cleanup() failed to cleanup 0 threads after 3 sec (count: 0, dangling: 2)
(...)
Tests result: ENV CHANGED
2017-07-12 16:05:43 +02:00
Serhiy Storchaka 1180e5a518 bpo-30879: os.listdir() and os.scandir() now emit bytes names when (#2634)
called with bytes-like argument.
2017-07-11 06:36:46 +03:00
Osvaldo Santana Neto 8a8d28501f bpo-30441: Fix bug when modifying os.environ while iterating over it (#2409) 2017-07-01 20:34:45 +03:00
Serhiy Storchaka af5392f5c6 bpo-30746: Port more tests for os.spawnvpe() and os.execve() from 2.7. (#2394) 2017-06-25 09:48:54 +03:00
Serhiy Storchaka 77703942c5 bpo-30746: Prohibited the '=' character in environment variable names (#2382)
in `os.putenv()` and `os.spawn*()`.
2017-06-25 07:33:01 +03:00
Victor Stinner 3402f72688 bpo-30649: Revert utime delta in test_os (#2176)
PPC64 Fedora 3.x buildbot requires at least a delta of 14 ms: revert
the utime delta to 20 ms.

I tried 10 ms, but test_os failed on the PPC64 Fedora 3.x buildbot.
2017-06-14 11:55:17 +02:00
Victor Stinner c94caca65c bpo-30649: test_os tolerates 50 ms delta for utime (#2156)
On Windows, tolerate a delta of 50 ms instead of 20 ms in
test_utime_current() and test_utime_current_old() of test_os.

On other platforms, reduce the delta from 20 ms to 10 ms.
2017-06-13 23:48:27 +02:00
Denis Osipov 897bba7563 bpo-30584: Fix test_os fails on non-English Windows (#1980)
* Fix bpo-30584

* Adding a comment mentionning the bpo and explaining what is the identifier

* Add Denis Osipov to Misc/ACKS
2017-06-07 19:15:26 +02:00
Serhiy Storchaka ea720fe7e9 bpo-25996: Added support of file descriptors in os.scandir() on Unix. (#502)
os.fwalk() is sped up by 2 times by using os.scandir().
2017-03-30 09:12:31 +03:00
Serhiy Storchaka e304e33c16 bpo-19930: The mode argument of os.makedirs() no longer affects the file (#799)
permission bits of newly-created intermediate-level directories.
2017-03-24 13:27:42 +02:00
Serhiy Storchaka 8f6b344d36 bpo-28682: Added support for bytes paths in os.fwalk(). (#489) 2017-03-07 14:33:21 +02:00
Serhiy Storchaka 70d28a184c Remove unused imports. 2016-12-16 20:00:15 +02:00
Steve Dower bce26262d1 Issue #28732: Raise ValueError when argv[0] is empty 2016-11-19 19:17:26 -08:00
Steve Dower 859fd7bd7a Issue #28732: Raise ValueError when os.spawn*() is passed an empty tuple of arguments 2016-11-19 18:53:19 -08:00
Xavier de Gaye 21060105d9 Issue #26935: Fix broken Android dup2() in test_os 2016-11-16 08:05:27 +01:00
Steve Dower 78057b4159 Closes #27781: Removes special cases for the experimental aspect of PEP 529 2016-11-06 19:35:08 -08:00
Serhiy Storchaka b6bd81dee9 Issue #28353: Make test_os.WalkTests.test_walk_bad_dir stable. 2016-10-28 09:18:30 +03:00
Serhiy Storchaka 7865dfff2e Issue #28353: Make test_os.WalkTests.test_walk_bad_dir stable. 2016-10-28 09:17:38 +03:00
Serhiy Storchaka 36888dd970 Issue #28353: Fixed tests of os.fwalk() with broken links. 2016-10-25 20:18:31 +03:00
Serhiy Storchaka 28f982060c Issue #28353: Try to fix tests. 2016-10-25 19:01:41 +03:00
Serhiy Storchaka af4e4747f5 Issue #28353: os.fwalk() no longer fails on broken links. 2016-10-25 14:34:38 +03:00
Serhiy Storchaka 42bababba6 Issue #28353: os.fwalk() no longer fails on broken links. 2016-10-25 14:28:38 +03:00
Berker Peksag bf3c1c3235 Issue #28075: Fix test_access_denied in Python 3.5
I forgot there two variations of os.stat() in Python 3.5.
2016-09-18 13:56:29 +03:00
Berker Peksag 9a1c91a10d Fix test_access_denied in 3.5 2016-09-17 16:20:55 +03:00
Berker Peksag 052e4f18c4 Issue #28075: Merge from 3.5 2016-09-17 15:51:14 +03:00
Berker Peksag 0b4dc4846b Issue #28075: Check for ERROR_ACCESS_DENIED in Windows implementation of os.stat()
Patch by Eryk Sun.
2016-09-17 15:49:59 +03:00
Berker Peksag 4af23d7ddd Use requires_os_func() to skip SpawnTests 2016-09-15 20:32:44 +03:00
Berker Peksag 47e7062f76 Make SpawnTest.create_args() keyword-only 2016-09-15 20:23:55 +03:00
Berker Peksag 8181646931 Issue #28114: Fix a crash in parse_envlist() when env contains byte strings
Patch by Eryk Sun.
2016-09-15 20:19:47 +03:00
Victor Stinner 4659ccff70 Issue #28114: Add unit tests on os.spawn*() 2016-09-14 10:57:00 +02:00
Martin Panter 99e843b48e Correct spelling in documentation and code comment 2016-09-10 10:38:28 +00:00
Steve Dower 3929499914 Issue #1602: Windows console doesn't input or print Unicode (PEP 528)
Closes #17602: Adds a readline implementation for the Windows console
2016-08-30 21:22:36 -07:00
R David Murray 44b548dda8 #27364: fix "incorrect" uses of escape character in the stdlib.
And most of the tools.

Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
2016-09-08 13:59:53 -04:00
Steve Dower cc16be85c0 Issue #27781: Change file system encoding on Windows to UTF-8 (PEP 529) 2016-09-08 10:35:16 -07:00
Victor Stinner 173a1f3dc7 Fix test_os.GetRandomTests()
Issue #27778: Skip getrandom() tests if getrandom() fails with ENOSYS.
2016-09-06 19:57:40 -07:00
Victor Stinner 9b1f474df6 Add os.getrandom()
Issue #27778: Expose the Linux getrandom() syscall as a new os.getrandom()
function.

This change is part of the PEP 524.
2016-09-06 16:18:52 -07:00
Brett Cannon ec6ce879c7 Issue #26027: Support path-like objects in PyUnicode-FSConverter().
This is to add support for os.exec*() and os.spawn*() functions. Part
of PEP 519.
2016-09-06 15:50:29 -07:00
Benjamin Peterson a9ab165cd2 os.access does not allow a fd 2016-09-05 15:40:59 -07:00
Berker Peksag d0f5bab21b Issue #26027: Fix test_path_t_converter on Windows 2016-08-27 21:26:35 +03:00
Brett Cannon 3ce2fd484b Don't test for path-like bytes paths on Windows 2016-08-27 09:42:40 -07:00
Brett Cannon 8f96a30630 Issue #26027: Don't test for bytearray in path_t as that's now
deprecated.
2016-08-26 19:30:11 -07:00
Brett Cannon 3f9183b5ac Issue #26027, #27524: Add PEP 519/__fspath__() support to os and
os.path.

Thanks to Jelle Zijlstra for the initial patch against posixmodule.c.
2016-08-26 14:44:48 -07:00
Serhiy Storchaka d73c31899e Issue #26800: Undocumented support of general bytes-like objects
as paths in os functions is now deprecated.
2016-08-06 23:22:08 +03:00
Xavier de Gaye d141531eb5 Issue #27472: Add test.support.unix_shell as the path to the default shell. 2016-07-22 12:15:29 +02:00
Brett Cannon 33ed881f79 Fix a failing test introduced as part of issue #27512 2016-07-15 11:26:53 -07:00
Brett Cannon 044283a426 Issue #27512: Don't segfault when os.fspath() calls an object whose
__fspath__() raises an exception.

Thanks to Xiang Zhang for the patch.
2016-07-15 10:41:49 -07:00
Brett Cannon a32c4d0531 Issue #27038: Expose DirEntry as os.DirEntry.
Thanks to Jelle Zijlstra for the code portion of the patch.
2016-06-24 14:14:44 -07:00
Brett Cannon c78ca1e044 Issue #27186: Update os.fspath()/PyOS_FSPath() to check the return
type of __fspath__().

As part of this change, also make sure that the pure Python
implementation of os.fspath() is tested.
2016-06-24 12:03:43 -07:00
Martin Panter 0c9ad59dab Issue #27186: Skip scandir(bytes) test with os.name == "nt" 2016-06-13 03:28:35 +00:00
Brett Cannon 41ae559108 Issue #27186: skip bytes path test for os.scandir() on Windows 2016-06-12 11:11:20 -07:00
Brett Cannon 96881cd621 Issue #27186: Add os.PathLike support to DirEntry
Initial patch thanks to Jelle Zijlstra.
2016-06-10 14:37:21 -07:00
Ethan Furman 228c636908 issue27186: fix fsencode/fsdecode and update tests; patch by Jelle Zijlstra 2016-06-04 13:47:39 -07:00
Ethan Furman 958b3e4058 issue27186: add PathLike ABC 2016-06-04 12:49:35 -07:00
Ethan Furman 410ef8e230 issue27186: add C version of os.fspath(); patch by Jelle Zijlstra 2016-06-04 12:06:26 -07:00
Ethan Furman c1cbeedf0c issue27182: update fsencode and fsdecode for os.path(); patch by Dusty Phillips 2016-06-04 10:19:27 -07:00
Ethan Furman cdc0879d3a issue27186 -- initial docs, tests, and python version of os.fspath 2016-06-02 15:06:09 -07:00
Serhiy Storchaka 9e9235511e Issue #26783: test_os.WalkTests.test_walk_topdown did't test fwalk and bytes.
Patch by Aviv Palivoda.
2016-04-16 17:51:17 +03:00
Serhiy Storchaka a07ab29a79 Issue #26783: test_os.WalkTests.test_walk_topdown did't test fwalk and bytes.
Patch by Aviv Palivoda.
2016-04-16 17:51:00 +03:00
Victor Stinner 53b0a41d31 Issue #25911: more info on test_os failure 2016-03-26 01:12:36 +01:00
Victor Stinner e984eb501b Fix test_os.test_symlink(): remove create symlink 2016-03-25 22:51:17 +01:00
Victor Stinner 32830149d8 changeset: 100749:0b61b2d28a07
tag: tip
parent: 100742:ebae81b31cf6
user: Victor Stinner <victor.stinner@gmail.com>
date: Fri Mar 25 15:03:34 2016 +0100
files: Lib/test/test_os.py
description:
test_os: Win32ErrorTests checks if file exists

Don't use os.path.exists() since it ignores *any* OSError.
2016-03-25 15:12:08 +01:00
Victor Stinner e77c974357 test_os: Win32ErrorTests now ensures that TESTFN doesn't exist
Replace also other open(filename, "w") with open(filename, "x") to fail if a
previous test forgot to remove filename.
2016-03-25 10:28:23 +01:00
Victor Stinner 3899b549e3 test_os: use support.rmtree() to cleanup WalkTests 2016-03-24 17:21:17 +01:00
Victor Stinner ae39d236b4 Enhance and modernize test_os
* add create_file() helper function
* create files using "x" mode instead of "w" to detect when a previous test
  forget to remove a file
* open file for writing in unbuferred mode (buffering=0)
* replace "try/finally: unlink" with self.addCleanup(support.unlink)
* register unlink cleanup function *before* creating new files
2016-03-24 17:12:55 +01:00
Victor Stinner f95a19b900 test_os: use @support.requires_linux_version 2016-03-24 16:50:41 +01:00
Victor Stinner 923590e397 Fix DeprecationWarning on Windows
Issue #25911: Use support.check_warnings() to expect or ignore
DeprecationWarning in test_os.
2016-03-24 09:11:48 +01:00
Serhiy Storchaka 786e922054 Issue #25911: Tring to silence deprecation warnings in bytes path walk tests. 2016-03-08 21:26:44 +02:00
Serhiy Storchaka ada6db7870 Issue #25911: Tring to silence deprecation warnings in bytes path walk tests. 2016-03-08 21:26:26 +02:00
Serhiy Storchaka 706379ae0d Backed out changeset da020e408c7f 2016-03-08 21:16:47 +02:00
Serhiy Storchaka 7ab61ae8aa Backed out changeset f9e22717722d 2016-03-08 21:15:43 +02:00
Serhiy Storchaka adca8464b1 Backed out changeset 19a3e0e664af 2016-03-08 21:13:35 +02:00
Serhiy Storchaka 238fecd75c Issues #23808, #25911: Trying to fix walk tests on Windows.
On Windows a symlink can has the FILE_ATTRIBUTE_DIRECTORY flag.
2016-03-08 16:12:46 +02:00
Serhiy Storchaka 55e3218eee Issues #23808, #25911: Trying to fix walk tests on Windows.
On Windows a symlink can has the FILE_ATTRIBUTE_DIRECTORY flag.
2016-03-08 16:12:09 +02:00
Serhiy Storchaka 388b90f28e Issues #23808, #25911: Trying to fix walk tests on Windows.
On Windows a symlink can has the FILE_ATTRIBUTE_DIRECTORY flag.
2016-03-08 16:11:26 +02:00
Serhiy Storchaka ffe96ae10b Issue #25994: Added the close() method and the support of the context manager
protocol for the os.scandir() iterator.
2016-02-11 13:21:30 +02:00
Serhiy Storchaka 79ad897052 Issue #25911: Restored support of bytes paths in os.walk() on Windows. 2016-02-08 16:24:15 +02:00
Serhiy Storchaka 5f6a0b4eb2 Issue #25911: Restored support of bytes paths in os.walk() on Windows. 2016-02-08 16:23:28 +02:00
Serhiy Storchaka 85896f72d5 Issue #25860: Fixed test failure caused by inconsistency of os.walk() and
os.fwalk() parameter names.
2015-12-23 00:37:50 +02:00
Serhiy Storchaka a17ca19d34 Issue #25860: Fixed test failure caused by inconsistency of os.walk() and
os.fwalk() parameter names.
2015-12-23 00:37:34 +02:00
Serhiy Storchaka 345e78e566 Issue #25860: os.fwalk() no longer skips remaining directories when error occurs.
Original patch by Samson Lee.
2015-12-23 00:09:01 +02:00
Serhiy Storchaka 0bddc9eb15 Issue #25860: os.fwalk() no longer skips remaining directories when error occurs.
Original patch by Samson Lee.
2015-12-23 00:08:24 +02:00
Martin Panter 5e02af4961 Issue #25583: Merge makedirs fix from 3.5 2015-11-20 02:37:29 +00:00
Martin Panter 97cabb9fa5 Issue #25583: Merge makedirs fix from 3.4 into 3.5 2015-11-20 02:35:46 +00:00
Martin Panter a82642f9db Issue #25583: Avoid incorrect errors raised by os.makedirs(exist_ok=True) 2015-11-19 04:48:44 +00:00
Martin Panter e56a919100 Issue #25523: Merge a-to-an corrections from 3.5 2015-11-02 04:27:17 +00:00
Martin Panter 2eb819f7a8 Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
Martin Panter 7462b64911 Issue #25523: Correct "a" article to "an" article
This changes the main documentation, doc strings, source code comments, and a
couple error messages in the test suite. In some cases the word was removed
or edited some other way to fix the grammar.
2015-11-02 03:37:02 +00:00
Victor Stinner bae2d6203f Issue #25003: On Solaris 11.3 or newer, os.urandom() now uses the getrandom()
function instead of the getentropy() function. The getentropy() function is
blocking to generate very good quality entropy, os.urandom() doesn't need such
high-quality entropy.
2015-10-01 09:47:30 +02:00
Victor Stinner d8f432a98c Issue #25003: Skip test_os.URandomFDTests on Solaris 11.3 and newer
When os.urandom() is implemented with the getrandom() function, it doesn't use
a file descriptor.
2015-09-18 16:24:31 +02:00
Victor Stinner 024364a89a Merge 3.5 (os.waitpid) 2015-09-15 10:24:27 +02:00
Victor Stinner d3ffd32767 Issue #25118: Fix a regression of Python 3.5.0 in os.waitpid() on Windows.
Add an unit test on os.waitpid()
2015-09-15 10:11:03 +02:00
Serhiy Storchaka 233cdb3e9c Marked keystrokes with the :kbd: role.
Fixed the case of the "Ctrl-" prefixes.
2015-09-12 17:46:56 +03:00
Serhiy Storchaka 153627c111 Marked keystrokes with the :kbd: role.
Fixed the case of the "Ctrl-" prefixes.
2015-09-12 17:46:20 +03:00
Serhiy Storchaka 0424eaf753 Marked keystrokes with the :kbd: role.
Fixed the case of the "Ctrl-" prefixes.
2015-09-12 17:45:25 +03:00
Martin Panter 3f560c16e5 Merge 3.5 into 3.6 2015-09-09 06:28:08 +00:00
Martin Panter 6088b7bd49 Merge 3.4 into 3.5 2015-09-09 06:27:43 +00:00
Martin Panter 9499413508 os.sendfile(headers=None, trailers=None) arguments are not actually accepted
Needs to be tested on a BSD.
2015-09-09 05:29:24 +00:00
Martin Panter a122b5a1fd Issue #23738: Merge 3.5 into 3.6 2015-09-09 03:01:17 +00:00
Martin Panter 0ff89099c7 Issue #23738: Merge 3.4 into 3.5 2015-09-09 01:56:53 +00:00
Martin Panter bf19d16950 Issue #23738: Document and test actual keyword parameter names
Also fix signature because os.utime(..., ns=None) is not allowed.
2015-09-09 01:01:13 +00:00
Berker Peksag 95e0960220 Use setUpClass and tearDownClass correctly in test_os.
According to the documentation, they must be decorated as classmethods.
2015-07-21 09:30:09 +03:00
Berker Peksag 036a71bf25 Use setUpClass and tearDownClass correctly in test_os.
According to the documentation, they must be decorated as classmethods.
2015-07-21 09:29:48 +03:00
Victor Stinner fd44384f33 Merge 3.5 2015-07-20 17:13:28 +02:00
Victor Stinner 3d0b8422bc Merge 3.4 2015-07-20 17:13:16 +02:00
Victor Stinner c0b1e0f868 Issue #24675: Avoid DeprecationWarning in test_os
Patch written by Martin Panter. I replace tearDown() with addCleanup().
2015-07-20 17:12:57 +02:00
Victor Stinner 138adb8d05 (Merge 3.4) Issue #15745: Rewrite os.utime() tests in test_os
* Don't use the timestamp of an existing file anymore, only use fixed
  timestamp
* Enhance the code checking the resolution of the filesystem timestamps.
* Check timestamps with a resolution of 1 microsecond instead of 1 millisecond
* When os.utime() uses the current system clock, tolerate a delta of 20 ms.
  Before some os.utime() tolerated a different of 10 seconds.
* Merge duplicated tests and simplify the code
2015-06-12 22:01:54 +02:00
Victor Stinner e12e7aa3fd Issue #15745: Rewrite os.utime() tests in test_os
* Don't use the timestamp of an existing file anymore, only use fixed
  timestamp
* Enhance the code checking the resolution of the filesystem timestamps.
* Check timestamps with a resolution of 1 microsecond instead of 1 millisecond
* When os.utime() uses the current system clock, tolerate a delta of 20 ms.
  Before some os.utime() tolerated a different of 10 seconds.
* Merge duplicated tests and simplify the code
2015-06-12 21:58:00 +02:00
Victor Stinner cf05970307 Remove unused import on test_os 2015-06-12 21:57:50 +02:00
Victor Stinner 47aacc8f69 Issue #15745: Rewrite os.utime() tests in test_os
* Don't use the timestamp of an existing file anymore, only use fixed
  timestamp
* Enhance the code checking the resolution of the filesystem timestamps.
* Check timestamps with a resolution of 1 microsecond instead of 1 millisecond
* When os.utime() uses the current system clock, tolerate a delta of 20 ms.
  Before some os.utime() tolerated a different of 10 seconds.
* Merge duplicated tests and simplify the code
2015-06-12 17:26:23 +02:00
Berker Peksag ce643913a9 Issue #9517: Move script_helper to the support package.
Patch by Christie Wilson.
2015-05-06 06:33:17 +03:00
Victor Stinner 9eb57c5fa5 Issue #22181: The availability of the getrandom() is now checked in configure,
and stored in pyconfig.h as the new HAVE_GETRANDOM_SYSCALL define.

Fix os.urandom() tests using file descriptors if os.urandom() uses getrandom().
2015-03-19 22:21:49 +01:00
Victor Stinner ebaa81f3b1 Merge 3.4 (test_os) 2015-03-12 10:32:20 +01:00
Victor Stinner 0561c53d78 Issue #23605: Refactor os.walk() tests to also run them on os.fwalk() 2015-03-12 10:28:24 +01:00
Steve Dower d5a0be6fc0 Suppress assert dialogs in test_os 2015-03-07 21:25:54 -08:00
Victor Stinner 6036e4431d Issue #22524: New os.scandir() function, part of the PEP 471: "os.scandir()
function -- a better and faster directory iterator". Patch written by Ben
Hoyt.
2015-03-08 01:58:04 +01:00
Serhiy Storchaka a9e00d13cd Issue #20069: Fixed test_os on Solaris: error message is platform depended. 2015-02-16 08:35:18 +02:00
R David Murray f2ad173eaf #20069: Add tests for os.chown.
Patch by Vajrasky Kok.
2014-12-25 18:36:56 -05:00
Victor Stinner fe02e39029 Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
instead of reading /dev/urandom, to get pseudo-random bytes.
2014-12-21 01:16:38 +01:00
Victor Stinner 4d6a3d6c01 Issue #22585: On OpenBSD 5.6 and newer, os.urandom() now calls getentropy(),
instead of reading /dev/urandom, to get pseudo-random bytes.
2014-12-21 01:16:38 +01:00
Serhiy Storchaka 65ee4674e2 Issue #22777: Test pickling with all protocols. 2014-12-15 14:06:02 +02:00
Serhiy Storchaka bad1257c96 Issue #22777: Test pickling with all protocols. 2014-12-15 14:03:42 +02:00
Yury Selivanov 97e2e06af8 os: Include posix functions in os.__all__. Closes issue #18554.
Patch by Ronald Oussoren.
2014-09-26 12:33:06 -04:00
Victor Stinner 1db9e7bb19 Issue #22054: Add os.get_blocking() and os.set_blocking() functions to get and
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.
2014-07-29 22:32:47 +02:00
Victor Stinner 5c6e6fc57e Issue #21932: Skip test_os.test_large_read() on 32-bit system 2014-07-12 11:03:53 +02:00
Victor Stinner 6e1ccfe872 Issue #21932: Ooops, os.read(fd, size) allocates a buffer of size bytes, even
if the file is much smaller. Add @bigmemtest decorator to the new
test_large_read().
2014-07-11 17:35:06 +02:00
Victor Stinner b28ed92dd0 Issue #21932: os.read() now uses a :c:func:`Py_ssize_t` type instead of
:c:type:`int` for the size to support reading more than 2 GB at once. On
Windows, the size is truncted to INT_MAX. As any call to os.read(), the OS
may read less bytes than the number of requested bytes.
2014-07-11 17:04:41 +02:00
Zachary Ware 63f277b694 Issue #21741: Add st_file_attributes to os.stat_result on Windows.
Patch by Ben Hoyt.
2014-06-19 09:46:37 -05:00
Ned Deily ab6b9f8a5b Issue #22585: make URandomFDTests test case actually run 2015-03-17 04:30:08 -07:00
Tim Golden 0321cf2550 Issue18314 Allow unlink to remove junctions. Includes support for creating junctions. Patch by Kim Gräsman 2014-05-05 19:46:17 +01:00
Tim Golden fbf963c064 Backed out changeset: 17df50df62c7 2014-04-27 18:35:36 +01:00
Tim Golden 4675d798bf Issue #18314 os.unlink will now remove junction points on Windows. Patch by Kim Gräsman. 2014-04-27 18:00:10 +01:00
Antoine Pitrou e472aeafc3 Issue #21207: Detect when the os.urandom cached fd has been closed or replaced, and open it anew. 2014-04-26 14:33:03 +02:00
Benjamin Peterson 9dc203fff9 merge 3.3 (#21082) 2014-04-01 19:18:48 -04:00
Benjamin Peterson 4717e2112b merge 3.2 (#21082) 2014-04-01 19:17:57 -04:00
Benjamin Peterson ee5f1c13d1 remove directory mode check from makedirs (closes #21082) 2014-04-01 19:13:18 -04:00
Victor Stinner 149e540adf (Merge 3.3) Issue #20113: os.readv() and os.writev() now raise an OSError
exception on error instead of returning -1.
2014-01-08 15:26:12 +01:00
Victor Stinner 57ddf78b6b Issue #20113: os.readv() and os.writev() now raise an OSError exception on
error instead of returning -1.
2014-01-08 15:21:28 +01:00
Zachary Ware 101d9e7250 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:44:27 -06:00
Zachary Ware 9fe6d86709 Issue 19572: More silently skipped tests explicitly skipped. 2013-12-08 00:20:35 -06:00
Serhiy Storchaka 43767638a9 Issue #18702: All skipped tests now reported as skipped. 2013-11-03 21:31:38 +02:00
Serhiy Storchaka 7908068627 Issue #18702: All skipped tests now reported as skipped. 2013-11-03 21:31:18 +02:00
Tim Golden 1cc3540669 Correct whitespace in test_os 2013-10-25 21:26:06 +01:00
Tim Golden 781bbebacb Issue13234 Allow listdir to handle extended paths on Windows (Patch by Santoso Wijaya) 2013-10-25 20:24:06 +01:00