gh-106318: Add example for `str.endswith()` (GH-134523)
(cherry picked from commit eed827ed09)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Fix presentation of dataclasses' `unsafe_hash` default value (GH-116532)
(cherry picked from commit 71f5fafdfb)
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
gh-134976: document the exception type that can be raised by `s[i]` (GH-134977)
(cherry picked from commit 158e5162bf)
Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.
For precision, add the exact list of types that may be contained in an
ast.Constant.
(cherry picked from commit 381020d41f)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This adds a warning about the possibly-missing NUL terminator, but in a way
that doesn't make it sound like a bug/wart.
(cherry picked from commit b783e1791b)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Update outdated statement from `math` about C standard (GH-134621)
(cherry picked from commit 21672b694b)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
gh-134789: Document del s[i] operation for mutable sequences (GH-134804)
[main] Update stdtypes.rst
- Added explicit mention of `del s[i]` (item deletion by index) to the Mutable Sequence Types section.
- Clarified that this operation removes the item at the specified index from the sequence.
- Addresses issue GH-134789.
(cherry picked from commit 967f361993)
Co-authored-by: Rishabh Singh <67859818+rishabh11336@users.noreply.github.com>
gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462)
Doc/library/multiprocessing.rst: freeze_support: Change to specify spawn method instead of platform
Have multiprocessing.freeze_support() enable on spawn, not just win32.
---------
(cherry picked from commit 80284b5c5e)
Co-authored-by: Eddy Mulyono <eddymul@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372)
Added a clarification that the underlying binary buffer of a TextIOBase can be a BufferedIOBase OR a RawIOBase
(cherry picked from commit 36eb711d2f)
Co-authored-by: Alex Kautz <alex@takemobi.com>
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)
(cherry picked from commit a31bbc951a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288)
Explain history of de-facto standard and how to pick between the two Base-85 encoding functions in the base-64 module.
---------
(cherry picked from commit 66aaad6103)
Co-authored-by: Alek Binion <aleksander.binion@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
In 3.13.3 we accidentally broke the interface for custom task factory. Factory authors added workarounds.
This PR (for 3.13.4) unbreaks task factories that haven't made a workaround yet while also supporting those that have.
NOTE: The custom task factory API will change to what we accidentally released in 3.13.3.
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
gh-134150: Clarify distinction between JSON and Python objects (GH-134154)
* gh-134150: Clarify distinction between JSON objects and Python objects in json module docs
* Revert change to JSON introduction
* Clarify occurrences of "object literal" as JSON
(cherry picked from commit fa4e088668)
Co-authored-by: Micha Albert <micha@2231puppy.tech>
The code was changed in 0f7cddc308 (bpo-839496/gh-39531).
(cherry picked from commit ea2d707bd5)
Co-authored-by: Saleh Dehqanpour <salehdeh76@gmail.com>
gh-133286: add explanation about `seq` for pathlib Pattern Language (GH-133340)
(cherry picked from commit ac8df4b589)
Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
gh-133986: Document string split algorithm when sep is None and maxsplit is 0 (GH-133987)
---------
(cherry picked from commit 3e23047363)
Co-authored-by: Joey Smith <joeysmith@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
gh-132642: document how to render human-readable `timedelta` objects (GH-133825)
(cherry picked from commit efcc42ba70)
Co-authored-by: Kentaro Jay Takahashi <64148935+KentaroJay@users.noreply.github.com>
gh-133361: move the explanation of dict equal before its use (GH-133424)
Also move up the explanation of insertion order preservation. Both paragraphs seemed out of place down where they were.
---------
(cherry picked from commit 61ac88c06e)
Co-authored-by: Yongzi Li <1538321957@qq.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
gh-130117: Document why nested `Union`, `Literal`, and `Annotated` types referenced through a type alias are not flattened (GH-130119)
(cherry picked from commit b936ccdb6f)
Co-authored-by: Valentin Berlier <berlier.v@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
gh-133089: Use original timeout value for `TimeoutExpired` when the func `subprocess.run` is called with a timeout (GH-133103)
(cherry picked from commit 2bbcaedb75)
Signed-off-by: Manjusaka <me@manjusaka.me>
Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
Co-authored-by: Gregory P. Smith <greg@krypto.org>