Commit graph

29712 commits

Author SHA1 Message Date
Miss Islington (bot)
2ffc10bd39
[3.14] gh-132775: Support Fallbacks in _PyObject_GetXIData() (gh-134418)
It now supports a "full" fallback to _PyFunction_GetXIData() and then `_PyPickle_GetXIData()`.
There's also room for other fallback modes if that later makes sense.

(cherry picked from commit 88f8102a8f, AKA gh-133482)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2025-05-21 14:47:56 +00:00
Miss Islington (bot)
cd3395a8b1
[3.14] gh-132246: Add special buffer methods to C API Type Object docs (gh-132247) (gh-134426)
Two special methods, __buffer__ and __release_buffer__ were added to
Python 3.12 by PEP 688. The C API Type Object documentation for slots
includes `tp_as_buffer`, and sub-slots `bf_getbuffer`, `bf_releasebuffer`
but does not refer to the Python Data Model version of those. Add the
missing references.

(cherry picked from commit b529b60fc2)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 16:33:35 +02:00
Miss Islington (bot)
9be568eda4
[3.14] gh-132983: Add documentation for compression.zstd (GH-133911) (#134425)
gh-132983: Add documentation for compression.zstd (GH-133911)

Add documentation for compression & compression.zstd.

🎉

---------
(cherry picked from commit d862b6de1b)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Sumana Harihareswara <sh@changeset.nyc>
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
2025-05-21 14:24:23 +00:00
Miss Islington (bot)
f7cdee93f4
[3.14] gh-110631: Fix some incorrect indents in the documentation (GH-129312) (#134419)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-21 13:58:09 +00:00
Miss Islington (bot)
ac27008ccd
[3.14] Fix signature of _curses.assume_default_colors in the docs (GH-134409) (#134417)
Fix signature of `_curses.assume_default_colors` in the docs (GH-134409)
(cherry picked from commit dcfc91e4e5)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-21 13:08:20 +00:00
Miss Islington (bot)
b0bf48a134
[3.14] Add documentation for remote debugging with pdb (GH-134260) (#134398) 2025-05-21 09:29:42 +00:00
Miss Islington (bot)
04829d4d87
[3.14] gh-134209: use heap-allocated memory in _curses.window.{instr,getstr} (GH-134283) (#134391)
gh-134209: use heap-allocated memory in `_curses.window.{instr,getstr}` (GH-134283)

* made curses buffer heap allocated instead of stack
* change docs to explicitly mention the max buffer size
* changing GetStr() function to behave similarly too
* Update Doc/library/curses.rst
* Update instr with proper return error handling
* Update Modules/_cursesmodule.c
* change to strlen and better memory safety
* change from const int to Py_ssize_t
* add mem allocation guard
* update versionchanged to mention it was an increase.
* explicitly use versionchanged 3.14 as that is its own branch now.

TESTED: `python -m test -u curses test_curses`

---------
(cherry picked from commit aadda87b3d)

Co-authored-by: tigerding <43339228+zydtiger@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-20 14:01:45 -07:00
Miss Islington (bot)
899ce7d390
[3.14] gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372) (#134374)
gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372)

Added a clarification that the underlying binary buffer of a TextIOBase can be a BufferedIOBase OR a RawIOBase
(cherry picked from commit 36eb711d2f)

Co-authored-by: Alex Kautz <alex@takemobi.com>
2025-05-20 12:28:03 -07:00
Miss Islington (bot)
6074e1e6c4
[3.14] gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962) (GH-134344)
gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962)

  * Add "cyclic isolate" to the glossary.
  * Add a new "Object Life Cycle" page.
  * Improve docs for related API, with special focus on cross-references and warnings
(cherry picked from commit 3246ea514d)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-20 19:11:01 +02:00
Miss Islington (bot)
6d4b56d2f3
[3.14] gh-127945: Update What's New in Python 3.14 for free-threaded ctypes (GH-134332) (#134364)
gh-127945: Update What's New in Python 3.14 for free-threaded ctypes (GH-134332)
(cherry picked from commit b430e92dd8)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-20 17:02:55 +00:00
Miss Islington (bot)
402d983f27
[3.14] gh-128002: add what's new docs for asyncio (GH-134324) (#134362)
gh-128002: add what's new docs for `asyncio` (GH-134324)
(cherry picked from commit 0584533dc7)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-20 16:47:42 +00:00
Miss Islington (bot)
ff0facd332
[3.14] gh-101100: Fix Sphinx warnings in library/decimal.rst (GH-134303) (#134338)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-20 14:52:11 +00:00
Miss Islington (bot)
b9a7e79ee1
[3.14] gh-128307: Update what's new in 3.13 and 3.14 with create_task changes of asyncio (GH-134304) (#134319)
gh-128307: Update what's new in 3.13 and 3.14 with create_task changes of asyncio  (GH-134304)
(cherry picked from commit 28625d4f95)

Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-20 14:15:18 +00:00
Miss Islington (bot)
a3fa72578a
[3.14] gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069) (GH-134328)
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)

(cherry picked from commit a31bbc951a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-05-20 12:15:34 +00:00
Miss Islington (bot)
4effd060fc
[3.14] gh-132983: Convert zstd `__new__` methods to Argument Clinic (GH-133860) (#133915)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-20 03:25:24 +01:00
Miss Islington (bot)
e20f05f53f
[3.14] gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288) (#134298)
gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288)

Explain history of de-facto standard and how to pick between the two Base-85 encoding functions in the base-64 module.

---------
(cherry picked from commit 66aaad6103)

Co-authored-by: Alek Binion <aleksander.binion@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2025-05-20 00:05:26 +00:00
Steve Dower
7686c752b3
[3.14] gh-133779: Revert Windows generation of pyconfig.h and go back to a static header. (GH-133966)
Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds.
This was usually the case already, but this change guarantees it in all circumstances.
2025-05-19 21:24:53 +01:00
Miss Islington (bot)
e3cc4008c4
[3.14] gh-122055: Clarify documentation for empty matches in RE (GH-133169) (GH-134217)
(cherry picked from commit 44b73d3cd4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-19 16:49:46 +03:00
Miss Islington (bot)
76957eb8cc
[3.14] document Py_VISIT as a macro in the docs (GH-133688) (#134186)
document `Py_VISIT` as a macro in the docs (GH-133688)
(cherry picked from commit bb32f3c698)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2025-05-18 16:34:19 +00:00
Miss Islington (bot)
11650c354f
[3.14] fix indent in controlflow.rst docs (GH-134008) (#134184)
fix indent in `controlflow.rst` docs (GH-134008)
(cherry picked from commit 4ce91871a9)

Co-authored-by: Yongzi Li <1538321957@qq.com>
2025-05-18 16:29:03 +00:00
Miss Islington (bot)
bf39decabd
[3.14] gh-134150: Clarify distinction between JSON and Python objects (GH-134154) (#134166)
gh-134150: Clarify distinction between JSON and Python objects (GH-134154)

* gh-134150: Clarify distinction between JSON objects and Python objects in json module docs

* Revert change to JSON introduction

* Clarify occurrences of "object literal" as JSON
(cherry picked from commit fa4e088668)

Co-authored-by: Micha Albert <micha@2231puppy.tech>
2025-05-18 01:54:00 +00:00
Miss Islington (bot)
cca18fcbe8
[3.14] gh-88275: Add missing __init__ method to match example (GH-120281) (#134142)
gh-88275: Add missing `__init__` method to `match` example (GH-120281)
(cherry picked from commit 7a9d46295a)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2025-05-17 13:17:23 +00:00
Miss Islington (bot)
b43e1d0b48
[3.14] Docs: fix spelling of "test case" in unittest documentation (GH-134137) (#134138)
Docs: fix spelling of "test case" in `unittest` documentation (GH-134137)
(cherry picked from commit b41d79c776)

Co-authored-by: Clifford Gama <53076065+cliff688@users.noreply.github.com>
2025-05-17 14:03:33 +02:00
Miss Islington (bot)
9f1307afa0
[3.14] Docs: C API: Improve documentation around non-Python threads with subinterpreters (GH-131087) (GH-134130)
Docs: C API: Improve documentation around non-Python threads with subinterpreters (GH-131087)

(cherry picked from commit af6b3b825f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-05-17 09:04:42 +00:00
Miss Islington (bot)
851b26f4be
[3.14] gh-113878: fix versionadded in dataclasses.field() documentation (GH-134065) (#134128)
gh-113878: fix `versionadded` in `dataclasses.field()` documentation (GH-134065)
(cherry picked from commit 9d73875072)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
2025-05-17 08:06:04 +00:00
Miss Islington (bot)
075cabb026
[3.14] gh-133881: add forward reference to list.sort() in lambda expression tutorial (GH-133910) (#134126)
gh-133881: add forward reference to `list.sort()` in lambda expression tutorial (GH-133910)
(cherry picked from commit c1c9ad1d5a)

Co-authored-by: Oleg Burnaev <51371645+Shepard2154@users.noreply.github.com>
2025-05-17 08:05:47 +00:00
Miss Islington (bot)
7a5851dc90
[3.14] gh-117026: Remove outdated sentence in SimpleHTTPRequestHandler docs (GH-117027) (GH-134107)
The code was changed in 0f7cddc308 (bpo-839496/gh-39531).
(cherry picked from commit ea2d707bd5)

Co-authored-by: Saleh Dehqanpour <salehdeh76@gmail.com>
2025-05-16 22:23:52 +03:00
Miss Islington (bot)
c8dcde4d5e
[3.14] gh-133286: add explanation about seq for pathlib Pattern Language (GH-133340) (#134105)
gh-133286: add explanation about `seq` for pathlib Pattern Language (GH-133340)
(cherry picked from commit ac8df4b589)

Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
2025-05-16 20:20:47 +01:00
Miss Islington (bot)
2d00484f30
[3.14] gh-133515: fix docs for unawaited coroutines in debug mode (GH-134081) (#134093)
gh-133515: fix docs for unawaited coroutines in debug mode (GH-134081)
(cherry picked from commit d94b1e9cac)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-16 15:37:01 +00:00
Miss Islington (bot)
fe5636ea96
[3.14] gh-124210: Add introduction to threading docs (GH-127046) (#134090)
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-16 12:29:40 +00:00
Miss Islington (bot)
ba06ccbb6d
Improve the administrative install docs for Python Install Manager (GH-134066)
(cherry picked from commit 6a22963291)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-05-15 21:18:26 +00:00
Miss Islington (bot)
b6299e8f16
[3.14] gh-133986: Document string split algorithm when sep is None and maxsplit is 0 (GH-133987) (#133993)
---------
(cherry picked from commit 3e23047363)

Co-authored-by: Joey Smith <joeysmith@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
2025-05-14 21:32:45 -04:00
Miss Islington (bot)
ea15c55143
[3.14] Docs: remove link elements in builders other than HTML (GH-133720) (#134005)
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2025-05-14 18:22:07 +03:00
Miss Islington (bot)
24847d04b2
gh-133928: Improvements to using/windows.rst (GH-133952)
(cherry picked from commit fc3cddd90a)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-05-13 16:06:29 +00:00
Miss Islington (bot)
69b4387f78
[3.14] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133942)
If the error handler is used, a new bytes object is created to set as
the object attribute of UnicodeDecodeError, and that bytes object then
replaces the original data. A pointer to the decoded data will became invalid
after destroying that temporary bytes object. So we need other way to return
the first invalid escape from _PyUnicode_DecodeUnicodeEscapeInternal().

_PyBytes_DecodeEscape() does not have such issue, because it does not
use the error handlers registry, but it should be changed for compatibility
with _PyUnicode_DecodeUnicodeEscapeInternal().
(cherry picked from commit 9f69a58623)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-13 16:25:08 +03:00
Miss Islington (bot)
5ba525c7d0
[3.14] gh-133413: Fix references to removed Request.has_data (GH-133414) (GH-133945)
The has_data() method of http.request.Request
was removed in version 3.4.
(cherry picked from commit 86c1d439e0)

Co-authored-by: ppaez <pp@pp.com.mx>
2025-05-12 18:23:35 +00:00
Miss Islington (bot)
ecc12bff24
[3.14] gh-133904: Fix math.factorial documentation (GH-133907) (#133918)
gh-133904: Fix `math.factorial` documentation (GH-133907)
(cherry picked from commit 27ed64575d)

Co-authored-by: mkaraev <maruf.karaev97@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-12 12:53:44 +00:00
Miss Islington (bot)
94938caf35
[3.14] gh-119180: annotationlib: Fix values of Format members in docs (GH-133841) (#133903)
gh-119180: annotationlib: Fix values of Format members in docs (GH-133841)
(cherry picked from commit 0eb448cae5)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-05-11 15:49:21 +00:00
Miss Islington (bot)
a3475e68bb
[3.14] gh-119180: More documentation for PEP 649/749 (GH-133552) (#133902)
gh-119180: More documentation for PEP 649/749 (GH-133552)

The SC asked that the Appendix in PEP-749 be added to the docs.
(cherry picked from commit 3396df56d0)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-11 15:49:06 +00:00
Miss Islington (bot)
f7d7248a03
[3.14] gh-133823: update "Pending Removal in 3.15" notes about TypedDict (GH-133864) (#133870)
gh-133823: update "Pending Removal in 3.15" notes about `TypedDict` (GH-133864)
(cherry picked from commit f91127ae1a)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-11 08:16:28 +00:00
Miss Islington (bot)
13c94d0401
[3.14] gh-132642: document how to render human-readable timedelta objects (GH-133825) (#133837)
gh-132642: document how to render human-readable `timedelta` objects (GH-133825)
(cherry picked from commit efcc42ba70)

Co-authored-by: Kentaro Jay Takahashi <64148935+KentaroJay@users.noreply.github.com>
2025-05-10 16:00:36 +00:00
Miss Islington (bot)
f3f22f9f51
[3.14] Tiny doc fix to double up backslashes in a Windows filesystem path (GH-133828) (#133830)
Tiny doc fix to double up backslashes in a Windows filesystem path (GH-133828)
(cherry picked from commit e7741dd773)

Co-authored-by: Tim Golden <mail@timgolden.me.uk>
2025-05-10 13:51:49 +00:00
Miss Islington (bot)
10cd1aafc4
[3.14] gh-115999: Note Python 3.14 free-threaded changes in What's New (gh-131285) (gh-133824)
gh-115999: Note Python 3.14 free-threaded changes in What's New (gh-131285)

---------
(cherry picked from commit f28cbc9fd3)

Co-authored-by: Donghee Na <donghee.na@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: mpage <mpage@cs.stanford.edu>
2025-05-10 10:37:02 +00:00
Miss Islington (bot)
4b78cbd76f
[3.14] gh-132971: Update shutil.which() docs (GH-133067) (#133803)
gh-132971: Update shutil.which() docs (GH-133067)
(cherry picked from commit d13d5fdf61)

Co-authored-by: Kokona <125976684+985025074@users.noreply.github.com>
2025-05-10 10:51:55 +02:00
Miss Islington (bot)
4e57e213d6
[3.14] gh-123299: Some copyedits to What's New in 3.14 (GH-133622) (#133771)
Co-authored-by: Éric <earaujo@caravan.coop>
2025-05-09 19:12:48 +03:00
Miss Islington (bot)
9ad1516357
[3.14] gh-46236: Document PyUnicode_BuildEncodingMap (GH-133270) (#133769)
gh-46236: Document PyUnicode_BuildEncodingMap (GH-133270)
(cherry picked from commit f34ec09ba5)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-05-09 15:24:59 +00:00
Miss Islington (bot)
94a823f501
[3.14] Docs: use boolean constants for returning boolean value (GH-133325) (GH-133760)
(cherry picked from commit 076004ae54)

Co-authored-by: Yongzi Li <1538321957@qq.com>
2025-05-09 14:17:53 +00:00
Miss Islington (bot)
9a77637067
[3.14] gh-133644: update Py_InteractiveFlag deprecation notice (GH-133749) (#133751)
gh-133644: update `Py_InteractiveFlag` deprecation notice (GH-133749)
(cherry picked from commit 3ed8d6fdd1)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-09 13:48:35 +00:00
Miss Islington (bot)
79644893c5
[3.14] Fix typo in pending-removal-in-3.14.rst (GH-133680) (GH-133697)
(cherry picked from commit 9546eeea90)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2025-05-08 19:03:10 +00:00
Miss Islington (bot)
3fcb9afb20
Adds docs to help with troubleshooting pip installs. (GH-133692)
(cherry picked from commit dd670fa7ca)

Co-authored-by: Steve Dower <steve.dower@python.org>
2025-05-08 18:35:57 +00:00