Commit graph

30226 commits

Author SHA1 Message Date
Miss Islington (bot)
fdbdd9fb5c
[3.14] gh-144706: Warn against using synchronization primitives within signal handlers (GH-144736) (GH-144767)
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:17 +00:00
Miss Islington (bot)
7f5a3acded
[3.14] gh-57095: Add note about input splitting in datetime.*.strptime (GH-131049) (GH-144735)
(cherry picked from commit 2e3e76e5cd)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-12 11:44:32 +01:00
Miss Islington (bot)
3aef49417e
[3.14] gh-142518: Document thread-safety guarantees of dict operations (GH-144184) (#144708)
* Address feedback; move thread safety section below see-also
* Address feedback - don't mention equality comparison only
* Change admonition to rubric; cross-reference glossary

---------
(cherry picked from commit 35dc547ab5)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-11 14:39:40 +01:00
Miss Islington (bot)
8c4ce4be26
[3.14] gh-142518: Define lock-free and per-object lock (GH-144548) (#144704)
gh-142518: Define lock-free and per-object lock (GH-144548)

- Add definitions of lock-free and per-object lock to the glossary
- Cross-reference these from list thread safety notes
- Change admonition to rubric
(cherry picked from commit 12dbae4c02)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2026-02-11 14:16:55 +01:00
Ned Batchelder
78fa4705d8
[3.14] Docs: remove links of modules to themselves (GH-144695) (#144705) 2026-02-11 08:09:56 -05:00
Miss Islington (bot)
a77dde441e
[3.14] gh-106318: Improve str.rstrip() method doc (GH-143893) (#144699)
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:22 +00:00
Miss Islington (bot)
bcbeff52be
[3.14] Clarify the docs for args in asyncio callbacks (GH-143873) (#144663)
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:26 +00:00
Miss Islington (bot)
c9646df644
[3.14] gh-119740: Remove obsoleted removal announce for trunc delegation (GH-144622) (GH-144624)
This was done in GH-119743 (3.14).
(cherry picked from commit aa6ed802f2)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-02-09 16:04:52 +02:00
Miss Islington (bot)
27baa1cd5d
[3.14] gh-106318: Add examples for str.partition() method (GH-142823) (#144611)
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:17:46 +00:00
Miss Islington (bot)
2494a90fbc
[3.14] gh-106318: Add example for str.isalnum() (GH-137550) (#144609)
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:14:19 +00:00
Miss Islington (bot)
0cc73ad642
[3.14] For enum.bin, update versionadded directive from 3.10 to 3.11 (GH-144574) (#144588)
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:41:33 +00:00
Miss Islington (bot)
626a6bcb31
[3.14] gh-143700: document secrets.DEFAULT_ENTROPY as an opaque value (GH-144568) (#144579)
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:42:16 +00:00
Miss Islington (bot)
6b9c21cbea
[3.14] gh-142044: Add note to prefer asyncio.timeout[_at] over asyncio.Timeout (GH-144449) (#144565)
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:29 +01:00
Miss Islington (bot)
470e8f27ee
[3.14] gh-140490: Document changes for PurePath.stem in Python 3.14 (GH-144450) (#144564)
gh-140490: Document changes for `PurePath.stem` in Python 3.14 (GH-144450)
(cherry picked from commit 16efaa225c)

Co-authored-by: kovan <xaum.io@gmail.com>
2026-02-07 12:25:09 +00:00
Ned Batchelder
bdba86ea31
[3.14] Docs: module pages should not link to themselves (GH-144505) (#144542)
Docs: module pages should not link to themselves

A re-application of the same changes as #144505.
2026-02-06 14:06:50 -05:00
Miss Islington (bot)
3fe97357ce
[3.14] gh-141004: Reorganize and reword the 'Useful macros' section (GH-144471) (GH-144541)
- Group the macros
- Roughly order them to put the most important ones first
- Add expansions where it makes sense; especially if there's
  an equivalent in modern C or a common compiler

(cherry picked from commit f85e1170d2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-02-06 12:50:06 +01:00
Miss Islington (bot)
6614a3c30c
[3.14] gh-74955: Document that __all__ must contain strings in normalization form NFKC (GH-144504) (GH-144519)
(cherry picked from commit c81e1843d4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-05 18:12:28 +00:00
Miss Islington (bot)
3e1197e50d
[3.14] gh-144484: Warn users not to use wsgiref in production (#144511)
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:21:31 +02:00
Serhiy Storchaka
2fb9cde118
[3.14] gh-144148: Update the urllib.parse documentation (GH-144497) (GH-144507)
Document urlsplit() as the main parsing function and urlparse() as
an obsolete variant.
(cherry picked from commit 67ddba9aa9)
2026-02-05 17:24:24 +02:00
Miss Islington (bot)
f27896c319
[3.14] gh-141984: Reword and reorganize Subscription (and Slicing) docs (GH-141985) (GH-144476)
(cherry picked from commit e423e0c2cc)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-05 10:41:32 +01:00
Miss Islington (bot)
48015091a9
[3.14] Itertools recipes: Replace the tabulate() example with running_mean() (gh-144483) (gh-144485) 2026-02-04 20:27:41 +00:00
Miss Islington (bot)
9f5191f8e7
[3.14] gh-106318: Add examples for str.startswith() method (GH-144369) (#144481)
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:23:55 +00:00
Miss Islington (bot)
e3d05d2dd6
[3.14] gh-141004: Document remaining pyport.h utility macros (GH-144279) (GH-144477)
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:41 +00:00
Miss Islington (bot)
fddd858810
[3.14] gh-141444: Replace dead URL in urllib.robotparser example (GH-144443) (#144464)
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:34 +00:00
Miss Islington (bot)
07d080a608
[3.14] gh-127313: Use getLogger() without argument to get root logger in logging cookbook (GH-143683) (GH-144431)
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:07 +00:00
Miss Islington (bot)
eb0790f2d7
[3.14] 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:28:39 +00:00
Miss Islington (bot)
cc8fd6ac43
[3.14] gh-106318: Add examples for str.rindex() method (GH-143887) (#144421)
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:27 +01:00
Peter Bierma
c766dda80d
[3.14] gh-144277: Fix usage of free-threaded terminology in the documentation (GH-144333) (GH-144385)
(cherry picked from commit 3a0e183556)
2026-02-01 21:01:43 -05:00
Miss Islington (bot)
b82b12bc80
[3.14] gh-142119: Clarify that one contextvars.Token can only reset once in a lifetime (GH-143693) (GH-144266)
(cherry picked from commit 487bd2dea5)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-01-27 11:39:13 +01:00
Miss Islington (bot)
7af0d0607d
[3.14] gh-144257: document return values of PyModule_SetDocString (GH-144258) (GH-144263)
gh-144257: document return values of PyModule_SetDocString (GH-144258)
(cherry picked from commit 3e9a5b022f)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-01-27 07:21:38 +00:00
Miss Islington (bot)
c5b23ebc03
[3.14] gh-101888: Add function.__builtins__ to ref documentation (GH-144174) (#144252)
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:21:33 +00:00
Miss Islington (bot)
9be2290016
[3.14] gh-142119: Clarify context manager protocol documentation on ContextVar.set and Token (GH-143694) (GH-144251)
(cherry picked from commit 04d497c284)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-01-26 15:56:19 +00:00
Miss Islington (bot)
fb06581941
[3.14] gh-143928: Remove outdated comparison between pickle and marshal regarding recursion (GH-144025) (#144246)
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:48 +00:00
Miss Islington (bot)
ca6142dae9
[3.14] Programming FAQ: fix some punctuaction typos (GH-144058) (GH-144185)
(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-26 11:37:28 +01:00
Miss Islington (bot)
2097ff3e98
[3.14] gh-144233: Fix typo in os.eventfd documentation (GH-144234) (#144238)
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:14:29 +00:00
Miss Islington (bot)
1947d6ea56
[3.14] gh-144027: Fix documentation for ignorechars in base64.a85decode() (GH-144028) (GH-144192)
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:24:06 +00:00
Miss Islington (bot)
712452e6f1
[3.14] gh-143919: Reject control characters in http cookies (#144089)
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-23 13:44:29 +02:00
Miss Islington (bot)
80a0ce40c3
[3.14] Doc: fix incorrect reference in isasyncgenfunction docs (GH-144099) (GH-144170)
(cherry picked from commit f3dd0cae6c)

Co-authored-by: Yongtao Huang <yongtaoh2022@gmail.com>
2026-01-23 11:35:35 +01:00
Miss Islington (bot)
1fa166888b
[3.14] gh-143513: Remove importlib.abc documentation for removed ABCs (GH-143605) (GH-144166)
gh-143513: Remove importlib.abc documentation for removed ABCs (GH-143605)

In 3.11 ResourceReader, Traversable, & TraversableResources moved from importlib.abc to importlib.resources.abc (commit e712a5b277).

In 3.12 old import locations were deprecated (commit 71848c9609).

In 3.14 backwards-compat support was removed (commit 0751511d24).
(cherry picked from commit f8262b84f5)

Co-authored-by: Alex Willmer <alex@moreati.org.uk>
Co-authored-by: Brett Cannon <brett@python.org>
2026-01-22 14:44:32 -08:00
Miss Islington (bot)
f2b9a74cf6
[3.14] gh-141004: Mark up constants for PyOS_double_to_string (GH-143867) (GH-144146)
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:14 +01:00
Miss Islington (bot)
9d021506f0
[3.14] gh-141004: Mark up docs of old PyMem macros (GH-143783) (GH-143864)
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:05 +01:00
Miss Islington (bot)
4e63fdb31f
[3.14] gh-143993: Document ways to disable remote debugging support (GH-143994) (#144139)
gh-143993: Document ways to disable remote debugging support (GH-143994)

Although PEP 768 mentions how to disable the mechanism of
remote debugging, it is not documented in the Python docs.

This change adds a note on how to disable remote debugging support
in a Python interpreter to the remote debugging how-to.
(cherry picked from commit 0b5f8359c5)

Co-authored-by: Rafael Weingartner-Ortner <38643099+RafaelWO@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-01-22 10:47:05 +00:00
Miss Islington (bot)
9f1ad56635
Update install manager docs (python/pymanager#227) (GH-144079)
(cherry picked from commit f52af86cba)

Co-authored-by: Steve Dower <steve.dower@python.org>
2026-01-21 15:39:00 +00:00
Miss Islington (bot)
41f76ae1c0
[3.14] gh-75459: versionadded for PyObject_CallFinalizer*() API (GH-143982) (#144026)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-01-20 12:06:21 +02:00
Miss Islington (bot)
f318126907
[3.14] gh-143774 - Improve IDLE Format Paragraph doc (GH-143775) (#144062)
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:34:29 +00:00
Miss Islington (bot)
ec39b66878
[3.14] gh-106318: Add examples for str.rpartition() method (GH-143891) (#144040)
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:03 +00:00
Miss Islington (bot)
5573df18d9
[3.14] gh-143754: Modernize Tkinter docs (GH-143841) (GH-144032)
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:27:32 +00:00
Miss Islington (bot)
bbd11568a7
[3.14] gh-143054: Disallow non-top-level Cut for now (GH-143622) (GH-143790)
The behaviour of Cut in nested parentheses, Repeat, Opt, and similar
is somewhat chaotic. Apparently even the academic papers on PEG aren't
as clear as they could be.

And it doesn't really matter. Python only uses top-level cuts.
When that changes, we can clarify as much as necessary (and even
change the implementation to make sense for what we'll need).

Document that this is deliberately unspecified, and add a test to
make sure any decision is deliberate, tested and documented.
(cherry picked from commit f0a0467c17)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-01-15 13:52:39 +01:00
Miss Islington (bot)
37c4a6551a
[3.14] gh-141004: Document symbol visibility macros (PyAPI_DATA, Py_EXPORTED_SYMBOL, Py_LOCAL_SYMBOL,Py_IMPORTED_SYMBOL) (GH-143508) (GH-143786)
(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:27 +01:00
Miss Islington (bot)
2e493239b1
[3.14] gh-143834: Fix PyLong_AsNativeBytes docs for negative number padding (GH-143840) (GH-143854)
(cherry picked from commit 421bd1770a)

Co-authored-by: Muneeb Ullah <moneebullah25@gmail.com>
2026-01-15 09:34:13 +01:00