Commit graph

30309 commits

Author SHA1 Message Date
Miss Islington (bot)
242ededffd
[3.14] gh-125895: Fix static asset location for sphinx-notfound-page (GH-147984) (#148040)
(cherry picked from commit 80ab6d958a)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-04-03 16:40:12 +01:00
Miss Islington (bot)
3d49e490e2
[3.14] gh-148022: Add threat model to remote debugging docs (GH-148024) (#148039)
gh-148022: Add threat model to remote debugging docs (GH-148024)

The remote debugging protocol has been generating spurious
vulnerability reports from automated scanners that pattern-match
on "remote access" and "memory operations" without understanding
the privilege model. This section documents the security boundaries
so reporters can self-triage before submitting.

The threat model clarifies three points: attaching requires the
same OS-level privileges as GDB (ptrace, task_for_pid, or
SeDebugPrivilege), crashes caused by reading corrupted target
process memory are not security issues, and a compromised target
process is out of scope. A subsection explains when operators
should use PYTHON_DISABLE_REMOTE_DEBUG for defence-in-depth.
(cherry picked from commit edab6860a7)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2026-04-03 14:34:36 +00:00
Miss Islington (bot)
6996c8303b
[3.14] gh-146907: Clarify ABI compatibility between debug and release builds (GH-146925) (GH-147971)
(cherry picked from commit 03f3b9ade9)

Co-authored-by: konsti <konstin@mailbox.org>
2026-04-03 10:02:36 +02:00
Miss Islington (bot)
dbba26dabe
[3.14] gh-142533: Document CRLF injection vulnerabilities in http.server doc (GH-143395) (#148020)
gh-142533: Document CRLF injection vulnerabilities in http.server doc (GH-143395)
(cherry picked from commit 617f4cc1c2)

Co-authored-by: Tadej Magajna <tmagajna@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-04-02 21:32:48 +00:00
Sam Gross
6ea4f842fb
[3.14] gh-144438: Fix false sharing between QSBR and tlbc_index (gh-144554) (#144923)
Align the QSBR thread state array to a 64-byte cache line boundary
and add padding at the end of _PyThreadStateImpl. Depending on heap
layout, the QSBR array could end up sharing a cache line with a
thread's tlbc_index, causing QSBR quiescent state updates to contend
with reads of tlbc_index in RESUME_CHECK. This is sensitive to
earlier allocations during interpreter init and can appear or
disappear with seemingly unrelated changes.

Either change alone is sufficient to fix the specific issue, but both
are worthwhile to avoid similar problems in the future.

(cherry picked from commit 6577d870b0)
2026-03-31 19:20:24 +00:00
Miss Islington (bot)
2d1515dc21
[3.14] gh-145563: Add thread-safety annotation for PyCapsule C-API (GH-146612) (#146659)
gh-145563: Add thread-safety annotation for PyCapsule C-API (GH-146612)
(cherry picked from commit 67354b2925)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
2026-03-31 17:05:49 +05:30
Miss Islington (bot)
85f5ea156d
[3.14] Docs: don't rely on implicit 'above' directions in socket docs (GH-146426) (#146560)
Docs: don't rely on implicit 'above' directions in socket docs (GH-146426)
(cherry picked from commit 3ff582238f)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2026-03-28 05:53:14 -04:00
Miss Islington (bot)
bc8497b77a
[3.14] Mention _Float16 (type from Annex H of the C23) in the struct docs (GH-146243) (#146529)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-03-27 17:44:27 +00:00
Miss Islington (bot)
8fde8faffe
[3.14] gh-142518: add thread safety annotations for bytearray C-API (GH-146514) (#146516)
gh-142518: add thread safety annotations for bytearray C-API (GH-146514)
(cherry picked from commit 5466f57ead)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-27 19:21:05 +05:30
Miss Islington (bot)
67862fc75e
[3.14] gh-142518: add thread safety docs on bytes C-API (GH-146415) (#146515)
gh-142518: add thread safety docs on bytes C-API (GH-146415)
(cherry picked from commit 6a94980301)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-27 13:07:37 +00:00
Miss Islington (bot)
de54353235
[3.14] gh-144837: Improve documentation for more collection methods (GH-144841) (GH-146483)
Use uniform standard signature syntax in the tutorial and in
the array and collections modules documentation.
(cherry picked from commit 17070f41d4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-03-26 19:55:25 +00:00
Miss Islington (bot)
25714b3c82
[3.14] gh-146318: Document that signal.SIGSTOP is Unix-only (GH-146319) (#146468)
gh-146318: Document that signal.SIGSTOP is Unix-only (GH-146319)
(cherry picked from commit e44993a665)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
2026-03-26 16:49:43 +01:00
Miss Islington (bot)
c8e0eadeb9
[3.14] Fix typo in 3.14 What's New tail call interpreter docs (GH-146425) (GH-146430)
Fix typo in 3.14 What's New tail call interpreter docs (GH-146425)
(cherry picked from commit 4447f23f40)

Co-authored-by: johnthagen <johnthagen@users.noreply.github.com>
2026-03-25 18:59:35 +00:00
Miss Islington (bot)
ac2fff4c0e
[3.14] gh-140196: Added constructor behavior changes in ast.rst for python 3.13 (GH-140243) (GH-146351)
(cherry picked from commit fae5761a76)

Co-authored-by: Parman Mohammadalizadeh <prmma23@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2026-03-24 02:37:09 +01:00
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