Commit graph

29399 commits

Author SHA1 Message Date
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
Miss Islington (bot)
18eeec4bea
[3.13] gh-142972: Document arbitrary ordering in Path.glob and Path.rglob (GH-143025) (GH-143710)
gh-142972: Document arbitrary ordering in `Path.glob` and `Path.rglob` (GH-143025)
(cherry picked from commit 9d13ca97c1)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2026-01-11 19:42:44 +00:00
Miss Islington (bot)
cf5b31c31a
[3.13] gh-143420: Clarify sequence behavior for slice indexes (GH-143422) (#143703)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-01-11 17:23:52 +00:00
Miss Islington (bot)
0dc3c08950
[3.13] gh-86139: Correct NamedTuple and TypedDict's type in typing.rst (GH-143692) (#143697)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2026-01-11 15:59:19 +00:00
Miss Islington (bot)
3aa233e401
[3.13] Sync the batched() example with the grouper() example. (gh-143676) (gh-143679) 2026-01-10 23:06:57 -06:00
Miss Islington (bot)
523d866205
[3.13] Doc: remove duplicate GitHub issue reference in "What's New in Python 3.13" (GH-143654) (#143657)
Doc: remove duplicate GitHub issue reference in "What's New in Python 3.13" (GH-143654)
(cherry picked from commit aa8578dc54)

Co-authored-by: emmanuel <emmanuel20232035@gmail.com>
2026-01-10 13:40:34 +00:00
Miss Islington (bot)
d12d7a9c09
[3.13] gh-72239: Add note distinguishing concurrent.futures.Future from asyncio.Future (GH-143288) (#143608)
gh-72239: Add note distinguishing concurrent.futures.Future from asyncio.Future (GH-143288)
(cherry picked from commit a9ca49d9c6)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2026-01-10 12:22:18 +05:30
Miss Islington (bot)
76184823d1
[3.13] gh-106318: Add examples for str.rfind() method (GH-143582) (#143617)
gh-106318: Add examples for str.rfind() method (GH-143582)
(cherry picked from commit c696f33d9e)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-01-09 15:30:23 +00:00
Miss Islington (bot)
bf7990c0b9
[3.13] gh-106318: Improve str.removeprefix() and str.removesuffix() docs (GH-143580) (#143615)
gh-106318: Improve str.removeprefix() and str.removesuffix() docs (GH-143580)

Add doctest role and 'See also'.
(cherry picked from commit 6d6c7ed737)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-01-09 15:29:04 +00:00
Miss Islington (bot)
cb42565839
[3.13] gh-143553: Add support for parametrized resources in regrtests (GH-143554) (GH-143556)
For example, "-u xpickle=2.7" will run test_xpickle only against Python 2.7.
(cherry picked from commit c07e5ec0a9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-01-08 18:12:51 +02:00
Miss Islington (bot)
bcc0552574
[3.13] gh-143513: Clarify changed argument name of ResourceReader.is_resource (GH-143523) (GH-143563)
gh-143513: Clarify changed argument name of `ResourceReader.is_resource` (GH-143523)
(cherry picked from commit 5462002bbe)

Co-authored-by: Alex Willmer <alex@moreati.org.uk>
2026-01-08 13:46:33 +00:00
Miss Islington (bot)
e1572eadd0
[3.13] Fix a typo in STORE_SLICE docs (GH-143500) (#143534)
Fix a typo in STORE_SLICE docs (GH-143500)
(cherry picked from commit 228d95582e)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2026-01-07 22:42:48 +00:00
Miss Islington (bot)
1de1d3d6d7
[3.13] gh-106318: Add examples for str.casefold() and str.lower() methods (GH-142154) (#143525)
gh-106318: Add examples for str.casefold() and str.lower() methods (GH-142154)
(cherry picked from commit 51a56a3a7b)

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-01-07 18:03:24 +01:00
Miss Islington (bot)
0a8e97e174
[3.13] gh-106318: Add example for str.index() (GH-137023) (#143501)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-01-06 21:48:19 +00:00
Miss Islington (bot)
8ca9005e6b
[3.13] gh-133315: Document that compat32 should not be used with MIMEPart/EmailMessage (GH-143307) (#143495)
gh-133315: Document that compat32 should not be used with MIMEPart/EmailMessage (GH-143307)
(cherry picked from commit ff7d1cec41)

Co-authored-by: Andrii Hrimov <andrew.hrimov@gmail.com>
2026-01-06 15:32:56 -05:00
Miss Islington (bot)
e57cf1c0eb
[3.13] gh-142302: Fix mkstemp() documentation: clarify file descriptor inheritance behavior (GH-142338) (#143487)
gh-142302: Fix mkstemp() documentation: clarify file descriptor inheritance behavior (GH-142338)

The documentation incorrectly stated that the file descriptor is not
inherited by child processes. In reality, the close-on-exec flag (when
available) only prevents inheritance across exec() calls, not fork().
(cherry picked from commit e79c9b7031)

Co-authored-by: ADITYA RAI <adi.hack1234@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-06 17:14:42 +00:00
Miss Islington (bot)
f7711d55e5
[3.13] gh-106318: Add examples for str.isprintable() (GH-140043) (#143484)
gh-106318: Add examples for str.isprintable()  (GH-140043)
(cherry picked from commit 7b0a372b20)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-01-06 16:50:02 +00:00
Semyon Moroz
97694de41e
[3.13] gh-143331: Schedule to remove format "N" for Decimal (GH-143372) (#143477)
(cherry picked from commit dd750b3485)
2026-01-06 14:02:32 +00:00
Miss Islington (bot)
5e20103a73
[3.13] gh-76187: Document the c typecode for multiprocessing.Array. (GH-132504) (#143370)
gh-76187: Document the `c` typecode for `multiprocessing.Array`. (GH-132504)

* Document the `c` typecode for `multiprocessing.Array`.

* Add quotes

* Mention that 'w' is not supported
(cherry picked from commit 136f6d8355)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2026-01-02 19:25:21 +00:00
Miss Islington (bot)
823b50e1d0
[3.13] gh-115634: document ProcessPoolExecutor max_tasks_per_child bug (GH-140897) (#143303)
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:32:08 +00:00
Miss Islington (bot)
4d42e1c282
[3.13] gh-143284: Temporarily install Sphinx<9 to fix Chinese search (GH-143286) (#143291)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-12-30 12:37:47 +00:00
Bénédikt Tran
6c9aa94459
[3.13] gh-142994, gh-142996: document missing async generator and coroutine field entries in inspect (GH-142997) (#143287)
(cherry picked from commit 0efbad60e1)

Co-authored-by: wangxiaolei <fatelei@gmail.com>
2025-12-30 10:46:44 +00:00
Miss Islington (bot)
7fc3aa5575
[3.13] gh-69686: Remove untrue part of __import__ replacement docs (GH-143261) (#143282)
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:47 +00:00
Miss Islington (bot)
750c3efe82
[3.13] gh-143241: Fix infinite loop in zoneinfo._common.load_data (GH-143243) (#143252)
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:11:32 +00:00
Pablo Galindo Salgado
de34f6d404
[3.13] gh-143228: Fix UAF in perf trampoline during finalization (GH-143233) (#143248) 2025-12-28 14:32:16 +00:00
Miss Islington (bot)
833fbe9ea0
[3.13] no-issue: Fix override value in os.rst (gh-123522) (gh-143212) 2025-12-27 10:55:15 +00:00
Miss Islington (bot)
80f7d493bf
[3.13] gh-140717: Add exc_text to LogRecord attributes table (GH-140718) (GH-143151)
Co-authored-by: Tom Kuson <mail@tjkuson.me>
2025-12-25 12:41:24 +00:00
Hugo van Kemenade
c5852c27c1
[3.13] Update pre-commit with zizmor and Ruff fixes (GH-143095) (GH-143102) (#143113) 2025-12-23 21:28:00 +02:00
Hugo van Kemenade
7dc6acc1e9
[3.13] gh-84232: Fix pydoc docs.python.org link generation (GH-139995) (#143099)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Éric <merwok@netwok.org>
2025-12-23 18:29:28 +02:00
Gregory P. Smith
9b7a628632
[3.13] gh-70647: Better promote how to safely parse yearless dates in datetime. (GH-116179) (#143038)
* 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

* remove date.strptime mentions from 3.14
2025-12-21 07:03:24 +00:00
Miss Islington (bot)
20c3015e85
[3.13] gh-142527: Docs: Clarify that random.seed() discards the sign of an integer input (GH-142483) (#142971)
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:35:34 +00:00
Miss Islington (bot)
b5a29553d9
[3.13] gh-118342: [Enum] update docs (GH-137290) (GH-142954)
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:19:00 -08:00
Miss Islington (bot)
42513a237f
[3.13] gh-142876: remove reference to thread in documentation of asyncio.Queue.shutdown (GH-142888) (#142892)
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 16:53:14 +00:00
Miss Islington (bot)
e5fd7373b8
[3.13] decimal docs: specification link and examples (GH-128698) (#142805)
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:35 +05:30
Lysandros Nikolaou
90285941d8
[3.13] gh-140374: Add glossary entries related to multithreading (GH-140375) (#142869)
---------
(cherry picked from commit 1e9a0ee682)

Co-authored-by: Daniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
2025-12-17 12:22:33 +01:00
Miss Islington (bot)
e4ca817155
[3.13] gh-139320: Cover exception chaining in the docs of contextmanager.__exit__ (GH-140169) (GH-142793)
(cherry picked from commit a44509ea87)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2025-12-17 11:28:37 +01:00
Miss Islington (bot)
bce4a20195
[3.13] gh-130536: Add details to os.path documentation (GH-130557) (#142801)
Co-authored-by: Arthur Wigo <arthur.l.wigo@gmail.com>
2025-12-16 14:50:58 +00:00
Miss Islington (bot)
3b5c7ba76f
[3.13] gh-83926: BlockingIOError characters_written is byte count (GH-141215) (#142815)
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:04:13 +00:00
Miss Islington (bot)
8f25661ed9
[3.13] gh-142019: Add description about the exponent of result formatted with presentation type 'e' (GH-142084) (#142814)
Co-authored-by: 1nftf <QfxZ11@proton.me>
2025-12-16 12:02:07 +00:00
Miss Islington (bot)
c2d34a1396
[3.13] gh-141218: Fix inaccurate object comparison documentation (GH-141221) (#142811)
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:38 +00:00
Miss Islington (bot)
11629e0a8c
[3.13] Remove duplicate content in Mapping types - dict documentation (GH-141036) (#142809)
Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2025-12-16 11:52:07 +00:00
Miss Islington (bot)
1baa315222
[3.13] Correct Glossary key function example to use str.casefold instead of str.lower (GH-140316) (#142806)
Co-authored-by: Cameron Beck <94604154+cbkinase@users.noreply.github.com>
2025-12-16 11:50:02 +00:00
Miss Islington (bot)
2818224ef3
[3.13] gh-106318: Add examples for str.ljust() method (GH-142719) (#142803)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-12-16 11:45:31 +00:00