Commit Graph

435 Commits

Author SHA1 Message Date
Kyle Stanley 0717b4d9b3 bpo-37478: Specify possible exceptions for os.chdir() (GH-14611) 2019-07-06 21:20:15 -04:00
Tim Hoffmann a55f75a6e3 Use OSError subclasses in os documentation (GH-14262) 2019-07-05 11:41:35 +03:00
Steve Dower 44f91c388a
bpo-37390: Add audit event table to documentations (GH-14406)
Also updates some (unreleased) event names to be consistent with the others.
2019-06-27 10:47:59 -07:00
Victor Stinner 689830ee62
bpo-37412: os.getcwdb() now uses UTF-8 on Windows (GH-14396)
The os.getcwdb() function now uses the UTF-8 encoding on Windows,
rather than the ANSI code page: see PEP 529 for the rationale. The
function is no longer deprecated on Windows.

os.getcwd() and os.getcwdb() now detect integer overflow on memory
allocations. On Unix, these functions properly report MemoryError on
memory allocation failure.
2019-06-26 17:31:12 +02:00
Steve Dower 60419a7e96
bpo-37363: Add audit events for a range of modules (GH-14301) 2019-06-24 08:42:54 -07:00
Victor Stinner ccf0efbb21 bpo-26836: Document os.memfd_create() name parameter (GH-13838)
https://bugs.python.org/issue26836
2019-06-05 03:24:52 -07:00
Pablo Galindo aac4d0342c
bpo-26826: Expose copy_file_range in the os module (GH-7255) 2019-05-31 19:39:47 +01:00
Zackery Spytz 43fdbd2729 bpo-26836: Add os.memfd_create() (#13567)
* bpo-26836: Add os.memfd_create()

* Use the glibc wrapper for memfd_create()

Co-Authored-By: Christian Heimes <christian@python.org>

* Fix deletions caused by autoreconf.

* Use MFD_CLOEXEC as the default value for *flags*.

* Add memset_s to configure.ac.

* Revert memset_s changes.

* Apply the requested changes.

* Tweak the docs.
2019-05-29 21:57:03 +02:00
Steve Dower b82e17e626
bpo-36842: Implement PEP 578 (GH-12613)
Adds sys.audit, sys.addaudithook, io.open_code, and associated C APIs.
2019-05-23 08:45:22 -07:00
pxinwr f2d7ac7e5b bpo-31904: Add posix module support for VxWorks (GH-12118) 2019-05-21 12:46:37 +02:00
Cheryl Sabella e152169da9 bpo-16024: Doc cleanup regarding path_fd, dir_fd, follow_symlinks (GH-5505) 2019-05-06 08:39:13 -04:00
Vidar Tonaas Fauske 0e10766574 bpo-31512: Add non-elevated symlink support for Windows (GH-3652) 2019-04-09 11:19:46 -07:00
Steve Dower 2438cdf0e9
bpo-36085: Enable better DLL resolution on Windows (GH-12302) 2019-03-29 16:37:16 -07:00
Mark Williams 8b50400fbe bpo-36170: posix_spawn doesn't exist on 3.7 (GH-12143)
The 3.8 docs claim that `os.posix_spawn` was introduced in 3.7, but it wasn't; it will be introduced in 3.8.
2019-03-03 12:42:25 -05: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
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
l-n-s daeb3c4c58 Fix doc typo: Window -> Windows (GH-10508) 2018-11-13 16:13:12 -08:00
Serhiy Storchaka 3f819ca138
bpo-35110: Fix unintentional spaces around hyphens and dashes. (GH-10231) 2018-10-31 02:26:06 +02:00
Serhiy Storchaka 913876d824
bpo-35054: Add yet more index entries for symbols. (GH-10121) 2018-10-28 13:41:26 +02:00
Serhiy Storchaka ddb961d2ab
bpo-35054: Add more index entries for symbols. (GH-10064) 2018-10-26 09:00:49 +03:00
Cheryl Sabella 2d6097d027 bpo-11233: Create availability directive for documentation (GH-9692)
Replace "Availability: xxx" with ".. availability:: xxx" in the doc.
Original patch by Georg Brandl.

Co-Authored-By: Georg Brandl <georg@python.org>
2018-10-12 16:55:20 +02: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
Berker Peksag e0b5b2096e
bpo-34384: Fix os.readlink() on Windows (GH-8740)
os.readlink() now accepts path-like and bytes objects on Windows.
Previously, support for path-like and bytes objects was only
implemented on Unix.

This commit also merges Unix and Windows implementations of
os.readlink() in one function and adds basic unit tests to increase
test coverage of the function.
2018-08-15 13:03:41 +03:00
Pablo Galindo 02e2a085dc bpo-31368: Enhance os.preadv() documentation (GH-7254) 2018-05-31 01:00:04 +02:00
Steve Dower 3e51a3d592
bpo-32878: Adds documentation for st_ino on Windows (GH-5764) 2018-05-28 17:24:36 -07: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
Stéphane Wirtel 7508a54c77 bpo-20709: os.utime(path_to_directory): wrong documentation for Windows. (GH-5469)
Remove the paragraph where we explain that os.utime() does not support a
directory as path under Windows. Patch by Jan-Philip Gehrcke

Co-authored-by: Jan-Philip Gehrcke <jgehrcke@gmail.com>
2018-05-01 12:02:26 +02:00
Pablo Galindo d6ef6db9ff Fix rendering issues in the documentation for the os module (#6525) 2018-04-25 20:48:27 +03:00
Andrés Delfino badb894bbb closes bpo-33202: fix os.walk mentioning os.listdir instead of os.scandir (GH-6335) 2018-04-02 19:48:54 -07:00
Gregory P. Smith 79760ed256
bpo-20104: Add os.posix_spawn documentation. (#6334) 2018-04-01 12:01:48 -07:00
jcea 6c51d51880
bpo-32659: Solaris "stat" should support "st_fstype" (#5307)
* bpo-32659: Solaris "stat" should support "st_fstype"

* Add 'versionadded'
2018-01-28 14:00:08 +01:00
Pablo Galindo 4defba3b95 bpo-31368: Expose preadv and pwritev in the os module (#5239) 2018-01-27 17:16:37 +01:00
Barry Warsaw d499031f5f
bpo-32651 Recommend getpass.getuser() (#5301)
* bpo-32651 - In the documentation for os.getlogin(), recommend getpass.getuser()
2018-01-24 12:51:29 -05:00
Benjamin Peterson bbdb17d19b
return the new file descriptor from os.dup2 (closes bpo-32441) (#5041) 2017-12-29 13:13:06 -08:00
Giuseppe Scrivano 96a5e50a5d bpo-32143: add f_fsid to os.statvfs() (#4571)
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2017-12-14 17:46:46 -05:00
Victor Stinner 01b5aab7bf bpo-31827: Remove os.stat_float_times() (GH-4061) 2017-10-24 02:02:00 -07: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
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
Berker Peksag d4d48743ac Tweak PEP 519 documentation in stdlib (#163)
* Drop duplicate work 'object' in lzma docs
* Fix typo in os docs: fpr -> for
2017-02-19 03:17:35 +03:00
Xiang Zhang 4459e009ed Issue #29092: Sync os.stat's doc and docstring on path type. 2017-01-22 13:04:17 +08:00
Xiang Zhang d7d87ca9b0 Issue #29092: Sync os.stat's doc and docstring on path type. 2017-01-22 12:54:44 +08:00
Serhiy Storchaka 3c38e066b1 Issue #27998: Documented bytes paths support on Windows. 2016-11-20 08:23:07 +02:00
Serhiy Storchaka 989db5c880 Issue #19795: Mark up None as literal text. 2016-10-19 16:37:13 +03:00
Serhiy Storchaka ecf41da83e Issue #19795: Mark up None as literal text. 2016-10-19 16:29:26 +03:00
Berker Peksag 8d08265f5e Merge from 3.5 2016-09-26 22:50:32 +03:00
Berker Peksag 6129e14b21 Document that os.mknod() is not available on Windows
Reported by Regina Ochotzki on docs@p.o.
2016-09-26 22:50:11 +03:00