Anthony Shaw
948ed8c96b
bpo-36814: ensure os.posix_spawn() handles None (GH-13144)
...
Fix an issue where os.posix_spawn() would incorrectly raise a TypeError
when file_actions is None.
2019-05-10 04:00:06 +02:00
Pablo Galindo
46544f69bf
Skip test_preadv_flags if RWF_HIPRI is not supported by the system (GH-12762)
2019-04-13 17:06:03 +01:00
Anthony Sottile
8377cd4fcd
Clean up code which checked presence of os.{stat,lstat,chmod} ( #11643 )
2019-02-25 23:32:27 +01:00
Victor Stinner
1e39b83f24
bpo-35537: Skip test_start_new_session() of posix_spawn (GH-11718)
...
The test fails. Skip the test until a fix can be found.
2019-02-01 11:40:26 +01:00
Joannah Nanjekye
80c5dfe74b
bpo-35537: Add setsid parameter to os.posix_spawn() and os.posix_spawnp() (GH-11608)
2019-02-01 11:05:22 +01:00
Pablo Galindo
e9b185f2a4
bpo-35794: Catch PermissionError in test_no_such_executable (GH-11635)
...
PermissionError can be raised if there are directories in the $PATH that are not accessible
when using posix_spawnp.
2019-01-21 14:35:43 +00:00
Joannah Nanjekye
92b8322e7e
bpo-35674: Add os.posix_spawnp() (GH-11554)
...
Add a new os.posix_spawnp() function.
2019-01-16 14:29:26 +01:00
Vladimir Matveev
c24c6c2c93
bpo-35568: add 'raise_signal' function (GH-11335)
...
As in title, expose C `raise` function as `raise_function` in `signal` module. Also drop existing `raise_signal` in `_testcapi` module and replace all usages with new function.
https://bugs.python.org/issue35568
2019-01-08 01:58:25 -08:00
Pablo Galindo
3d18b50a12
bpo-34685: Skip posix_spawn scheduler tests on BSD (GH-9316)
...
* Skip posix_spawn scheduler tests on BSD. We were already skyping similar tests as the behaviour can depend on the implementation in some cases.
2018-09-14 15:12:22 -07:00
Benjamin Peterson
c7042224b8
closes bpo-34650: Check if sched_getscheduler returns ENOSYS before declaring it supported. (GH-9228)
...
musl doesn't support the scheduler API, but declares stubs that alway return ENOSYS.
2018-09-12 15:12:24 -07:00
Serhiy Storchaka
d700f97b62
bpo-20104: Change the file_actions parameter of os.posix_spawn(). (GH-6725)
...
* Make its default value an empty tuple instead of None.
* Make it a keyword-only parameter.
2018-09-08 14:48:18 +03:00
Pablo Galindo
254a4663d8
bpo-20104: Add flag capabilities to posix_spawn (GH-6693)
...
Implement the "attributes objects" parameter of `os.posix_spawn` to complete the implementation and fully cover the underlying API.
2018-09-07 16:44:24 +01:00
Victor Stinner
0382406fcc
Fix TestPosixSpawn.test_close_file() (GH-8992)
...
Modify TestPosixSpawn to run Python using -I and -S options.
Disable site module to avoid side effects. For example, on Fedora 28,
if the HOME environment variable is not set, site._getuserbase()
calls pwd.getpwuid() which opens /var/lib/sss/mc/passwd, but then
leaves the file open which makes test_close_file() to fail.
2018-08-30 01:21:11 +02:00
Serhiy Storchaka
9d5727326a
bpo-33871: Fix os.sendfile(), os.writev(), os.readv(), etc. (GH-7931)
...
* Fix integer overflow in os.readv(), os.writev(), os.preadv()
and os.pwritev() and in os.sendfile() with headers or trailers
arguments (on BSD-based OSes and MacOS).
* Fix sending the part of the file in os.sendfile() on MacOS.
Using the trailers argument could cause sending more bytes from
the input file than was specified.
Thanks Ned Deily for testing on 32-bit MacOS.
2018-07-31 10:24:54 +03:00
Victor Stinner
b5d702e5e7
bpo-31044, test_posix: Reenable makedev() tests on FreeBSD ( #7449 )
...
The bug has been fixed 10 months ago:
* https://svnweb.freebsd.org/base?view=revision&revision=321920
* https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221048
2018-06-06 15:28:50 +02:00
Ned Deily
09c4a7dee2
bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134)
...
The failure may be due to the use oF ZFS, a case we already ignore
for Solaris-based systems where ZFS is frequently used.
2018-05-26 16:30:46 -04:00
Miro Hrončok
7ec8f28656
bpo-33455: Pass os.environ in test_posix::test_specify_environment. (GH-6753)
...
Pass os.environ's copy to new process created at test_posix:
test_specify_environment. Otherwise important variables such as
LD_LIBRARY_PATH are not set and the child process might not work at all
in an environment where such variables are required for Python to function.
2018-05-11 08:40:43 +03:00
Serhiy Storchaka
ef347535f2
bpo-20104: Improve error handling and fix a reference leak in os.posix_spawn(). ( #6332 )
2018-05-01 16:45:04 +03:00
Pablo Galindo
6c6ddf97c4
bpo-20104: Expose `posix_spawn` in the os module (GH-5109)
...
Add os.posix_spawn to wrap the low level POSIX API of the same name.
Contributed by Pablo Galindo.
2018-01-28 17:56:10 -08:00
Pablo Galindo
4defba3b95
bpo-31368: Expose preadv and pwritev in the os module ( #5239 )
2018-01-27 17:16:37 +01:00
Victor Stinner
13ff24582c
bpo-32593: Drop FreeBSD 9 and older support ( #5232 )
...
Drop support of FreeBSD 9 and older.
2018-01-22 18:32:50 +01:00
xdegaye
92c2ca7633
bpo-28759: Skip some tests on PermissionError raised by Android (GH-4350)
...
Access to mkfifo(), mknod() and hard link creation is controled
by SELinux on Android.
Also remove test.support.android_not_root.
2017-11-12 17:31:07 +01:00
Коренберг Марк
d4b93e21c2
bpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() ( #3000 ) ( #3000 )
2017-08-14 06:55:16 -07:00
Victor Stinner
12953ffe12
bpo-31044: Skip test_posix.test_makedev() on FreeBSD ( #2915 )
...
There is a bug in FreeBSD CURRENT with 64-bit dev_t. Skip the test if
dev_t is larger than 32-bit, until the bug is fixed in FreeBSD
CURRENT.
2017-07-27 16:55:54 +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
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
Gregory P. Smith
163468a766
bpo-16500: Don't use string constants for os.register_at_fork() behavior ( #1834 )
...
Instead use keyword only arguments to os.register_at_fork for each of the scenarios.
Updates the documentation for clarity.
2017-05-29 10:03:41 -07:00
Antoine Pitrou
346cbd351e
bpo-16500: Allow registering at-fork handlers ( #1715 )
...
* bpo-16500: Allow registering at-fork handlers
* Address Serhiy's comments
* Add doc for new C API
* Add doc for new Python-facing function
* Add NEWS entry + doc nit
2017-05-27 17:50:54 +02:00
Xavier de Gaye
3a4e989324
Issue #28759 : Fix the tests that fail with PermissionError when run as
...
a non-root user on Android where access rights are controled by SELinux MAC.
2016-12-13 10:00:01 +01:00
Xavier de Gaye
24c3b4928e
Issue #26944 : Fix test_posix for Android where 'id -G' is entirely wrong
...
or missing the effective gid.
2016-10-19 11:00:26 +02: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
Serhiy Storchaka
e437a10d15
Issue #23277 : Remove unused imports in tests.
2016-04-24 21:41:02 +03:00
Serhiy Storchaka
7155b881f2
Issue #26671 : Fixed tests for changed error messages.
2016-04-08 08:48:20 +03: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
Serhiy Storchaka
7e9d1d1a1b
Issue #23908 : os functions now reject paths with embedded null character
...
on Windows instead of silently truncate them.
Removed no longer used _PyUnicode_HasNULChars().
2015-04-20 10:12:28 +03:00
Serhiy Storchaka
2b0d2007a1
Issue #23908 : os functions now reject paths with embedded null character
...
on Windows instead of silently truncate them.
2015-04-20 09:53:58 +03:00
Serhiy Storchaka
c74bb9d350
Issue #23842 : Added tests for os.major(), os.minor() and os.makedev().
2015-04-20 09:23:21 +03:00
Serhiy Storchaka
16b2e4f548
Issue #23842 : Added tests for os.major(), os.minor() and os.makedev().
2015-04-20 09:22:13 +03:00
Victor Stinner
d577cea8ab
Merge 3.4
2014-10-05 17:38:45 +02:00
Victor Stinner
bed04a77ee
cleanup test_posix
2014-10-05 17:37:59 +02:00
Victor Stinner
047b7ae566
Issue #22390 : Remove files created by tests
2014-10-05 17:37:41 +02: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
Jesus Cea
61f32cb5b8
Closes #11279 : test_posix and lack of "id -G" support - less noise required? (Solaris)
2014-06-28 18:39:35 +02:00
Ned Deily
04cdfa1147
Issue #21811 : Anticipated fixes to 3.x and 2.7 for OS X 10.10 Yosemite.
2014-06-25 13:36:14 -07:00
Benjamin Peterson
24a945cc6b
merge 3.3 ( #20249 )
2014-03-01 19:14:48 -05:00
Benjamin Peterson
659a6f562b
fix test_posix.test_initgroups to work without supplemental groups ( closes #20249 )
2014-03-01 19:14:12 -05:00
Larry Hastings
b082731fbb
Issue #20517 : Functions in the os module that accept two filenames
...
now register both filenames in the exception on failure.
This required adding new C API functions allowing OSError exceptions
to reference two filenames instead of one.
2014-02-09 22:05:19 -08:00
Serhiy Storchaka
f28ba369dd
Issue #20532 : Tests which use _testcapi now are marked as CPython only.
2014-02-07 10:10:55 +02:00