Commit graph

28786 commits

Author SHA1 Message Date
Petr Viktorin
478eb73103
[3.13] gh-130587: Add hand-written docs for non-OP tokens (GH-130588) (GH-131465)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2025-03-24 12:34:23 +00:00
Miss Islington (bot)
f577a43b8d
[3.13] gh-130283: update deprecated links and examples in urllib.request docs (GH-130284) (#131626)
gh-130283: update deprecated links and examples in `urllib.request` docs (GH-130284)
(cherry picked from commit fd459b1153)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-23 13:35:24 +00:00
Miss Islington (bot)
5e3f93a8d7
[3.13] gh-121529: Document from_ parameter in _mboxMMDF public methods (GH-121530) (#131623)
gh-121529: Document `from_` parameter in `_mboxMMDF` public methods (GH-121530)
(cherry picked from commit 557d2d20d4)

Co-authored-by: Sebb <sebbASF@users.noreply.github.com>
2025-03-23 12:17:37 +00:00
Miss Islington (bot)
eedaa4eefb
[3.13] gh-131457: Fix typo in BNF description of function signatures (GH-131460) (#131575)
gh-131457: Fix typo in BNF description of function signatures (GH-131460)
(cherry picked from commit 8b7d20d3a9)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
2025-03-22 08:00:54 +00:00
Adam Turner
26b04a16ee
[3.13] GH-121970: Extract pydoc_topics into a new extension (GH-131256) (#131511)
(cherry picked from commit c1a02f9101)
2025-03-20 15:34:10 +00:00
Miss Islington (bot)
2b5feb1f9e
[3.13] Docs: Fix documentation for "PyTypeObject Definition" (GH-130936) (GH-131458)
The structure definition for `PyTypeObject` is in `Include/cpython/object.h`,
not in `Include/object.h`.
(cherry picked from commit a0478c9f0c)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-03-20 13:41:06 +01:00
Miss Islington (bot)
69db2ebfce
[3.13] gh-131117: Update tp_finalize example to use PyErr_GetRaisedException (GH-131118) (#131476)
gh-131117: Update tp_finalize example to use PyErr_GetRaisedException (GH-131118)

The tp_finalize C API doc used PyErr_Fetch() and PyErr_Restore() in
its example code. That API was deprecated in 3.12.

Update to point to the suggested replacement function
PyErr_GetRaisedException() which has a sample usage.
(cherry picked from commit a4832f6b9a)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-03-19 17:34:15 +00:00
Miss Islington (bot)
49efc411fa
[3.13] gh-118915: Document PY_MONITORING_IS_INSTRUMENTED_EVENT (GH-128026) (GH-131424)
(cherry picked from commit f819900245)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-03-19 11:37:34 +01:00
Miss Islington (bot)
b39e67396f
[3.13] gh-131417: Mention asyncio Future and Task in docs for generic classes list (GH-131422) (#131445)
gh-131417: Mention asyncio Future and Task in docs for generic classes list (GH-131422)

Mention asyncio Future and Task in docs for generic classes list
(cherry picked from commit 61b4b2c57c)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2025-03-19 10:23:48 +01:00
Miss Islington (bot)
5d73970687
[3.13] Docs: fix shell command formatting (GH-131310) (#131443)
Docs: fix shell command formatting (GH-131310)

replace "zypper in" with "zypper install" to avoid incorrect highlighting
(cherry picked from commit 267c06d6a8)

Co-authored-by: partev <petrosyan@gmail.com>
2025-03-19 07:50:53 +00:00
Miss Islington (bot)
25ae2045a8
[3.13] gh-116666: Add "token" glossary term (GH-130888) (GH-131367)
gh-116666: Add "token" glossary term (GH-130888)

Add glossary entry for `token`, and link to it.
Avoid talking about tokens in the SyntaxError intro (errors.rst); at this point
tokenization is too much of a technical detail. (Even to an advanced reader,
the fact that a *single* token is highlighted isn't too relevant. Also, we don't
need to guarantee that it's a single token.)
(cherry picked from commit 30d5205849)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-03-18 12:51:02 +01:00
Miss Islington (bot)
e425b075fe
[3.13] gh-131002: clarify how to enforce sqlite3 column types for generated fields (GH-131006) (#131385)
(cherry picked from commit f48887fb97)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-03-18 12:09:41 +01:00
Miss Islington (bot)
f297dabbe0
[3.13] gh-130132: properly free resources in urrlib.urlopen examples (GH-130280) (#131394)
gh-130132: properly free resources in `urrlib.urlopen` examples (GH-130280)
(cherry picked from commit 77d2fd4413)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-18 09:33:19 +00:00
Miss Islington (bot)
98195b2108
[3.13] gh-131094: Refine math.isclose docs (GH-131139) (#131392)
gh-131094: Refine `math.isclose` docs (GH-131139)
(cherry picked from commit 3f50f96586)

Co-authored-by: Guy Jacoby <49398101+guyjacoby@users.noreply.github.com>
2025-03-18 09:21:13 +00:00
Miss Islington (bot)
3feebdd61d
[3.13] Docs: Fix incorrect sphinx markup for a class member (GH-130970) (GH-131366)
(cherry picked from commit 9a634c5c0c)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-03-17 16:46:05 +01:00
Miss Islington (bot)
6ceb8fcfb6
[3.13] gh-129675: Update documentation for tp_basicsize & tp_itemsize (GH-129850) (GH-131079)
- Add alignment requirement
- Mention that ob_size is unreliable if you don't control it
- Add some links for context
- basicsize should include the base type in generaly not just PyObject
- suggest Py_SIZE & Py_SET_SIZE

This adds a “by-the-way” link to `PyObject_New`, which shouldn't be
used for GC types. In order to be comfortable linking to it, I also
add a link to `PyObject_GC_New` from its docs. And the same for
`*Var` variants, while I'm here.

(cherry picked from commit ad0f618ab3)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-03-17 16:18:26 +01:00
Miss Islington (bot)
4d7d249a05
[3.13] gh-131327: Document winsound.SND_APPLICATION (GH-131328) (#131330)
gh-131327: Document winsound.SND_APPLICATION (GH-131328)
(cherry picked from commit bf4c1bf344)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-16 15:52:48 +00:00
Miss Islington (bot)
1512cc0a81
[3.13] gh-130160: use .. program:: directive for documenting doctest CLI (GH-131034) (#131320)
gh-130160: use `.. program::` directive for documenting `doctest` CLI (GH-131034)
(cherry picked from commit 9558d22ac3)

Co-authored-by: donBarbos <donbarbos@proton.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-16 11:59:26 +00:00
Miss Islington (bot)
b7e15a93b4
[3.13] gh-130160: use .. program:: directive for documenting http.server CLI (GH-131010) (#131293)
gh-130160: use `.. program::` directive for documenting `http.server` CLI (GH-131010)
(cherry picked from commit 7ae9c5dd25)

Co-authored-by: donBarbos <donbarbos@proton.me>
2025-03-15 21:12:40 +02:00
Miss Islington (bot)
6c10767232
[3.13] gh-130814: Enhance documentation for Python C API type objects (GH-130817) (#131225)
gh-130814: Enhance documentation for Python C API type objects (GH-130817)

The "Type Objects" title in `c-api/typeobj.rst`, duplicating the title of `c-api/type.rst`,
has been changed to "Type Objects Structures", thereby slightly improving Sphinx
search.
(cherry picked from commit 6b932edc52)

Co-authored-by: sharktide <meherrihaan@gmail.com>
2025-03-14 09:59:19 +00:00
Miss Islington (bot)
0f97abf498
[3.13] gh-124269: Simplify typing.Annotated docs (GH-130770) (#131222)
gh-124269: Simplify `typing.Annotated` docs (GH-130770)

---------
(cherry picked from commit e4ac196aaa)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-14 09:53:03 +00:00
Russell Keith-Magee
589f422d1b
[3.13] gh-130940: Remove PyConfig.use_system_logger (#131129)
Removes ``PyConfig.use_system_logger``, resolving an ABI incompatibility introduced in
3.13.2.

Changes the default behavior of iOS to *always* direct stdout/stderr to the system log.
2025-03-13 11:53:11 +08:00
Yuki Kobayashi
a49f85a694
[3.13] gh-101100: Fix sphinx warnings in library/asyncio-subprocess.rst (GH-130994) (#131074)
(cherry picked from commit 7cc99a54b7)
2025-03-11 14:30:47 +02:00
Miss Islington (bot)
30e8bd2a41
[3.13] gh-130711: Document PyBaseObject_Type (GH-130712) (GH-130792)
(cherry picked from commit b3c18bfd82)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-03-10 15:05:38 +01:00
Miss Islington (bot)
edb69578ed
[3.13] gh-80421: Correct definitions of time (GH-130984) (#131022)
gh-80421: Correct definitions of time (GH-130984)

Based on the Wikipedia article, UTC is better said to be a successor than a renaming of GTC and language agnostic rather than an English-French compromise.
(cherry picked from commit 98fa4a49fe)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-03-09 20:15:37 +00:00
Miss Islington (bot)
28406cd0a1
[3.13] gh-130160: use .. program:: directive for documenting pdb CLI (GH-130996) (#131014)
gh-130160: use `.. program::` directive for documenting `pdb` CLI (GH-130996)
(cherry picked from commit c240c2d88a)

Co-authored-by: donBarbos <donbarbos@proton.me>
2025-03-09 16:15:41 +00:00
Miss Islington (bot)
d50941c1c3
[3.13] gh-130160: use .. program:: directive for documenting webbrowser CLI (GH-130995) (#131003)
gh-130160: use `.. program::` directive for documenting `webbrowser` CLI (GH-130995)

use `.. program::` directive for documenting `webbrowser` CLI
(cherry picked from commit 92e5f826ac)

Co-authored-by: donBarbos <donbarbos@proton.me>
2025-03-09 07:03:56 +00:00
Miss Islington (bot)
aef7edaf23
[3.13] gh-123726: Document caveats of zipfile.Path around name sanitization (GH-130537) (#130986)
gh-123726: Document caveats of zipfile.Path around name sanitization (GH-130537)

Add a note to the `zipfile.Path` class documentation clarifying that it does not sanitize filenames. This emphasizes the caller's responsibility to validate or sanitize inputs, especially when handling untrusted ZIP archives, to prevent path traversal vulnerabilities. The note also references the `extract` and `extractall` methods for comparison and suggests using `os.path.abspath` and `os.path.commonpath` for safe filename resolution.
(cherry picked from commit a3990df612)

Co-authored-by: Affan Shaikhsurab <51104750+AffanShaikhsurab@users.noreply.github.com>
2025-03-08 21:43:12 +00:00
Miss Islington (bot)
e0838a2022
[3.13] Correct function name in Doc/extending/embedding.rst (GH-127539) (#130945)
Correct function name in `Doc/extending/embedding.rst` (GH-127539)
(cherry picked from commit e5527f2cdd)

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>
2025-03-07 13:12:44 +00:00
Miss Islington (bot)
ab749678e5
[3.13] Update links from typing.readthedocs.io to typing.python.org (GH-130877) (#130883)
Update links from typing.readthedocs.io to typing.python.org (GH-130877)
(cherry picked from commit 4f6218959e)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2025-03-05 15:34:17 +00:00
Miss Islington (bot)
80cce59929
[3.13] GH-125722: Increase minimum supported Sphinx to 8.2.0 (GH-130444) (#130858)
GH-125722: Increase minimum supported Sphinx to 8.2.0 (GH-130444)
(cherry picked from commit e53d105872)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-03-05 00:37:14 +00:00
Miss Islington (bot)
418021e229
[3.13] gh-129567: Add a note to typing.TypedDict docs about name mangling (GH-130233) (#130841)
gh-129567: Add a note to `typing.TypedDict` docs about name mangling (GH-130233)
(cherry picked from commit 63ffb406bb)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-03-04 15:21:11 +00:00
Miss Islington (bot)
57dcbfd7da
[3.13] Docs: Fix a misplaced statement in the document for ServerProxy (GH-130616) (GH-130640)
Docs: Fix a misplaced statement in the document for `ServerProxy` (GH-130616)

The sentence "If an HTTPS URL ..." explains what the parameter means,
so moved it to the paragraph explaining what the other parameters mean.
(cherry picked from commit b26286ca49)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-03-03 15:09:26 +01:00
Miss Islington (bot)
36e696738b
[3.13] gh-101100: Fix sphinx warnings in library/email.errors.rst (GH-130774) (#130781)
gh-101100: Fix sphinx warnings in `library/email.errors.rst` (GH-130774)
(cherry picked from commit a105f99019)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-03-03 12:04:51 +02:00
Miss Islington (bot)
f51a7483f5
[3.13] gh-101100: Fix Sphinx documentation warnings in collections.rst (GH-130629) (#130779)
gh-101100: Fix Sphinx documentation warnings in `collections.rst` (GH-130629)
(cherry picked from commit 373eb1b47a)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
2025-03-03 09:57:28 +00:00
Miss Islington (bot)
e96f914328
[3.13] gh-129015: Improve disambiguation between NotImplemented and NotImplementedError (GH-129562) (#130776)
gh-129015: Improve disambiguation between `NotImplemented` and `NotImplementedError` (GH-129562)

---------

(cherry picked from commit a85eeb9771)

Co-authored-by: Mike Castle <dalgoda+github@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-03-03 08:29:29 +00:00
Miss Islington (bot)
3bef4af301
[3.13] gh-128481: indicate that the default value for FrameSummary.end_lineno changed in 3.13 (GH-130755) (#130767)
gh-128481: indicate that the default value for `FrameSummary.end_lineno` changed in 3.13 (GH-130755)

The value taken by `FrameSummary.end_lineno` when passing `end_lineno=None` changed in gh-112097.

Previously, a `end_lineno` could be specified to be `None` directly but since 939fc6d, passing None makes
the constructor use the value of `lineno` instead.
(cherry picked from commit c6513f7a62)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-02 17:22:48 +00:00
Miss Islington (bot)
9854566626
[3.13] Fix grammar typo in Doc/c-api/arg.rst (GH-130741) (#130759)
Fix grammar typo in `Doc/c-api/arg.rst` (GH-130741)
(cherry picked from commit 37145cb89f)

Co-authored-by: Arijit Kumar Das <arijitkrdas2004@outlook.com>
2025-03-02 13:14:29 +02:00
Miss Islington (bot)
ff14c1e7a9
[3.13] Add link in the importlib.metadata.version() docs (GH-130739) (#130761)
Add link in the `importlib.metadata.version()` docs (GH-130739)

Link the specification for the returned data makes it clearer what this is
and what the format of the version string can be.
(cherry picked from commit c71e55869e)

Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
2025-03-02 10:42:15 +00:00
Miss Islington (bot)
dca599eaad
[3.13] gh-128481: Improve documentation for traceback.FrameSummary (GH-128484) (#130753)
* gh-128481: Improve documentation for `traceback.FrameSummary` (GH-128484)

Complete the `traceback.FrameSummary` signature and add missing
documentation for the `colno` and `end_{col,line}no` attributes.
(cherry picked from commit 051f0e5683)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2025-03-02 09:48:30 +00:00
Miss Islington (bot)
8edf17f260
[3.13] gh-130160: use .. program:: directive for documenting cProfile CLI (GH-130314) (#130745)
gh-130160: use `.. program::` directive for documenting `cProfile` CLI (GH-130314)
(cherry picked from commit 5181ddb29f)

Co-authored-by: Apostol Fet <90645107+ApostolFet@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-03-01 20:45:33 +00:00
Miss Islington (bot)
b53065a0a5
[3.13] GH-121970: Extract `issue_role` into a new extension (GH-130615) (#130651)
(cherry picked from commit 043ab3af9a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-27 21:29:26 +00:00
Hugo van Kemenade
4100fb0537
[3.13] GH-92897: schedule the check_home deprecation to 3.15 (GH-129102) (#130583)
Co-authored-by: Filipe Laíns 🇵🇸 <lains@riseup.net>
2025-02-27 18:16:33 +00:00
Miss Islington (bot)
c6c2071cab
[3.13] Doc: Strip trailing whitespace in `pydoc_topics` (GH-130492) (#130635)
(cherry picked from commit 3f3e1c4095)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-02-27 14:25:30 +00:00
Adam Turner
93b2bcb52d
[3.13] GH-121970: Extract pydoc_topics into a new extension (#129116) (#130441)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-02-27 14:18:46 +00:00
Miss Islington (bot)
75358a8e95
[3.13] Docs: Fix some semantic usages of iterator.__iter__ (GH-130172) (GH-130543)
These references to an `__iter__` method mean `object.__iter__`, not `iterator.__iter__`.
(cherry picked from commit 4d3a7ea354)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-02-26 11:02:53 +01:00
Miss Islington (bot)
3d64fd8896
[3.13] gh-130433: Update documentation for MultipartConversionError (GH-130436) (GH-130565)
(cherry picked from commit b536e37104)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-02-26 09:59:12 +01:00
Kanishk Pachauri
28bfc1c996
[3.13] gh-130461: Remove unnecessary usages of .. index:: directives in Doc/library/uuid.rst (#130526) (#130548)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-02-25 15:24:46 +02:00
Miss Islington (bot)
3161f01760
[3.13] gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-130335) (GH-130511)
* Clarify sys.getdefaultencoding() documentation

* Add missing documentation for PyUnicode_GetDefaultEncoding,
  the C equivalent of sys.getdefaultencoding
(cherry picked from commit 9f25c1f012)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-02-24 17:10:17 +01:00
Miss Islington (bot)
d71b167c5c
[3.13] gh-129405: Fix doc for Py_mod_multiple_interpreters default, and add test (GH-129406) (GH-130507)
(cherry picked from commit fc8d2cba54)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-02-24 16:49:35 +01:00