Commit graph

13719 commits

Author SHA1 Message Date
Miss Islington (bot)
c260ed15d1
[3.13] gh-106318: Add example for str.endswith() (GH-134523) (#135460)
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>
2025-06-13 15:13:59 +03:00
Miss Islington (bot)
db408a484c
[3.13] gh-106318: Add example for str.encode() (GH-134520) (#135458)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-13 14:46:14 +03:00
Miss Islington (bot)
9a10b734f1
[3.13] Fix presentation of dataclasses' unsafe_hash default value (GH-116532) (#135417)
Some checks failed
Tests / Change detection (push) Has been cancelled
Lint / lint (push) Has been cancelled
Tests / (push) Has been cancelled
Tests / Windows MSI (push) Has been cancelled
Tests / Docs (push) Has been cancelled
Tests / Check if the ABI has changed (push) Has been cancelled
Tests / Check if Autoconf files are up to date (push) Has been cancelled
Tests / Check if generated files are up to date (push) Has been cancelled
Tests / Ubuntu SSL tests with OpenSSL (push) Has been cancelled
Tests / WASI (push) Has been cancelled
Tests / Hypothesis tests on Ubuntu (push) Has been cancelled
Tests / Address sanitizer (push) Has been cancelled
Tests / CIFuzz (push) Has been cancelled
Tests / All required checks pass (push) Has been cancelled
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>
2025-06-12 01:37:30 +00:00
Miss Islington (bot)
8c28241f0d
[3.13] Use f-strings in csv docs example (GH-135245) (#135286)
Some checks are pending
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
Use f-strings in csv docs example (GH-135245)
(cherry picked from commit 2677dd017a)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2025-06-09 06:41:03 +00:00
Miss Islington (bot)
b13720ee22
[3.13] gh-135263: Fix typo in token.NAME documentation (GH-135275) (#135281)
gh-135263: Fix typo in token.NAME documentation (GH-135275)
(cherry picked from commit 8d17a412da)

Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.com>
2025-06-08 17:55:12 -04:00
Miss Islington (bot)
47a828e5d3
[3.13] gh-134976: document the exception type that can be raised by s[i] (GH-134977) (#135259)
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>
2025-06-08 14:37:55 +02:00
Thomas Wouters
8a526ec7cb Python 3.13.4 2025-06-03 17:34:24 +02:00
T. Wouters
aa9eb5f757
[3.13] gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') (GH-135037) (GH-135064)
Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.
(cherry picked from commit 3612d8f517)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Signed-off-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-03 15:59:54 +02:00
Miss Islington (bot)
7e2ebdbe9c
[3.13] gh-74232: Add a note about roundtrip of non-float numerics in CSV (GH-134963) (GH-135049)
(cherry picked from commit e814f43f2c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-02 20:39:01 +00:00
Bénédikt Tran
11f7270e8f
[3.13] gh-122153: indicate that Windows does not support socket.{send,recv}_fds (GH-134960) (#135017)
This amends commit e3b6ff19aa.
(cherry picked from commit 128195e12e)

Co-authored-by: GalaxySnail <me@glxys.nl>
2025-06-02 10:44:39 +00:00
Miss Islington (bot)
0446628697
[3.13] gh-133503: clarify compileall -s/-p docs (GH-134756) (#134996)
gh-133503: clarify `compileall -s/-p` docs (GH-134756)
(cherry picked from commit fe6f8a3619)

Co-authored-by: Rihaan Meher <meherrihaan@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-01 08:27:26 +00:00
Miss Islington (bot)
366a7902a0
[3.13] gh-134918: Fix and improve doctest's documentation (GH-134919) (GH-134967)
(cherry picked from commit 3c66e59766)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-31 09:09:07 +00:00
Miss Islington (bot)
19b31d10c2
[3.13] GH-106235: Clarify parse_known_args documentation by removing "remaining" (GH-126921) (#134914)
GH-106235: Clarify `parse_known_args` documentation by removing "remaining" (GH-126921)
(cherry picked from commit a4251411a9)

Co-authored-by: Savannah Bailey <savannahostrowski@gmail.com>
2025-05-30 13:24:22 -07:00
Miss Islington (bot)
7c5a1ea9f6
[3.13] gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-134925) (GH-134941)
Optional None values are always omitted.
(cherry picked from commit 1a89991d23)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-30 19:30:26 +03:00
Miss Islington (bot)
f4b8cd5510
[3.13] ast docs: Fix description of ast.Constant (GH-134741) (#134912)
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>
2025-05-30 04:19:04 +00:00
Miss Islington (bot)
aebb4eab45
[3.13] gh-69011: : clarify & deduplicate ctypes.create_*_buffer docs (GH-132858) (GH-134882)
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>
2025-05-29 13:22:33 +00:00
Miss Islington (bot)
8e60e6ca84
[3.13] gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-134818) (GH-134824)
(cherry picked from commit 7be5916f6d)
2025-05-28 12:32:57 +00:00
Miss Islington (bot)
956490b8a5
[3.13] Update outdated statement from math about C standard (GH-134621) (#134826)
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>
2025-05-28 07:36:24 +00:00
Miss Islington (bot)
73e432896b
[3.13] gh-134789: Document del s[i] operation for mutable sequences (GH-134804) (#134809)
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>
2025-05-27 18:54:16 +00:00
Miss Islington (bot)
a5f281f4e4
[3.13] gh-134664: document cleanup_socket parameter in asyncio.start_unix_server (GH-134750) (#134780)
gh-134664: document `cleanup_socket` parameter in `asyncio.start_unix_server` (GH-134750)
(cherry picked from commit 92ea1eb38f)

Co-authored-by: Shamil <ashm.tech@proton.me>
2025-05-27 14:04:29 +05:30
Miss Islington (bot)
b31d46e880
[3.13] gh-134559: Add versionadded for `object.__replace__()` (GH-134672) (#134700)
gh-134559: Add versionadded for ``object.__replace__()`` (GH-134672)
(cherry picked from commit 71290a6fbe)

Co-authored-by: tmlnv <108088921+tmlnv@users.noreply.github.com>
2025-05-26 10:29:53 +00:00
Miss Islington (bot)
44d184984d
[3.13] gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462) (#134620)
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>
2025-05-24 04:13:37 +00:00
Miss Islington (bot)
1dbb644a5b
[3.13] gh-106318: Add example for str.count() (GH-134519) (#134573)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
2025-05-23 09:53:19 +00:00
Miss Islington (bot)
5b203f511b
[3.13] gh-106318: Add example for str.center() (GH-134518) (#134572)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
2025-05-23 09:50:17 +00:00
Miss Islington (bot)
b212653049
[3.13] Avoid __file__ in hashlib example (GH-134540) (#134550)
Avoid `__file__` in `hashlib` example (GH-134540)
(cherry picked from commit 9b292ff022)

Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
2025-05-22 21:38:04 +00:00
Gregory P. Smith
5ecc39e9f4
[3.13] gh-80050: Update BufferedReader.read docs around non-blocking (GH-130653) (#134445)
(cherry picked from commit e1f891414b)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 17:07:03 +00:00
Miss Islington (bot)
fcebf5aebf
[3.13] gh-110631: Fix some incorrect indents in the documentation (GH-129312) (#134420)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-21 14:00:13 +00:00
Miss Islington (bot)
7df6749219
[3.13] gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372) (#134375)
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>
2025-05-20 12:28:09 -07:00
Hugo van Kemenade
61af847d41
[3.13] gh-101100: Fix Sphinx warnings in library/decimal.rst (GH-134303) (#134339)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-20 17:55:23 +03:00
Miss Islington (bot)
0c0fedf289
[3.13] gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069) (GH-134329)
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>
2025-05-20 12:17:10 +00:00
Miss Islington (bot)
edbde92a12
[3.13] gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288) (#134297)
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>
2025-05-20 00:05:26 +00:00
Miss Islington (bot)
55a7cb1206
[3.13] gh-122055: Clarify documentation for empty matches in RE (GH-133169) (GH-134218)
(cherry picked from commit 44b73d3cd4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-19 16:49:29 +03:00
Thomas Grainger
fd6a602d04
[3.13] gh-133745: Fix asyncio task factory name/context kwarg breaks (#133948)
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>
2025-05-18 06:50:07 -07:00
Miss Islington (bot)
ebe54d7ab7
[3.13] gh-134150: Clarify distinction between JSON and Python objects (GH-134154) (#134167)
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>
2025-05-18 01:53:37 +00:00
Miss Islington (bot)
ec42d72f47
[3.13] Docs: fix spelling of "test case" in unittest documentation (GH-134137) (#134139)
Docs: fix spelling of "test case" in `unittest` documentation (GH-134137)
(cherry picked from commit b41d79c776)

Co-authored-by: Clifford Gama <53076065+cliff688@users.noreply.github.com>
2025-05-17 14:03:58 +02:00
Miss Islington (bot)
4291bbe88b
[3.13] gh-117026: Remove outdated sentence in SimpleHTTPRequestHandler docs (GH-117027) (GH-134108)
The code was changed in 0f7cddc308 (bpo-839496/gh-39531).
(cherry picked from commit ea2d707bd5)

Co-authored-by: Saleh Dehqanpour <salehdeh76@gmail.com>
2025-05-16 22:24:05 +03:00
Miss Islington (bot)
8077e2268c
[3.13] gh-133286: add explanation about seq for pathlib Pattern Language (GH-133340) (#134106)
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>
2025-05-16 20:20:53 +01:00
Miss Islington (bot)
2a029a7d79
[3.13] gh-133515: fix docs for unawaited coroutines in debug mode (GH-134081) (#134094)
gh-133515: fix docs for unawaited coroutines in debug mode (GH-134081)
(cherry picked from commit d94b1e9cac)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-16 15:38:22 +00:00
Miss Islington (bot)
0007c9b505
[3.13] gh-124210: Add introduction to threading docs (GH-127046) (#134091)
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-16 12:25:22 +00:00
Miss Islington (bot)
bd3add06f6
[3.13] gh-133986: Document string split algorithm when sep is None and maxsplit is 0 (GH-133987) (#133992)
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>
2025-05-14 21:33:38 -04:00
Miss Islington (bot)
05ddd06624
[3.13] gh-133413: Fix references to removed Request.has_data (GH-133414) (GH-133946)
The has_data() method of http.request.Request
was removed in version 3.4.
(cherry picked from commit 86c1d439e0)

Co-authored-by: ppaez <pp@pp.com.mx>
2025-05-12 18:25:25 +00:00
mkaraev
532acbd0fa
[3.13] gh-133904: Fix math.factorial documentation (GH-133907) (#133922)
* [3.13] gh-133904: Fix `math.factorial` documentation (GH-133907)
(cherry picked from commit 27ed64575d)

Co-authored-by: mkaraev <maruf.karaev97@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-12 12:17:17 +00:00
Miss Islington (bot)
18501a11e0
[3.13] gh-132642: document how to render human-readable timedelta objects (GH-133825) (#133836)
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>
2025-05-10 15:57:29 +00:00
Miss Islington (bot)
3de6546381
[3.13] gh-132971: Update shutil.which() docs (GH-133067) (#133804)
gh-132971: Update shutil.which() docs (GH-133067)
(cherry picked from commit d13d5fdf61)

Co-authored-by: Kokona <125976684+985025074@users.noreply.github.com>
2025-05-10 10:51:38 +02:00
Miss Islington (bot)
0a39a182cf
[3.13] Docs: use boolean constants for returning boolean value (GH-133325) (GH-133761)
(cherry picked from commit 076004ae54)

Co-authored-by: Yongzi Li <1538321957@qq.com>
2025-05-09 14:19:23 +00:00
Miss Islington (bot)
6beec6c813
[3.13] gh-133361: move the explanation of dict equal before its use (GH-133424) (#133621)
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>
2025-05-07 22:11:03 +00:00
Miss Islington (bot)
ce9d708e8c
[3.13] gh-131535: Fix stale example in html.parser docs, make examples doctests (GH-131551) (GH-133587)
(cherry picked from commit ee76e36d76)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
2025-05-07 20:33:23 +03:00
Miss Islington (bot)
fe18437089
[3.13] gh-130117: Document why nested Union, Literal, and Annotated types referenced through a type alias are not flattened (GH-130119) (#133488)
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>
2025-05-06 02:13:22 +00:00
Miss Islington (bot)
f371b23bab
[3.13] gh-107006: Move threading.local docstring to docs (GH-131840) (#133432)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-05 16:18:00 +03:00
Miss Islington (bot)
3d1b8e2a96
[3.13] gh-133089: Use original timeout value for TimeoutExpired when the func subprocess.run is called with a timeout (GH-133103) (#133418)
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>
2025-05-05 01:38:30 +00:00