Commit graph

30295 commits

Author SHA1 Message Date
Miss Islington (bot)
abd276ab3d
[3.14] docs: fix f-string in ExceptionGroup example (GH-146108) (GH-146126)
(cherry picked from commit 2c6afb935a)

Co-authored-by: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com>
2026-03-24 00:09:00 +01:00
Miss Islington (bot)
74d104d66c
[3.14] gh-145305: Update ocert.org URLs in docs from http to https (GH-145304) (GH-145322)
(cherry picked from commit 11eec7a492)

Co-authored-by: indoor47 <indoor47@gmail.com>
Co-authored-by: Adam (indoor47) <adamai@agentmail.to>
2026-03-23 23:36:40 +01:00
dr-carlos
dd4ea46917
[3.14] gh-141732: Fix ExceptionGroup repr changing when original exception sequence is mutated (GH-141736) (GH-144445)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
2026-03-23 23:31:32 +01:00
Miss Islington (bot)
1b2f0bd54c
[3.14] gh-136672: Docs: Move parts of Enum HOWTO to API Docs (GH-139176) (GH-144802)
To avoid duplicate content in the Enum HOWTO and
API documentation which is not automatically synced,
the section about supported __dunder__ and _sunder
names is moved from HOWTO to API docs.

See also https://github.com/python/cpython/pull/136791
(cherry picked from commit 629a363ddd)

Co-authored-by: Rafael Weingartner-Ortner <38643099+RafaelWO@users.noreply.github.com>
2026-03-23 21:21:41 +01:00
Miss Islington (bot)
f883bbd433
[3.14] gh-108907: ctypes: Document _type_ codes (GH-145837) (GH-146328)
gh-108907: ctypes: Document _type_ codes (GH-145837)

Add `_SimpleCData._type_` docs.

Add type codes to the summary table.

Cross-link `struct`, `array`, and `ctypes`; throw in `numpy` too.
(Anyone wanting to add a code should be aware of those.)

Add `py_object`, and `VARIANT_BOOL` for completeness.
(cherry picked from commit 1114d7f7f8)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-23 14:07:24 +01:00
Serhiy Storchaka
796513306f
[3.14] gh-146056: Fix repr() for lists and tuples containing NULLs (GH-146129) (GH-146155)
(cherry picked from commit 0f2246b155)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-22 09:25:02 +02:00
Miss Islington (bot)
d65e8d9094
[3.14] Docs: replace all datetime imports with import datetime as dt (GH-145640) (#146258)
Docs: replace all `datetime` imports with `import datetime as dt` (GH-145640)
(cherry picked from commit 83360b5869)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-21 20:19:07 +02:00
Maciej Olko
9737ce2ac2
[3.14] gh-139588: Docs: fix PDF build (#145741) 2026-03-21 19:07:12 +02:00
Miss Islington (bot)
f2c70247fb
[3.14] gh-138234: clarify returncode behavior for subprocesses created with shell=True (GH-138536) (#146254)
gh-138234: clarify returncode behavior for subprocesses created with `shell=True` (GH-138536)
(cherry picked from commit 8a531f89df)

Co-authored-by: andreuu-tsai <32549555+andreuu-tsai@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-21 12:38:34 +00:00
Miss Islington (bot)
d6e0066920
[3.14] GH-100108: Add async generators best practices section (GH-141885) (#146252)
GH-100108: Add async generators best practices section (GH-141885)
(cherry picked from commit 897fa231a7)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-21 12:05:06 +00:00
Miss Islington (bot)
8b447fb56c
[3.14] gh-91279: Note SOURCE_DATE_EPOCH support in ZipFile.writestr() doc (GH-139396) (#146222)
gh-91279: Note `SOURCE_DATE_EPOCH` support in `ZipFile.writestr()` doc (GH-139396)
(cherry picked from commit 5ad738f8fb)

Co-authored-by: Wulian233 <1055917385@qq.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-20 16:20:39 +00:00
Miss Islington (bot)
cfdc5e86dd
[3.14] gh-145254: Fix formatting of thread safety annotations (GH-146111) (#146163)
- Add leading space so that the spacing between the previous annotation
  and the thread safety annotation looks correct.
- Remove trailing period from the link to the thread safety level.
(cherry picked from commit 580043dfae)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2026-03-19 11:08:27 +00:00
Miss Islington (bot)
3ebf54ed93
[3.14] gh-142518: Annotate PyList_* C APIs for thread safety (GH-146109) (#146125)
(cherry picked from commit 5b25eaec37)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2026-03-18 17:48:38 +01:00
Miss Islington (bot)
19cbcc0f85
[3.14] gh-142183: Cache one datachunk per tstate to prevent alloc/dealloc thrashing (GH-145789) (#145828)
Cache one datachunk per tstate to prevent alloc/dealloc thrashing when repeatedly hitting the same call depth at exactly the wrong boundary.

Move new _ts member to the end to not mess up remote debuggers' ideas of the
struct's layout. (The struct is only created by the runtime, and the new
field only used by the runtime, so it should be safe.)

(cherry picked from commit 706fd4ec08)
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-03-18 16:47:36 +01:00
Miss Islington (bot)
f20a637644
[3.14] gh-142518: Add thread safety notes for the buffer protocol (GH-145911) (#146106)
(cherry picked from commit 847f83ef1c)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2026-03-18 14:28:52 +01:00
Miss Islington (bot)
4601007395
[3.14] Docs: a brief note in the sets tutorial about order (GH-145984) (#146049)
Docs: a brief note in the sets tutorial about order (GH-145984)
(cherry picked from commit 4f5e79805e)


Docs: a brief note in the sets tut about order

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-17 05:18:11 -04:00
Miss Islington (bot)
e050831bd9
[3.14] Docs: remove unmatched parenthesis for asyncio.TaskGroup note (GH-146035) (#146037)
Docs: remove unmatched parenthesis for `asyncio.TaskGroup` note (GH-146035)
(cherry picked from commit 4e96282ee4)

Co-authored-by: trag1c <dev@jakubr.me>
2026-03-16 21:59:31 +01:00
Miss Islington (bot)
88e52acf90
[3.14] Docs: fix a form error and a grammatical error in float.rst (GH-140989) (#146012)
Docs: fix a form error and a grammatical error in float.rst (GH-140989)
(cherry picked from commit 70397fd103)

Co-authored-by: RayXu <xu_ruihong2009@163.com>
2026-03-16 14:38:00 +05:30
Miss Islington (bot)
64e2acbc8e
[3.14] gh-142518: Document thread-safety guarantees of bytearray objects (GH-145226) (#145982)
(cherry picked from commit 2f4e4ec2e7)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2026-03-15 16:03:32 +01:00
Miss Islington (bot)
5fa025aebe
[3.14] gh-69223: Document that add_argument() returns an Action object (GH-145538) (#145595)
Co-authored-by: Andrew Barnes <bortstheboat@gmail.com>
2026-03-15 14:08:21 +00:00
Miss Islington (bot)
331ac071ef
[3.14] gh-141004: Document PyDTrace* (GH-141856) (GH-145959)
gh-141004: Document `PyDTrace*` (GH-141856)
(cherry picked from commit 1dfe99ae3b)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-03-15 03:04:49 +00:00
Miss Islington (bot)
ef757268e0
[3.14] Docs: fix missing period in Doc/library/stdtypes.rst (GH-145935) (#145936)
Docs: fix missing period in `Doc/library/stdtypes.rst` (GH-145935)
(cherry picked from commit 51e8acf8de)

Co-authored-by: Connor Gibson <connor@nextdoortech.net>
2026-03-14 09:26:32 +00:00
Miss Islington (bot)
7e4dc65ad8
[3.14] gh-142518: Document thread-safety guarantees of set objects (GH-145225) (#145915)
(cherry picked from commit 79b91e7c50)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2026-03-13 13:59:17 +00:00
Miss Islington (bot)
b5e5013378
[3.14] Docs: except with multiple exceptions parentheses not required (GH-145848) (#145904)
Docs: except with multiple exceptions parentheses not required (GH-145848)

As of PEP 758 the except statement doesn't require parentheses anymore for exception tuples.
(cherry picked from commit 6d1e9ceed3)


See: https://peps.python.org/pep-0758/

Co-authored-by: Maurizio Sambati <duilio@users.noreply.github.com>
2026-03-13 06:12:02 -04:00
Miss Islington (bot)
f9589cb1b2
[3.14] gh-145254: Add thread safety annotation in docs (GH-145255) (#145862)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2026-03-12 15:36:58 +02:00
Miss Islington (bot)
717ebd7a36
[3.14] gh-142518: Improve mimalloc allocator docs (GH-145224) (#145823)
(cherry picked from commit 7a1da4575b)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2026-03-11 15:28:11 +01:00
Miss Islington (bot)
f688a4bafd
[3.14] gh-99875: Document rounding mode for old-style formatting (GH-126382) (#145811)
gh-99875: Document rounding mode for old-style formatting (GH-126382)
(cherry picked from commit ce1abaf9b8)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-03-11 13:31:44 +00:00
Miss Islington (bot)
ca8ca6bb0f
[3.14] gh-145591: Move slicing note to __getitem__ (GH-145606) (GH-145760)
(cherry picked from commit 2114da976c)

Co-authored-by: Ali Towaiji <145403626+Towaiji@users.noreply.github.com>
2026-03-11 13:58:03 +01:00
Miss Islington (bot)
6080c86609
[3.14] Warn that overriding __builtins__ for eval is not a security mechanism (GH-145773) (GH-145808)
(cherry picked from commit eb9ae65e5b)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-11 13:43:19 +01:00
Miss Islington (bot)
f4d53321a7
[3.14] gh-101100: Fix sphinx reference warnings around I/O (GH-139592) (#145794)
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2026-03-11 08:08:09 +00:00
Miss Islington (bot)
05b074cf81
[3.14] Docs: Improve the C API documentation involving threads (GH-145520) (GH-145757)
Docs: Improve the C API documentation involving threads (GH-145520)
(cherry picked from commit 7990313afa)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-10 15:03:28 +00:00
Miss Islington (bot)
387abcce91
[3.14] gh-106318: Add examples for str.isspace() docs (GH-145399) (#145752)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-03-10 14:25:46 +00:00
Miss Islington (bot)
50eafe77ef
[3.14] Docs: Update programming FAQ (GH-144573) (#145695)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
2026-03-10 16:17:11 +02:00
Hugo van Kemenade
ed2df30f40
[3.14] gh-140715: Improve class reference links on datetime.rst (GH-123980) (#145388)
Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-10 13:38:20 +02:00
Petr Viktorin
30bcdcd379
[3.14] Document that PyType_GetModule returns a borrowed ref (GH-145612) (GH-145682)
(cherry picked from commit 44855458a4)
2026-03-10 10:06:08 +01:00
Miss Islington (bot)
6c6acb36ba
[3.14] Remove the distutils-sig@python.org email in 'Installing Python Modules' (GH-145613) (#145708)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-09 22:16:23 +00:00
Miss Islington (bot)
0db2beee6b
[3.14] gh-145701: Fix __classdict__ & __conditional_annotations__ in class-scope inlined comprehensions (GH-145702) (#145710)
(cherry picked from commit 63eaaf9599)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>

* Add `:oss-fuzz:` supports

Backports part of 255e79fa95.

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-09 20:26:52 +00:00
Miss Islington (bot)
38440549db
[3.14] gh-141617: clarify concurrent.futures.ThreadPoolExecutor deadlock example (GH-141620) (#145686)
gh-141617: clarify `concurrent.futures.ThreadPoolExecutor` deadlock example (GH-141620)

---------
(cherry picked from commit 171133aa84)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-09 16:36:00 +00:00
Miss Islington (bot)
778ff23689
[3.14] gh-78773: Improve ctypes dynamic library loading docs (GH-145313) (GH-145674)
(cherry picked from commit d64f83d07b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-09 15:52:16 +01:00
Miss Islington (bot)
d910638418
[3.14] gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (GH-145643) (#145647)
gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (GH-145643)

---------
(cherry picked from commit 5a15a52dd1)

Co-authored-by: James <snoopjedi@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-09 00:05:09 +01:00
Miss Islington (bot)
5f25707ad8
[3.14] Remove typo in `functools.lru_cache` docs (GH-140278) (#145628)
Co-authored-by: Brandon Hubacher <brandon.hubacher@gmail.com>
2026-03-07 17:14:45 +00:00
Miss Islington (bot)
3a7c897518
[3.14] Docs: import datetime as dt in examples (GH-145315) (#145583)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-06 13:49:40 +02:00
Miss Islington (bot)
025536484d
[3.14] Docs: use a Sphinx extension to eliminate excessive links (GH-145130) (#145575)
Docs: use a Sphinx extension to eliminate excessive links (GH-145130)
(cherry picked from commit 15f6479c41)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-06 08:49:30 +02:00
Miss Islington (bot)
b7fb2359e8
[3.14] doc: Clarify logger creation example in logging HOWTO (GH-145540) (GH-145562)
doc: Clarify logger creation example in logging HOWTO (GH-145540)
(cherry picked from commit e0945443a0)

Co-authored-by: Yash Kaushik <yash005kaushik@gmail.com>
2026-03-05 18:02:56 +00:00
Miss Islington (bot)
da3fea361e
[3.14] Fix incorrect statement about argparse.ArgumentParser.add_argument() (GH-145479) (#145485)
Fix incorrect statement about argparse.ArgumentParser.add_argument() (GH-145479)
(cherry picked from commit dc12d1999b)

Co-authored-by: Justin Kunimune <justinkunimune@gmail.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-03-03 21:47:39 +00:00
Miss Islington (bot)
85f8073684
[3.14] gh-145455: Show output of blurb & sphinx-build version commands (GH-145457) (#145461)
gh-145455: Show output of blurb & sphinx-build version commands (GH-145457)

In gh-145455, an outdated dependency caused an import error that was not
printed out (`2>&1`); the message instead said that the tools are missing.

Don't redirect stderr, to show warnings and failures.

Also, switch `blurb` to output a version on a single line (`--version` rather
than `help`), and, and don't redirect stdout either.
This results in two version info lines being printed out. These get drowned
in typical Sphinx output, and can be helpful when debugging.
(cherry picked from commit f1de65b366)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-03 16:16:05 +02:00
Miss Islington (bot)
9a63576b10
[3.14] GH-145450: Document missing wave.Wave_write getter methods (GH-145451) (GH-145466)
(cherry picked from commit db41717cd5)

Co-authored-by: Michiel W. Beijen <mb@x14.nl>
2026-03-03 12:50:45 +00:00
Miss Islington (bot)
d8f0ffebef
[3.14] gh-106318: Fix incorrectly rendered code block in str.isalnum() docs (GH-144718) (GH-144730)
(cherry picked from commit f912c835b9)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-03-03 13:12:36 +01:00
Miss Islington (bot)
3c19c88fa9
[3.14] Hide "object" prefix on dunders in contextlib docs & selectivly link some more (GH-145436) (#145443)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2026-03-02 21:18:12 +00:00
Miss Islington (bot)
4152bbb773
[3.14] gh-145269: simplify bisect.bisect doc example (GH-145270) (#145367)
gh-145269: simplify bisect.bisect doc example (GH-145270)



---------
(cherry picked from commit fdb4b3527f)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2026-02-28 19:28:14 +00:00