Commit graph

28071 commits

Author SHA1 Message Date
Miss Islington (bot)
6cdd3a4e91
[3.12] Minor improvements to the programming FAQ (GH-127261) (#131965)
Minor improvements to the programming FAQ (GH-127261)
(cherry picked from commit 23a658b9af)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-01 07:26:36 +00:00
Miss Islington (bot)
ce85eb544d
[3.12] gh-125957: sync argument naming in sphinx docs of the cmath and help() (GH-125958) (#131963)
gh-125957: sync argument naming in sphinx docs of the cmath and help() (GH-125958)
(cherry picked from commit 0a3eb8855c)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-01 07:23:33 +00:00
Miss Islington (bot)
525eddf220
[3.12] gh-131885: Document that dict.setdefault and dict.get take no keyword arguments (GH-128208) (#131894)
gh-131885: Document that `dict.setdefault` and `dict.get` take no keyword arguments (GH-128208)
(cherry picked from commit edfbd8c062)

Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
2025-03-30 09:29:49 +00:00
Miss Islington (bot)
f1b65d757d
[3.12] gh-129994: update docs when using dualstack_ipv6 in socket.create_server (GH-129996) (#131891)
gh-129994: update docs when using `dualstack_ipv6` in `socket.create_server` (GH-129996)
(cherry picked from commit 044a1e13d5)

Co-authored-by: Alexander Ershov <150328014+AEErshov@users.noreply.github.com>
2025-03-30 10:28:26 +02:00
Miss Islington (bot)
3cd04d47dd
[3.12] gh-127541: Update os.walk example (GH-127765) (#131873)
gh-127541: Update os.walk example (GH-127765)

Update os.walk example to be more modern, skip `__pycache__` dirs rather than `CVS` dirs.
(cherry picked from commit a5949986d6)

Co-authored-by: Totosuki <116938397+totosuki@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-03-29 10:34:35 +00:00
Miss Islington (bot)
b2dbc4f3a7
[3.12] Fix typo in importlib.metadata.rst (gh-131596) (#131631)
Fix typo in importlib.metadata.rst (gh-131596)
(cherry picked from commit 5fc889ffbf)

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
2025-03-27 15:43:03 +02:00
Miss Islington (bot)
b7c5371621
[3.12] gh-131741: Add documentation for Windows version detection change in platform (GH-131742) (#131768)
gh-131741: Add documentation for Windows version detection change in `platform` (GH-131742)

Document the behavior change between 3.11 & 3.12, where ``platform`` now correctly detects Windows 11 and Windows Server releases past Windows Server 2012.
(cherry picked from commit b9ca438daa)

Co-authored-by: Idan Noiman <idann@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Wulian <1055917385@qq.com>
2025-03-26 15:00:08 +00:00
Miss Islington (bot)
3911bd5cc3
[3.12] gh-130283: update deprecated links and examples in urllib.request docs (GH-130284) (#131627)
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:36:32 +00:00
Miss Islington (bot)
7d5b8131b1
[3.12] gh-121529: Document from_ parameter in _mboxMMDF public methods (GH-121530) (#131622)
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:18:32 +00:00
Miss Islington (bot)
b1e2384335
[3.12] gh-131457: Fix typo in BNF description of function signatures (GH-131460) (#131576)
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:01:47 +00:00
Gregory P. Smith
3eb7a9024b
[3.12] gh-70647: update docs to mention the datetime 1900 year default 2/29 issue (#131534)
* 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.
2025-03-20 21:50:10 -07:00
Adam Turner
e1626c3b70
[3.12] GH-121970: Extract pydoc_topics into a new extension (GH-131256) (#131512)
(cherry picked from commit c1a02f9101)
2025-03-20 15:40:37 +00:00
Miss Islington (bot)
caa73883f9
[3.12] Docs: Fix documentation for "PyTypeObject Definition" (GH-130936) (GH-131459)
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:22 +01:00
Miss Islington (bot)
105bc83b78
[3.12] gh-131417: Mention asyncio Future and Task in docs for generic classes list (GH-131422) (#131446)
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:24:16 +01:00
Miss Islington (bot)
981566e399
[3.12] Docs: fix shell command formatting (GH-131310) (#131444)
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:52:17 +00:00
Miss Islington (bot)
7a8097c57a
[3.12] gh-116666: Add "token" glossary term (GH-130888) (GH-131368)
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:09 +01:00
Miss Islington (bot)
9d23a6d57b
[3.12] gh-131002: clarify how to enforce sqlite3 column types for generated fields (GH-131006) (#131386)
(cherry picked from commit f48887fb97)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-03-18 12:10:01 +01:00
Miss Islington (bot)
2601dae183
[3.12] gh-130132: properly free resources in urrlib.urlopen examples (GH-130280) (#131395)
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:34:45 +00:00
Miss Islington (bot)
c23a2d3bdc
[3.12] gh-131094: Refine math.isclose docs (GH-131139) (#131393)
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:20:52 +00:00
Miss Islington (bot)
040583387b
[3.12] gh-129675: Update documentation for tp_basicsize & tp_itemsize (GH-129850) (GH-131078)
- 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:14 +01:00
Hugo van Kemenade
4c1d52934d
[3.12] gh-124385: Document and soft-deprecate PyLong_AS_LONG (GH-124386) (#130549)
(cherry picked from commit 425587a110)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-03-17 14:59:12 +02:00
Hugo van Kemenade
3983fcad95
[3.12] gh-109961: Docs: Fix incorrect rendering of __replace__ in copy.rst (GH-109968) (#130909)
(cherry picked from commit 0baf72696e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2025-03-17 14:58:14 +02:00
donBarbos
baea0e2b05
[3.12] gh-130160: use .. program:: directive for documenting http.server CLI (GH-131010) (#131294)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-03-17 10:28:11 +02:00
Miss Islington (bot)
c5a23ab9a6
[3.12] gh-131327: Document winsound.SND_APPLICATION (GH-131328) (#131329)
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:45:57 +00:00
Miss Islington (bot)
1d17f1a979
[3.12] gh-130160: use .. program:: directive for documenting doctest CLI (GH-131034) (#131321)
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 12:00:39 +00:00
Miss Islington (bot)
77ece5aed8
[3.12] gh-130814: Enhance documentation for Python C API type objects (GH-130817) (#131224)
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 10:01:05 +00:00
Miss Islington (bot)
39b4f8b6ed
[3.12] gh-124269: Simplify typing.Annotated docs (GH-130770) (#131223)
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:54:08 +00:00
Yuki Kobayashi
729ec5b4fc
[3.12] gh-101100: Fix sphinx warnings in library/asyncio-subprocess.rst (GH-130994) (#131075)
(cherry picked from commit 7cc99a54b7)
2025-03-11 12:31:33 +00:00
Miss Islington (bot)
c82795a0bb
[3.12] gh-130711: Document PyBaseObject_Type (GH-130712) (GH-130793)
(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:45 +01:00
Miss Islington (bot)
8584790d6f
[3.12] gh-80421: Correct definitions of time (GH-130984) (#131023)
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:18:31 +00:00
Miss Islington (bot)
9f7f2c0df1
[3.12] gh-130160: use .. program:: directive for documenting pdb CLI (GH-130996) (#131013)
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:18:43 +00:00
donBarbos
11d550c2f3
[3.12] gh-130160: use .. program:: directive for documenting webbrowser CLI (GH-130995) (#131004)
* gh-130160: use `.. program::` directive for documenting `webbrowser` CLI (#130995)

use `.. program::` directive for documenting `webbrowser` CLI

(cherry picked from commit 92e5f826ac)

* remove extra paragraph
2025-03-09 07:33:56 +00:00
Miss Islington (bot)
552dad1692
[3.12] gh-123726: Document caveats of zipfile.Path around name sanitization (GH-130537) (#130987)
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:45:48 +00:00
Miss Islington (bot)
56fa6f39ff
[3.12] Correct function name in Doc/extending/embedding.rst (GH-127539) (#130946)
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:14:25 +00:00
Miss Islington (bot)
60be65aaf0
[3.12] Update links from typing.readthedocs.io to typing.python.org (GH-130877) (#130884)
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:35:46 +00:00
Miss Islington (bot)
919300e42a
[3.12] GH-125722: Increase minimum supported Sphinx to 8.2.0 (GH-130444) (#130859)
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:38:04 +00:00
sobolevn
50270fc980
[3.12] gh-129567: Add a note to typing.TypedDict docs about name mangling (GH-130233) (#130842) 2025-03-04 15:34:34 +00:00
Miss Islington (bot)
23f11e32c2
[3.12] Docs: Fix a misplaced statement in the document for ServerProxy (GH-130616) (GH-130639)
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:20 +01:00
Hugo van Kemenade
a22cfd4244
[3.12] gh-101100: Fix Sphinx documentation warnings in collections.rst (GH-130629) (#130782)
(cherry picked from commit 373eb1b47a)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
2025-03-03 10:05:58 +00:00
Miss Islington (bot)
9b28a4edee
[3.12] gh-101100: Fix sphinx warnings in library/email.errors.rst (GH-130774) (#130780)
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:05:12 +02:00
Miss Islington (bot)
43635f2f52
[3.12] gh-129015: Improve disambiguation between NotImplemented and NotImplementedError (GH-129562) (#130777)
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:31:08 +00:00
Miss Islington (bot)
96e6932bef
[3.12] Fix grammar typo in Doc/c-api/arg.rst (GH-130741) (#130758)
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 11:21:57 +00:00
Miss Islington (bot)
257240e723
[3.12] Add link in the importlib.metadata.version() docs (GH-130739) (#130760)
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:43:06 +00:00
Miss Islington (bot)
a0676db61e
[3.12] gh-128481: Improve documentation for traceback.FrameSummary (GH-128484) (#130754)
* 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:50:32 +00:00
Miss Islington (bot)
c192944362
[3.12] gh-130160: use .. program:: directive for documenting cProfile CLI (GH-130314) (#130746)
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:46:45 +00:00
Miss Islington (bot)
245ca2607c
[3.12] GH-121970: Extract `issue_role` into a new extension (GH-130615) (#130652)
(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:33 +00:00
Hugo van Kemenade
a55a9cd6c2
[3.12] GH-92897: schedule the check_home deprecation to 3.15 (GH-129102) (#130585)
Co-authored-by: Filipe Laíns 🇵🇸 <lains@riseup.net>
2025-02-27 18:17:08 +00:00
Petr Viktorin
a678d8e511
[3.12] gh-129405: Fix doc for Py_mod_multiple_interpreters default, and add test (GH-129406) (GH-130510) 2025-02-27 16:30:46 +01:00
Miss Islington (bot)
c7ac503f4b
[3.12] Doc: Strip trailing whitespace in `pydoc_topics` (GH-130492) (#130636)
(cherry picked from commit 3f3e1c4095)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-02-27 14:26:42 +00:00
Adam Turner
fb073b5e3b
[3.12] GH-121970: Extract pydoc_topics into a new extension (#129116) (#130443)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-02-27 14:18:54 +00:00