summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.rst
Commit message (Collapse)AuthorAgeFilesLines
* gh-127688: Add `SCHED_DEADLINE` and `SCHED_NORMAL` constants to `os` module ↵RUANG (James Roy)2024-12-191-0/+12
| | | | (GH-127689)
* Python 3.14.0a2v3.14.0a2Hugo van Kemenade2024-11-191-1/+1
|
* gh-125298: Remove misleading text in os.kill documentation (GH-125749)RUANG (James Roy)2024-11-081-2/+1
| | | Windows has not accepted process handles in many releases.
* gh-120057: Add os.reload_environ() function (#126268)Victor Stinner2024-11-051-9/+24
| | | | | | | Replace the os.environ.refresh() method with a new os.reload_environ() function. Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-126055: Add omitted command (in docs [os.walk]) for code to fulfill ↵Victor Wheeler2024-10-301-0/+1
| | | | | | | | | `shutil.rmtree` algorithm (GH-126067) * gh-126055: Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm. Resolves #126055 * gh-126055: Fix omitted code highlighting
* Doc: Fix pluralization in os.process_cpu_count() documentation (#125678)Tom Most2024-10-201-1/+1
|
* gh-123014: Disable pidfd API on older Android versions (#124458)Malcolm Smith2024-09-251-1/+1
|
* gh-116622: Complete Android documentation (#124259)Malcolm Smith2024-09-231-43/+43
| | | | | Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: T. Wouters <thomas@python.org> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-123517: Remove unnecessary ``:meth:`` parentheses (#123518)Wei-Hsiang (Matt) Wang2024-09-011-2/+2
|
* gh-123492: Remove unnecessary `:func:` parentheses (#123493)Wei-Hsiang (Matt) Wang2024-08-301-6/+6
|
* GH-109975: Copyedit 3.13 What's New: Improved Modules (#123132)Adam Turner2024-08-241-0/+2
| | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Docs: spelling and grammar fixes (#122084)Ville Skyttä2024-07-221-3/+3
| | | | | | Corrected some grammar and spelling issues in documentation. Co-authored-by: Russell Keith-Magee <russell@keith-magee.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Docs: Add `os.splice` flags argument (#109847)Amin Alaee2024-07-031-1/+20
| | | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Blaise Pabon <blaise@gmail.com>
* gh-120743: Soft deprecate os.popen() function (#120744)Victor Stinner2024-07-011-1/+9
| | | Soft deprecate os.popen() and os.spawn*() functions.
* gh-120057: Add os.environ.refresh() method (#120059)Victor Stinner2024-06-101-0/+11
|
* Format None, True, False and NotImplemented as literals (GH-118758)Serhiy Storchaka2024-05-081-2/+2
|
* docs: module page titles should not start with a link to themselves (#117099)Ned Batchelder2024-05-081-2/+2
|
* gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488)Steve Dower2024-05-021-0/+7
|
* docs: typo: tiny grammar change: "pointed by" -> "pointed to by" (#118411)Andrew Zipperer2024-05-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * docs: tiny grammar change: "pointed by" -> "pointed to by" This commit uses "file pointed to by" to replace "file pointed by" in - doc for shutil.copytree - docstring for shutil.copytree - docstring _abc.PathBase.open - docstring for pathlib.Path.open - doc for os.copy_file_range - doc for os.splice The docs use "file pointed to by" more frequently than "file pointed by". So, this commit replaces the uses of "file pointed by" in order to make the uses consistent through the docs. ```bash $ grep -ri 'pointed to by' cpython/ ``` yields more results than ```bash $ grep -ri 'pointed by' cpython/ ``` Separately: There are two occurrences of "tree pointed by": - cpython/Doc/library/xml.etree.elementtree.rst for `xml.etree.ElementInclude.include` - cpython/Lib/xml/etree/ElementInclude.py for `include` For those uses of "tree pointed by", I expect "tree pointed to by" instead. However, I found enough uses online of (a) "tree pointed by" rather than (b) "tree pointed to by" to convince me that (a) is in common use. So, this commit does not replace those occurrences of "tree pointed by" to "tree pointed to by". But I will replace them if a reviewer believes it is correct to replace them. * docs: typo: "exists and executable" -> "exists and is executable" --------- Co-authored-by: Andrew-Zipperer <atzipperer@gmail.com>
* gh-117977: Amend version changed annotation for os.chmod, os.chown, and ↵Nice Zombies2024-04-171-3/+3
| | | | os.listdir (#117978)
* gh-114099: Add documentation for iOS platform (GH-117057)Russell Keith-Magee2024-03-281-126/+125
| | | | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Jacob Coffee <jacob@z7x.org> Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Ned Deily <nad@python.org>
* gh-114099: Additions to standard library to support iOS (GH-117052)Russell Keith-Magee2024-03-281-0/+5
| | | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Malcolm Smith <smith@chaquo.com> Co-authored-by: Ned Deily <nad@python.org>
* gh-115664: Fix ordering of more versionadded and versionchanged directives ↵Serhiy Storchaka2024-03-071-23/+17
| | | | (GH-116298)
* gh-85984: Add POSIX pseudo-terminal functions. (GH-102413)Soumendra Ganguly2024-01-291-0/+59
| | | | | Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* Docs: align usage of versionadded/versionchanged with recommended practice ↵Erlend E. Aasland2024-01-221-45/+46
| | | | | | (#114409) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-113536: Expose `os.waitid` on macOS (#113542)Ronald Oussoren2024-01-011-3/+3
| | | | | | | | | * gh-113536: Expose `os.waitid` on macOS This API has been available on macOS for a long time, but was explicitly excluded due to unspecified problems with the API in ancient versions of macOS. * Document that the API is available on macOS starting in Python 3.13
* Doc/library/os.rst: `os.waitid` absent on MacOS (#104558)John Hawkinson2023-12-281-0/+3
| | | | | * Doc/library/os.rst: `os.waitid` absent on MacOS Co-authored-by: AN Long <aisk@users.noreply.github.com>
* gh-113191: Add support of os.fchmod() on Windows (GH-113192)Serhiy Storchaka2023-12-241-2/+6
| | | | Also support a file descriptor in os.chmod().
* gh-113117: Support posix_spawn in subprocess.Popen with close_fds=True (#113118)Jakub Kulík2023-12-171-2/+13
| | | | | | | | Add support for `os.POSIX_SPAWN_CLOSEFROM` and `posix_spawn_file_actions_addclosefrom_np` and have the `subprocess` module use them when available. This means `posix_spawn` can now be used in the default `close_fds=True` situation on many platforms. Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* gh-113119 fix environment handling in subprocess.Popen when posix_spawn is ↵Jakub Kulík2023-12-171-1/+5
| | | | | | | used (#113120) * Allow posix_spawn to inherit environment form parent environ variable. With this change, posix_spawn call can behave similarly to execv with regards to environments when used in subprocess functions.
* gh-105912: document gotcha with using os.fork on macOS (#112871)Ronald Oussoren2023-12-141-0/+10
| | | | | | | | | | | | | * gh-105912: document gotcha with using os.fork on macOS Using ``fork(2)`` on macOS when also using higher-level system APIs in the parent proces can crash on macOS because those system APIs are not written to handle this usage pattern. There's nothing we can do about this other than documenting the problem. Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* gh-59616: Support os.chmod(follow_symlinks=True) and os.lchmod() on Windows ↵Serhiy Storchaka2023-12-141-1/+8
| | | | (GH-113049)
* gh-107959: clarify Unix-availability of `os.lchmod()` (GH-107960)Christoph Anton Mitterer2023-12-131-1/+4
| | | | | | | | | | | | | | | | POSIX specifies that implementations are not required to support changing the file mode of symbolic links, but may do so. Consequently, `lchmod()` is not part of POSIX (but mentioned for implementations which do support the above). The current wording of the availability of `os.lchmod()` is rather vague and improved to clearly tell which POSIX/Unix/BSD-like support the function in general (those that support changing the file mode of symbolic links). Further, some examples of major implementations are added. Data for the BSDs taken from their online manpages. Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-101100: Fix Sphinx warning in references with asterisks (#113029)Hugo van Kemenade2023-12-131-4/+4
| | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-110631: Fix reST indentation (#110724)Ezio Melotti2023-10-111-6/+6
| | | | | * Fix wrong indentation in the other dirs. * Fix more wrong indentation.
* gh-109595: Add -Xcpu_count=<n> cmdline for container users (#109667)Donghee Na2023-10-101-0/+7
| | | | | | --------- Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* gh-108277: Add os.timerfd_create() function (#108382)Masaru Tsuchiyama2023-10-071-0/+211
| | | | | | | | Add wrapper for timerfd_create, timerfd_settime, and timerfd_gettime to os module. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-109649: Add os.process_cpu_count() function (#109907)Victor Stinner2023-09-301-7/+24
| | | | | | | | | * Refactor os_sched_getaffinity_impl(): move variable definitions to their first assignment. * Fix test_posix.test_sched_getaffinity(): restore the old CPU mask when the test completes! * Doc: Specify that os.cpu_count() counts *logicial* CPUs. * Doc: Specify that os.sched_getaffinity(0) is related to the calling thread.
* gh-109634: Use :samp: role (GH-109635)Serhiy Storchaka2023-09-231-2/+2
|
* gh-100228: Document the os.fork threads DeprecationWarning. (#109767)Gregory P. Smith2023-09-231-4/+32
| | | | | | | | Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs. Many reviews and doc cleanup edits by Adam & Hugo. 🥳 Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-107924: re-order os.sendfile() flag documentation (#107926)Christoph Anton Mitterer2023-09-071-19/+20
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Docs: Remove links to external C functions and macros in os.rst (#108138)Erlend E. Aasland2023-08-191-25/+27
| | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-107801: Improve the accuracy of os.lseek docs (#107935)Erlend E. Aasland2023-08-181-6/+11
| | | | | | | | - name the last parameter *whence*, like it is for seek() methods on file objects - add param docstrings - structure the valid *whence* params Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-107801: Improve the docs of the SEEK_* constants (#108099)Erlend E. Aasland2023-08-171-4/+14
|
* gh-107801: Document SEEK_HOLE and SEEK_DATA (#107936)Erlend E. Aasland2023-08-171-2/+27
| | | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Antoine Pitrou <antoine@python.org>
* gh-107091: Fix some uses of :const: role (GH-107379)Serhiy Storchaka2023-07-281-2/+2
| | | It is for references, not for literals.
* gh-107091: Fix some uses of :c:type: role (GH-107138)Serhiy Storchaka2023-07-261-6/+6
|
* Document that `os.link()` is not available on Emscripten (GH-104822)Roman Yurchak2023-07-261-1/+1
|
* gh-106948: Docs: Disable links for C standard library functions, OS utility ↵Erlend E. Aasland2023-07-231-3/+3
| | | | | functions and system calls (#107062) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-106948: Add standard external names to nitpick_ignore (GH-106949)Serhiy Storchaka2023-07-221-1/+1
| | | | | It includes standard C types, macros and variables like "size_t", "LONG_MAX" and "errno", and standard environment variables like "PATH".