Commit graph

30141 commits

Author SHA1 Message Date
Miss Islington (bot)
38f23604c1
[3.14] gh-115634: document ProcessPoolExecutor max_tasks_per_child bug (GH-140897) (#143302)
gh-115634: document ProcessPoolExecutor max_tasks_per_child bug (GH-140897)
(cherry picked from commit 04899b8539)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2025-12-30 23:29:56 +00:00
Miss Islington (bot)
acd2846b9b
[3.14] gh-130167: Add a What's New entry for changes to `textwrap.{de,in}dent` (GH-131924) (#143292)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-30 13:03:03 +00:00
Miss Islington (bot)
d951905ec9
[3.14] gh-143284: Temporarily install Sphinx<9 to fix Chinese search (GH-143286) (#143290)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-30 12:39:28 +00:00
Miss Islington (bot)
ed73d4f281
[3.14] gh-69686: Remove untrue part of __import__ replacement docs (GH-143261) (#143281)
gh-69686: Remove untrue part of `__import__` replacement docs (GH-143261)

Remove untrue part of `__import__` replacement docs

The original statement effectively says that replacing `__import__` at global scope affects import statements, and not only that, but only import statements within the rest of the executing module. None of that has been true since at least Python 2.7, I think.

This was likely missed in python/cpython#69686.
(cherry picked from commit 79c03ac001)

Co-authored-by: Thanos <111999343+Sachaa-Thanasius@users.noreply.github.com>
2025-12-30 05:22:38 +00:00
Miss Islington (bot)
6583951e7d
[3.14] gh-131421: Fix ASDL kw_defaults being expr* instead of expr?* (GH-133773) (GH-143269)
Also fix docs ASDL highlighting.
(cherry picked from commit f37f57dfe6)

Co-authored-by: Samuel <samuel@knutsen.co>
2025-12-29 12:09:11 +00:00
Miss Islington (bot)
44841574ad
[3.14] gh-142994, gh-142996: document missing async generator and coroutine field entries in inspect (GH-142997) (#143258)
gh-142994, gh-142996: document missing async generator and coroutine field entries in `inspect` (GH-142997)
(cherry picked from commit 0efbad60e1)

Co-authored-by: wangxiaolei <fatelei@gmail.com>
2025-12-28 18:09:00 +00:00
Miss Islington (bot)
4c3e2114b5
[3.14] gh-143241: Fix infinite loop in zoneinfo._common.load_data (GH-143243) (#143251)
gh-143241: Fix infinite loop in `zoneinfo._common.load_data` (GH-143243)

Correctly reject truncated TZif files in `ZoneInfo.from_file`.

---------
(cherry picked from commit 3ca1f2a370)

Co-authored-by: Fatih Çelik <fcelik.ft@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-28 15:14:04 +00:00
Pablo Galindo Salgado
892757f056
[3.14] gh-143228: Fix UAF in perf trampoline during finalization (GH-143233) (#143247) 2025-12-28 14:32:11 +00:00
Miss Islington (bot)
bae4cd6608
[3.14] no-issue: Fix override value in os.rst (gh-123522) (gh-143211) 2025-12-27 10:53:40 +00:00
Miss Islington (bot)
9316e4bb7e
[3.14] Fix typos in docs (GH-143193) (#143207)
Fix typos in docs (GH-143193)
(cherry picked from commit 57d569942c)

Co-authored-by: SYan212 <syan235711@gmail.com>
2025-12-27 07:58:01 +00:00
Miss Islington (bot)
02282e5479
[3.14] gh-140717: Add exc_text to LogRecord attributes table (GH-140718) (GH-143152)
Co-authored-by: Tom Kuson <mail@tjkuson.me>
2025-12-25 12:41:42 +00:00
Hugo van Kemenade
e6b11c8861
[3.14] Update pre-commit with zizmor and Ruff fixes (GH-143095) (#143102) 2025-12-23 16:51:54 +00:00
Miss Islington (bot)
a007e951ef
[3.14] gh-84232: Fix pydoc docs.python.org link generation (GH-139995) (#143098)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
2025-12-23 18:26:49 +02:00
Miss Islington (bot)
e25083abee
[3.14] gh-89152: Note truth testing exception in stdtypes.rst (GH-137640) (#143081)
gh-89152: Note truth testing exception in `stdtypes.rst` (GH-137640)
(cherry picked from commit 3c0888b25b)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-12-22 19:42:24 +00:00
Miss Islington (bot)
362d11e545
[3.14] gh-70647: Better promote how to safely parse yearless dates in datetime. (GH-116179) (#143037)
gh-70647: Better promote how to safely parse yearless dates in datetime. (GH-116179)

* gh-70647: Better promote how to safely parse yearless dates in datetime.

Every four years people encounter this because it just isn't obvious.
This moves the footnote up to a note with a code example.

We'd love to change the default year value for datetime but doing
that could have other consequences for existing code.  This documented
workaround *always* works.

* doctest code within note is bad, dedent.

* Update to match the error message.

* remove no longer referenced footnote

* ignore the warning in the doctest

* use Petr's suggestion for the docs to hide the warning processing

* cover date.strptime (3.14) as well
(cherry picked from commit b8d3fddba6)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2025-12-21 06:52:55 +00:00
Miss Islington (bot)
b46ce52a53
[3.14] gh-142527: Docs: Clarify that random.seed() discards the sign of an integer input (GH-142483) (#142970)
gh-142527: Docs: Clarify that random.seed() discards the sign of an integer input (GH-142483)

If *a* is an integer, the sign of *a* is discarded in the C source code. Clarify this behavior to prevent foot guns, where a common use case might naively assume that flipping the sign will produce different sequences (e.g. for a train/test split of a synthetic data generator in machine learning).
(cherry picked from commit 610aabfef2)

Co-authored-by: Andrej <andrej.karpathy@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-12-19 08:34:54 +00:00
Miss Islington (bot)
e48fb94d8c
[3.14] gh-118342: [Enum] update docs (GH-137290) (GH-142953)
gh-118342: [Enum] update docs (GH-137290)

(cherry picked from commit e79c39101a)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-18 11:18:46 -08:00
Miss Islington (bot)
693d8a1a10
[3.14] gh-137063: Document that ast node types replaced by Constant are no longer available (GH-137064) (GH-142930)
(cherry picked from commit fc80096a07)

Co-authored-by: James <snoopjedi@gmail.com>
2025-12-18 13:24:54 +01:00
Miss Islington (bot)
547e38cf3a
[3.14] gh-142876: remove reference to thread in documentation of asyncio.Queue.shutdown (GH-142888) (#142891)
gh-142876: remove reference to thread in documentation of `asyncio.Queue.shutdown` (GH-142888)
(cherry picked from commit 77c8e6a2b8)

Co-authored-by: Damian Birchler <damian@damianbirchler.net>
2025-12-17 22:23:27 +05:30
Miss Islington (bot)
ad6396ece5
[3.14] decimal docs: specification link and examples (GH-128698) (#142804)
decimal docs: specification link and examples (GH-128698)
(cherry picked from commit 2450be607c)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-17 21:42:23 +05:30
Stan Ulbrych
8a2ea9196d
[3.14] typo fixes in docs (GH-142683) (#142839)
(cherry picked from commit 39ecb17103)

Co-authored-by: SYan212 <syan235711@gmail.com>
2025-12-17 21:41:54 +05:30
Miss Islington (bot)
ce23b70ea6
[3.14] gh-140374: Add glossary entries related to multithreading (GH-140375) (#142868)
---------
(cherry picked from commit 1e9a0ee682)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Daniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
2025-12-17 12:17:46 +01:00
Miss Islington (bot)
f2d6f57178
[3.14] gh-139320: Cover exception chaining in the docs of contextmanager.__exit__ (GH-140169) (GH-142792)
(cherry picked from commit a44509ea87)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2025-12-17 11:28:42 +01:00
Miss Islington (bot)
f162bcc188
[3.14] gh-130536: Add details to os.path documentation (GH-130557) (#142800)
Co-authored-by: Arthur Wigo <arthur.l.wigo@gmail.com>
2025-12-16 14:50:56 +00:00
Miss Islington (bot)
c727b99cf2
[3.14] gh-83926: BlockingIOError characters_written is byte count (GH-141215) (#142816)
gh-83926: BlockingIOError characters_written is byte count (GH-141215)
(cherry picked from commit e12c744b0a)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-12-16 12:03:47 +00:00
Miss Islington (bot)
5bd413f1f4
[3.14] gh-142019: Add description about the exponent of result formatted with presentation type 'e' (GH-142084) (#142813)
Co-authored-by: 1nftf <QfxZ11@proton.me>
2025-12-16 12:01:50 +00:00
Miss Islington (bot)
988e4f1b89
[3.14] gh-141218: Fix inaccurate object comparison documentation (GH-141221) (#142810)
Co-authored-by: Mohsin Mehmood <55545648+mohsinm-dev@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-16 11:52:06 +00:00
Miss Islington (bot)
8916a8bf17
[3.14] Remove duplicate content in Mapping types - dict documentation (GH-141036) (#142808)
Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2025-12-16 11:51:36 +00:00
Miss Islington (bot)
fdc79776eb
[3.14] Correct Glossary key function example to use str.casefold instead of str.lower (GH-140316) (#142807)
Co-authored-by: Cameron Beck <94604154+cbkinase@users.noreply.github.com>
2025-12-16 11:49:57 +00:00
Miss Islington (bot)
e0a77821d6
[3.14] gh-106318: Add examples for str.ljust() method (GH-142719) (#142802)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-16 11:45:13 +00:00
Miss Islington (bot)
968d51b414
[3.14] gh-85204: Improve locale.setlocale example (GH-132683) (#142798)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-16 11:32:07 +00:00
Miss Islington (bot)
8150abb991
[3.14] gh-124864: Extends smtplib documentation on ESMTP options format (GH-132547) (#142796)
Co-authored-by: Patrick R <codeZeilen@users.noreply.github.com>
2025-12-16 11:27:20 +00:00
Miss Islington (bot)
4cbd2fa348
[3.14] gh-142020: ctypes docs: Note that find_library relies on the programs it runs (GH-142134) (GH-142748)
(cherry picked from commit e4d32a3ef9)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-12-16 10:56:25 +01:00
Miss Islington (bot)
88ac9956cd
[3.14] gh-85222: Document the global start method side effect in multiprocessing (GH-136426) (#142770)
gh-85222: Document the global start method side effect in multiprocessing (GH-136426)

* Document the ctx parameter in some types in multiprocessing.
* Reduce duplication while still linking to the central explanation from API points with the side effect.
(cherry picked from commit 0978b9a7d5)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: R Chintan Meher <meherrihaan@gmail.com>
2025-12-15 22:18:47 +00:00
Miss Islington (bot)
e0243c664c
[3.14] gh-106318: Add examples for str.isnumeric() (GH-142680) (#142715)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-14 18:53:13 +00:00
decorator-factory
78dd2d5ba9
[3.14] gh-142411: Change documentation to reflect the new docstring adjustments in 3.13 (GH-142413) (#142689) 2025-12-14 14:22:30 +02:00
Miss Islington (bot)
df22bcdf5f
[3.14] gh-141938: document treatment of OSError raised by HTTPConnection.getresponse (GH-142339) (#142704)
gh-141938: document treatment of `OSError` raised by `HTTPConnection.getresponse` (GH-142339)
(cherry picked from commit 11aef219f5)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-12-14 10:17:54 +00:00
Miss Islington (bot)
f6c1600441
[3.14] Add 'Show translation source' to docs sidebar (GH-130355) (#142686)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2025-12-13 23:09:03 +00:00
Miss Islington (bot)
affc38f40b
[3.14] Add missing comma to tuple in except* docs (GH-142395) (#142685)
Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
2025-12-13 22:57:29 +00:00
Miss Islington (bot)
4e74259e91
[3.14] gh-142568: Fix eval() docs to use 'source' parameter name (GH-142644) (#142669)
gh-142568: Fix eval() docs to use 'source' parameter name (GH-142644)
(cherry picked from commit c865ab3781)

Co-authored-by: Joshua Ward <joshie@flewognetworks.wales>
2025-12-13 16:13:34 +00:00
Miss Islington (bot)
e01407683e
[3.14] Doc: remove the invalid type variables of typing.TextIO and BinaryIO (GH-142642) (#142643)
They are not generic classes.
(cherry picked from commit fa1ac9070c)

Co-authored-by: Roman Donchenko <rdonchen@outlook.com>
2025-12-12 19:26:34 +00:00
Miss Islington (bot)
65d07f1948
[3.14] Use subcommand over sub-command in argparse docs (GH-142488) (#142587)
Use subcommand over sub-command in argparse docs (GH-142488)
(cherry picked from commit 387f88cac1)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2025-12-11 17:48:26 +00:00
Miss Islington (bot)
a160317b5a
[3.14] [Docs] Fix typo in bdb: is_skipped_line to is_skipped_module (GH-141771) (#142547)
[Docs] Fix typo in bdb: `is_skipped_line` to `is_skipped_module` (GH-141771)
(cherry picked from commit e5adaafc52)

Co-authored-by: Guo Ci <zguoci@gmail.com>
2025-12-10 22:46:18 +00:00
Miss Islington (bot)
d14697db18
Updates to PyManager docs based on feedback. (GH-142473)
(cherry picked from commit 37fe9a90c5)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-12-09 23:13:26 +00:00
Savannah Ostrowski
69ecb4c234
[3.14] GH-139946: Document argparse includes color codes when redirecting to stderr to file (#142398)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-09 17:22:26 +00:00
Miss Islington (bot)
caba09cd6e
[3.14] gh-123241: Document restrictions for tp_traverse implementations (gh-142272) (#142423)
(cherry picked from commit 37988c57ea)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-12-08 17:27:57 +00:00
Miss Islington (bot)
c9b2ec6c66
[3.14] gh-101100: Fix references to the set methods (GH-141857) (GH-142300)
gh-101100: Fix references to the set methods (GH-141857)
(cherry picked from commit 1d8f3ed2eb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-12-05 16:33:35 +02:00
Miss Islington (bot)
5611e0809b
[3.14] gh-135676: Reword the f-string (and t-string) section (GH-137469) (GH-142227)
Much of the information was duplicated in stdtypes.rst; this PR keeps
lexical/syntactical details in Lexical Analysis and the evaluation & runtime
behaviour in Standard types, with cross-references between the two.
Since the t-string section only listed differences from f-strings, and the
grammar for the two is equivalent, that section was moved to Standard types
almost entirely.
(cherry picked from commit aea5531583)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-04 11:53:12 +01:00
Stan Ulbrych
79245a47ed
[3.14] gh-135676: Simplify docs on lexing names (GH-140464) (GH-142015)
This simplifies the Lexical Analysis section on Names (but keeps it technically correct) by putting all the info about non-ASCII characters in a separate (and very technical) section.

It uses a mental model where the parser doesn't handle Unicode complexity “immediately”, but:

- parses any non-ASCII character (outside strings/comments) as part of a name, since these can't (yet) be e.g. operators
- normalizes the name
- validates the name, using the xid_start/xid_continue sets

(cherry picked from commit 2ff8608b4d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Micha Albert <info@micha.zone>
Co-authored-by: KeithTheEE <kmurrayis@gmail.com>
2025-12-03 13:43:06 +01:00
Hugo van Kemenade
57e0d177c2 Python 3.14.1 2025-12-02 14:51:37 +02:00