Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
`functools.partial` docs: Use the more common spelling for "referenceable" (GH-113675)
(cherry picked from commit 4de468cce1)
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
gh-89414: Document that SIGCLD is not available on macOS (GH-113580)
Document that SIGCLD is not available on macOS
(cherry picked from commit f48a1bcb29)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Doc/library/os.rst: `os.waitid` absent on MacOS (GH-104558)
* Doc/library/os.rst: `os.waitid` absent on MacOS
(cherry picked from commit db1c882239)
Co-authored-by: John Hawkinson <jhawk@alum.mit.edu>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-74573: document that ndbm can silently corrupt databases on macOS (GH-113354)
* gh-74573: document that ndbm can silently corrupt databases on macOS
The system ndbm implementation on macOS has an undocumented limitation
on the size of values and can silently corrupt database files when those
are exceeded.
(cherry picked from commit 593b4d81d2)
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Fix typo in collections.abc docs example (GH-113310)
Calling the instance reference arg for the __next__ method, "next", seems misleading as it would normally just be "self"
(cherry picked from commit 22b8945d76)
Co-authored-by: David Greaves <david@dgreaves.com>
* 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.
(cherry picked from commit 22511f77c2)
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
gh-107959: clarify Unix-availability of `os.lchmod()` (GH-107960)
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.
(cherry picked from commit f14e3d59c9)
Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
[doc] Make subprocess.wait documentation more precise (GH-98700)
[doc] Make subprocess.wait doc more precise
An active loop is only used when the `timeout` parameter is used on
POSIX.
When no timeout is used, the code calls `os.waitpid` internally (which puts
the process on a sleep status). On Windows, the internal Windows API
call accepts a timeout parameter, so that is delegated to the OS.
(cherry picked from commit 81ab0e8a4a)
Co-authored-by: Luis Pedro Coelho <luis@luispedro.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Fix Sphinx warning in library/http.cookies.rst (GH-112908)
gh-101100: Improve documentation for attributes on instance methods (GH-112832)
(cherry picked from commit ed21d0c1f4)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-101100: Fix most Sphinx nitpicks in the glossary and `stdtypes.rst` (GH-112757)
(cherry picked from commit e3f670e137)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-101100: Fix many easily solvable Sphinx nitpicks in the datamodel docs (GH-112737)
(cherry picked from commit 2f20cafdbf)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-101100: Fix Sphinx warning in `library/gettext.rst` (GH-112668)
(cherry picked from commit 489aeac3a2)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-101100: Fix most Sphinx nitpicks in `inspect.rst` (GH-112662)
(cherry picked from commit 45650d1c47)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
[3.12] gh-112316: improve docs for `inspect.signature` and `inspect.Signature` (GH-112631) (GH-112649)
(cherry-picked from commit fc9e24b01f)
(cherry picked from commit 6221482f0c)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Docs: fix markup for `importlib.machinery.NamespaceLoader` (GH-112479)
(cherry picked from commit 2e632fa07d)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Backport PR #112477: correct socket AF_PACKET docs
Network byte order is not involved in the `int` on the Python side.
That happens under the hood.
Correctly use the term addresses instead of packets.
* Remove mention of "vsapi" element type from the documentation.
* Add tests for element_create() and other ttk.Style methods.
* Add examples for element_create() in the documentation.
(cherry picked from commit 005d1e8fc8)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
gh-101100: Define `_tkinter` module to fix references (GH-112382)
Define _tkinter module to fix references
(cherry picked from commit 6b961b8cea)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-101100: Define `test.regrtest` module to fix references (GH-112381)
Define test.regrtest module to fix references
(cherry picked from commit d525d01e27)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-59254: mention in open() doc that line buffering is for writing (GH-112318)
(cherry picked from commit fafae08cc7)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Fix docstring and var name of itertools recipe (GH-112113)
`prepend()` works with arbitrary iterables, not only iterators. In fact,
the example given uses a `list`, which is iterable, but not an iterator.
(cherry picked from commit 6c47eaccfa)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
gh-112165: Fix typo in `__main__.py` (GH-112183)
Change '[2]' to '[1]' to get second argument.
(cherry picked from commit 8cd70eefc7)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Fix locale.LC_CTYPE documentation to no longer mention string.lower() et al. Those functions were removed in Python 3.0:
https://docs.python.org/2/library/string.htmlGH-deprecated-string-functions
Also, fix a comment in logging about locale-specific behavior of `str.lower()`.
(cherry picked from commit 6d42759c5e)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Add a guide for how to handle non-UTF-8 text encodings.
Link to that guide from the 'text_factory' docs.
(cherry picked from commit 1262e41842)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Corvin <corvin@corvin.dev>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Remove no longer used functions run_unittest() and run_doctest() from
the test.support module.
(cherry picked from commit f6a45a03d0)
(cherry picked from commit 5c4f9a1c7e)
Revert "Fix a code snippet typo in asyncio docs (GH-108427)" (GH-111271)
This reverts commit 7f31676340.
The change resulted in a tautology and should not have been made. There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)
(cherry picked from commit c7d68f907a)
Ref: https://github.com/python/cpython/pull/108427#-issuecomment-1777525740
Co-authored-by: Zachary Ware <zach@python.org>
gh-101100: Fix Sphinx warnings in `library/tty.rst` (GH-111079)
Fix Sphinx warnings in library/tty.rst
(cherry picked from commit c42c68aa7b)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-110497: Add note about `OSError` being an alias to `IOError` in docs (GH-110498)
(cherry picked from commit 5e7edac771)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
[3.12] gh-109649: Enhance os.cpu_count() documentation (GH-110169)
* gh-109649: Enhance os.cpu_count() documentation
* Doc: Specify that os.cpu_count() counts *logicial* CPUs.
* Doc: Specify that os.sched_getaffinity(0) is related to the calling
thread.
* Fix test_posix.test_sched_getaffinity(): restore the old CPU mask
when the test completes!
* Restore removed text
(cherry picked from commit 5245b97e13)
Co-authored-by: Victor Stinner <vstinner@python.org>
As discussed in comments to GH-109544, the semantics of this attribute
are somewhat confusing. Add a note explaining its limitations and
steering users towards __required_keys__ and __optional_keys__ instead.
(cherry picked from commit f49958c886)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
gh-108973: Fix asyncio SubprocessProtocol doc (#109431)
SubprocessProtocol process_exited() method can be called before
pipe_data_received() and pipe_connection_lost() methods. Document it
and adapt the example in the doc.
Co-authored-by: Davide Rizzo <sorcio@gmail.com>
(cherry picked from commit ced6924630)
Co-authored-by: Colin Watson <cjwatson@debian.org>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gh-107755: Document the correct default value of slice step (GH-107756)
Document the correct default value of slice step.
(cherry picked from commit 9bf350b066)
Co-authored-by: wim glenn <hey@wimglenn.com>
GH-108202: Document ``calendar``'s command-line interface (GH-109020)
(cherry picked from commit f0f96a9f40)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
(cherry picked from commit 21da4980f5)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
gh-104372: Drop the GIL around the vfork() call. (#104782)
On Linux where the `subprocess` module can use the `vfork` syscall for
faster spawning, prevent the parent process from blocking other threads
by dropping the GIL while it waits for the vfork'ed child process `exec`
outcome. This prevents spawning a binary from a slow filesystem from
blocking the rest of the application.
Fixes#104372.
(cherry picked from commit d08679212d)
`ast` docs: Fix incorrect link on `keyword` (GH-108728)
In two places, Sphinx was erroneously adding links to the `keyword` module instead of the `ast.keyword` class
(cherry picked from commit c1e2f3b2f7)
Co-authored-by: Alex Povel <git@alexpovel.de>
Mention Ellipsis pickling in the docs (GH-103660)
(cherry picked from commit 14ec0bb7c3)
Co-authored-by: sterliakov <50529348+sterliakov@users.noreply.github.com>
(cherry picked from commit 8178a88bd8)
- Add param docstrings
- Link to os.SEEK_* constants
- Mention the return value in the initial paragraph
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>