Commit graph

29441 commits

Author SHA1 Message Date
Miss Islington (bot)
083477fbd6
[3.13] gh-106318: Add examples for str.rjust() method (GH-143890) (#145256)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-02-26 13:48:01 +00:00
Peter Bierma
56cc9ba645
[3.13] gh-141004: Document PyModuleDef_Type (GH-145043) (GH-145147)
(cherry picked from commit 24cc998c16)
2026-02-23 15:11:21 +00:00
Miss Islington (bot)
11c61b52d3
[3.13] gh-144694: Fix re.Match.group() doc claiming [1..99] range limit (GH-144696) (#145066)
gh-144694: Fix re.Match.group() doc claiming [1..99] range limit (GH-144696)

The documentation incorrectly stated that numeric group arguments
must be in the range [1..99]. This limit was removed in Python 3.5
(bpo-22437). Replace with "a positive integer" since the next
sentence already documents the IndexError for out-of-range values.
(cherry picked from commit 85021bc247)

Co-authored-by: Mohsin Mehmood <55545648+mohsinm-dev@users.noreply.github.com>
2026-02-21 05:42:39 +00:00
Miss Islington (bot)
c2a1fcbc05
[3.13] gh-144748: Document 3.12 and 3.14 changes to PyErr_CheckSignals (GH-144982) (GH-145063)
* gh-144748: Document 3.12 and 3.14 changes to `PyErr_CheckSignals` (GH-144982)
(cherry picked from commit 06292614ff)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-20 19:46:53 -05:00
Stan Ulbrych
6294569259
[3.13] Remove unused :platform: in module's docs (GH-144988) (GH-144998)
It has not been outputted since Sphinx 1.1.
(cherry picked from commit 20caf1c084)
2026-02-19 12:13:53 +00:00
Miss Islington (bot)
cbecfbe792
[3.13] gh-144386: Update equivalent code for "with", "async with" and "async for" (GH-144472) (GH-144946)
They use special method lookup for special methods.
(cherry picked from commit 9e8fa2d4d1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-18 11:22:24 +00:00
Stan Ulbrych
ea07223716
[3.13] Fix typos and grammar errors across documentation (GH-144709) (#144804)
(cherry picked from commit 3718f4be60)

Co-authored-by: Ronald Eddy Jr <ronald_eddy@yahoo.com>
2026-02-17 12:56:29 +00:00
Miss Islington (bot)
e1dbe2263a
[3.13] gh-101100: Resolve reference warnings in reference/ (GH-138418) (#138681)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
2026-02-15 03:06:50 +00:00
Miss Islington (bot)
99a4e55f79
[3.13] gh-144706: Warn against using synchronization primitives within signal handlers (GH-144736) (GH-144768)
gh-144706: Warn against using synchronization primitives within signal handlers (GH-144736)
(cherry picked from commit 945bf8ce1b)

Co-authored-by: Robsdedude <dev@rouvenbauer.de>
2026-02-12 23:21:26 +00:00
Miss Islington (bot)
99cc3d1842
[3.13] gh-57095: Add note about input splitting in datetime.*.strptime (GH-131049) (GH-144734)
(cherry picked from commit 2e3e76e5cd)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-12 11:44:42 +01:00
Stan Ulbrych
9a57c932ec
[3.13] Itertools recipes: Replace the tabulate() example with running_mean() (gh-144483) (gh-144722) 2026-02-12 00:24:00 -06:00
Lysandros Nikolaou
05c9474ed9
[3.13] gh-142518: Define lock-free and per-object lock (GH-144548) (#144707)
(cherry picked from commit 12dbae4c02)
2026-02-11 18:08:49 +01:00
Miss Islington (bot)
a5b1952d24
[3.13] gh-106318: Improve str.rstrip() method doc (GH-143893) (#144698)
gh-106318: Improve str.rstrip() method doc (GH-143893)
(cherry picked from commit 936d60dbe1)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-11 08:48:28 +00:00
Miss Islington (bot)
c49835a51c
[3.13] Clarify the docs for args in asyncio callbacks (GH-143873) (#144664)
Clarify the docs for `args` in asyncio callbacks (GH-143873)
(cherry picked from commit 40a82abe93)

Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-02-10 13:16:12 +00:00
Miss Islington (bot)
6884288570
[3.13] gh-106318: Add examples for str.partition() method (GH-142823) (#144612)
gh-106318: Add examples for str.partition() method (GH-142823)
(cherry picked from commit 432ddd99e2)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-02-08 22:16:49 +00:00
Miss Islington (bot)
43b9344114
[3.13] gh-106318: Add example for str.isalnum() (GH-137550) (#144610)
gh-106318: Add example for str.isalnum() (GH-137550)
(cherry picked from commit 3dd7a3c65a)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-02-08 22:15:45 +00:00
Miss Islington (bot)
57aaee56cb
[3.13] For enum.bin, update versionadded directive from 3.10 to 3.11 (GH-144574) (#144589)
For `enum.bin`, update versionadded directive from 3.10 to 3.11 (GH-144574)
(cherry picked from commit d73634935c)

Co-authored-by: Guo Ci <zguoci@gmail.com>
2026-02-08 07:43:22 +00:00
Miss Islington (bot)
e6e0171357
[3.13] gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value (GH-144568) (#144580)
gh-143700: document `secrets.DEFAULT_ENTROPY` as an opaque value (GH-144568)
(cherry picked from commit 934997218e)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-02-07 22:44:03 +00:00
Miss Islington (bot)
51ff5f376b
[3.13] gh-142044: Add note to prefer asyncio.timeout[_at] over asyncio.Timeout (GH-144449) (#144566)
gh-142044: Add note to prefer `asyncio.timeout[_at]` over `asyncio.Timeout` (GH-144449)
(cherry picked from commit 0e7c06a858)

Co-authored-by: kovan <xaum.io@gmail.com>
2026-02-07 13:31:35 +01:00
Miss Islington (bot)
7d04956d4a
[3.13] gh-144484: Warn users not to use wsgiref in production (#144512)
gh-144484: Warn users not to use wsgiref in production
(cherry picked from commit 7e777c587f)

Co-authored-by: Seth Michael Larson <seth@python.org>
2026-02-05 18:22:07 +02:00
Miss Islington (bot)
d5d4d2c36f
[3.13] gh-144148: Update the urllib.parse documentation (GH-144497) (GH-144507) (GH-144509)
(cherry picked from commit 2fb9cde118)

Document urlsplit() as the main parsing function and urlparse() as
an obsolete variant.
(cherry picked from commit 67ddba9aa9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-05 15:47:52 +00:00
Miss Islington (bot)
65acd01693
[3.13] gh-106318: Add examples for str.startswith() method (GH-144369) (#144480)
gh-106318: Add examples for `str.startswith()` method (GH-144369)
(cherry picked from commit 1b6d737ee0)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-04 17:24:35 +00:00
Miss Islington (bot)
7f3939338a
[3.13] gh-141004: Document remaining pyport.h utility macros (GH-144279) (GH-144478)
gh-141004: Document remaining `pyport.h` utility macros (GH-144279)
(cherry picked from commit 914fbec214)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-04 16:49:59 +00:00
Miss Islington (bot)
e5d8b783e8
[3.13] gh-141444: Replace dead URL in urllib.robotparser example (GH-144443) (#144465)
Co-authored-by: kovan <217326+kovan@users.noreply.github.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 11:36:32 +00:00
Miss Islington (bot)
ad5bd4ad47
[3.13] gh-127313: Use getLogger() without argument to get root logger in logging cookbook (GH-143683) (GH-144432)
gh-127313: Use getLogger() without argument to get root logger in logging cookbook (GH-143683)

Use getLogger() to get root logger in logging cookbook
(cherry picked from commit 53fecbe6e1)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-02-03 14:55:25 +00:00
Miss Islington (bot)
5e888993e4
[3.13] gh-74453: Add stronger security warning to os.path.commonprefix
gh-74453: Add stronger security warning to os.path.commonprefix (GH-144401)
(cherry picked from commit 4e15b8d95d)

Co-authored-by: Seth Michael Larson <seth@python.org>
2026-02-03 14:16:28 +00:00
Miss Islington (bot)
44820648e6
[3.13] gh-106318: Add examples for str.rindex() method (GH-143887) (#144422)
gh-106318: Add examples for str.rindex() method (GH-143887)
(cherry picked from commit 45d00a0791)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-02-03 14:36:32 +01:00
Guo Ci
b4a84bc555
[3.13] gh-140806: add docs for enum.bin function (#140807) (#143740)
(cherry picked from commit 7f50a5febd)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-02-02 22:57:53 +01:00
Nathan Goldbaum
b5129b89bb
[3.13] gh-144257: document return values of PyModule_SetDocString (GH-144258) (GH-144286)
(cherry picked from commit 3e9a5b022f)

Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-27 18:30:48 +00:00
Miss Islington (bot)
d6f4fb867a
[3.13] gh-142119: Clarify that one contextvars.Token can only reset once in a lifetime (GH-143693) (GH-144267)
(cherry picked from commit 487bd2dea5)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-01-27 11:39:20 +01:00
Miss Islington (bot)
f9f0a78f1c
[3.13] gh-101888: Add function.__builtins__ to ref documentation (GH-144174) (#144253)
gh-101888: Add function.__builtins__ to ref documentation (GH-144174)
(cherry picked from commit 933540e332)

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-26 16:22:31 +00:00
Miss Islington (bot)
01c18767f0
[3.13] gh-143928: Remove outdated comparison between pickle and marshal regarding recursion (GH-144025) (#144247)
gh-143928: Remove outdated comparison between pickle and marshal regarding recursion (GH-144025)
(cherry picked from commit 923d9d2ac2)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
2026-01-26 13:45:22 +00:00
Miss Islington (bot)
ef5bc9ec9b
[3.13] gh-144233: Fix typo in os.eventfd documentation (GH-144234) (#144237)
gh-144233: Fix typo in os.eventfd documentation (GH-144234)
(cherry picked from commit 9982147433)

Co-authored-by: Solomon Ritzow <11698787+ritzow@users.noreply.github.com>
2026-01-26 08:16:06 +00:00
Miss Islington (bot)
918387e491
[3.13] gh-143919: Reject control characters in http cookies (#144090)
gh-143919: Reject control characters in http cookies
(cherry picked from commit 95746b3a13)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-25 17:09:22 +00:00
Miss Islington (bot)
a47f1b14f6
[3.13] Programming FAQ: fix some punctuaction typos (GH-144058) (#144186)
Programming FAQ: fix some punctuaction typos (GH-144058)

(cherry picked from commit 03e651d601)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-01-25 17:09:04 +00:00
Miss Islington (bot)
cbfebb1bc5
[3.13] gh-144027: Fix documentation for ignorechars in base64.a85decode() (GH-144028) (GH-144193)
It does not support an ASCII string.

Also add more tests.
(cherry picked from commit 25a10b60b0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-23 19:19:22 +00:00
Miss Islington (bot)
62489c8533
[3.13] Doc: fix incorrect reference in isasyncgenfunction docs (GH-144099) (GH-144171)
(cherry picked from commit f3dd0cae6c)

Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
2026-01-23 11:35:27 +01:00
Miss Islington (bot)
d4d37b26cb
[3.13] gh-141004: Mark up constants for PyOS_double_to_string (GH-143867) (GH-144147)
gh-141004: Mark up constants for `PyOS_double_to_string` (GH-143867)

This ensures they show up as C macros in search and the Sphinx inventory.
(cherry picked from commit fb690c38ca)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-01-22 13:30:31 +01:00
Miss Islington (bot)
9a3aea9fd5
[3.13] gh-141004: Mark up docs of old PyMem macros (GH-143783) (GH-143865)
gh-141004: Mark up docs of old PyMem macros (GH-143783)

These had a docs-only deprecation notice since the first version of the docs in this repo. Nowadays we call things “soft deprecated” if there's just a note in the docs.

The deprecated directive needs a version, I went with the first one that had the notice (2.0; it's not in 1.6):
- https://docs.python.org/release/2.0/api/memoryInterface.html
- https://docs.python.org/release/1.6/api/memoryInterface.html

Since PEP 445, they are now direct aliases; there are no (additional) binary compatibility concerns over the preferred names.
(cherry picked from commit a009e78b79)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-01-22 11:52:12 +01:00
Miss Islington (bot)
746d2f979b
[3.13] gh-143774 - Improve IDLE Format Paragraph doc (GH-143775) (#144063)
gh-143774 - Improve IDLE Format Paragraph doc (GH-143775)

Add a reminder to not rewrap code line to the Menu => Format => Reformat Paragraph entry.
In Editing and Nagivagion, add a new 'Format block' subsection that defines 'paragraph'
to better match what is dependably handled as more or less expected.
In particular, specify equal indents and that the resulting indent equals original indent.
Also mention that selections are expanded to complete lines and how to modify max length.

(Also fix a couple case errors in cross references.)
(cherry picked from commit fa3abf5a51)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2026-01-20 09:32:55 +00:00
Miss Islington (bot)
4ada03f47f
[3.13] gh-106318: Add examples for str.rpartition() method (GH-143891) (#144041)
gh-106318: Add examples for str.rpartition() method (GH-143891)
(cherry picked from commit 3c9c3d33cb)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-01-19 14:22:24 +00:00
Miss Islington (bot)
48a8cd1d12
[3.13] gh-143754: Modernize Tkinter docs (GH-143841) (GH-144033)
Use more relevant terminology instead of "master"/"slave" widgets where possible.
(cherry picked from commit 813fc7a291)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-19 12:26:26 +00:00
Miss Islington (bot)
343b5c4421
[3.13] gh-141004: Document symbol visibility macros (PyAPI_DATA, Py_EXPORTED_SYMBOL, Py_LOCAL_SYMBOL,Py_IMPORTED_SYMBOL) (GH-143508) (GH-143787)
(cherry picked from commit a7ba3b124f)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-15 13:34:37 +01:00
Miss Islington (bot)
2516dd0d06
[3.13] gh-143834: Fix PyLong_AsNativeBytes docs for negative number padding (GH-143840) (GH-143855)
(cherry picked from commit 421bd1770a)

Co-authored-by: Muneeb Ullah <moneebullah25@gmail.com>
2026-01-15 09:34:21 +01:00
Miss Islington (bot)
5f7a49a77b
[3.13] gh-141004: Document old provisional names for vectorcall/code API (GH-143568) (GH-143829)
For vectorcall API, the underscore-prefixed provisional names
continue to be available per PEP 590:
https://peps.python.org/pep-0590/#finalizing-the-api
Use `versionadded`, `versionchanged`, and `:no-typesetting:`
to mark this up.

For PyCode API, use `:no-typesetting:` rather than `index::` so that
these are semantically documented as C functions.
(cherry picked from commit 7e8a1b5061)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-01-14 11:01:54 +01:00
Miss Islington (bot)
7760775375
[3.13] gh-137113 docs: note readline no longer supported in REPL after 3.13 (GH-137142) (GH-143792)
Add a note to the readline module documentation stating that
Python 3.13 and later no longer supports readline in the default REPL,
as per gh-118840. Includes workaround using PYTHON_BASIC_REPL.

Update tutorial to remove the reference, and use a different key to
test things out.
(cherry picked from commit 971f387bbb)

Signed-off-by: Kuang Yu Heng <yuheng3107@gmail.com>
Co-authored-by: Kuang Yu Heng <yuheng3107@gmail.com>
2026-01-14 10:56:18 +01:00
Miss Islington (bot)
3dd9afcf91
[3.13] gh-143728: Keep TypedDict and NamedTuple in class role in docs (GH-143702) (#143800)
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-01-13 13:58:14 +00:00
Miss Islington (bot)
cbf08d5a62
[3.13] gh-106318: Add examples for str.replace() method (GH-143581) (GH-143788)
(cherry picked from commit af9f783a7e)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-01-13 12:23:26 +00:00
Terry Jan Reedy
92d80c6067
[3.13] gh-139707: Copy-strip change to idle.rst into idlelib (#143767)
Copy net new text in idle.rst from main to 3.13.
Make 3.13 docs and copy-strip idle.html to idlelib/help.html.
See https://github.com/python/cpython/issues/139707#issuecomment-3737374788
and PR #143718 message for more.

* Revert url to 'main' from '3.13'

The branch in the source links in the revised help.html
become '3.13' instead of 'main' because the html
was generated from an edited 3.13 version of idle.rst
instead being backported from main.  This reversion
avoids the possibility of future backport merge conflicts.

The version makes no difference to the Help/IDLE doc display as
the url is currently neither displayed nor linked to the link title
-- 'Lib/idlelib'.  If we do make the links live, we can use
sys.version_info to replace 'main' when main is no longer the source branch.
2026-01-12 22:58:30 -05:00
Miss Islington (bot)
5616ef9276
[3.13] gh-143762 Backport a6bc60d for random combinatoric recipes (GH-143764) (gh-143766) 2026-01-13 00:25:55 +00:00