Commit graph

28056 commits

Author SHA1 Message Date
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
Miss Islington (bot)
6a268a046f
[3.12] Fix indentation for contextlib.asynccontextmanager docs (GH-127333) (#130580)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-02-26 15:03:18 +02:00
Miss Islington (bot)
7575abb9d9
[3.12] Docs: Fix some semantic usages of iterator.__iter__ (GH-130172) (GH-130544)
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:03:00 +01:00
Miss Islington (bot)
2592402bba
[3.12] gh-130433: Update documentation for MultipartConversionError (GH-130436) (GH-130566)
(cherry picked from commit b536e37104)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-02-26 09:59:19 +01:00
Kanishk Pachauri
ca9e52dac1
[3.12] gh-130461: Remove unnecessary usages of .. index:: directives in Doc/library/uuid.rst (#130526) (#130546)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-25 15:25:20 +02:00
Miss Islington (bot)
e38cded312
[3.12] gh-46236: Add docs for PyUnicode_GetDefaultEncoding() doc (GH-130335) (GH-130512)
* 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:27 +01:00
Miss Islington (bot)
3c20e8bc3a
[3.12] gh-127522: wsgiref: indicate that start_response objects should follow a specific protocol (GH-127525) (GH-130505)
(cherry picked from commit 39ba4b6619)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-02-24 15:08:22 +01:00
Miss Islington (bot)
da471d9d79
[3.12] gh-127805: Clarify Formatter initialization in logging.rst. (GH-127850) (#130393)
gh-127805: Clarify Formatter initialization in logging.rst. (GH-127850)
(cherry picked from commit 5d66c55c8a)

Co-authored-by: UV <yuvrajpradhan667@gmail.com>
2025-02-23 23:01:30 -05:00
Miss Islington (bot)
b505d0f609
[3.12] gh-130160: use .. program:: directive for documenting idle CLI (GH-130278) (#130495)
gh-130160: use `.. program::` directive for documenting `idle` CLI (GH-130278)

---------




(cherry picked from commit 0ff1611574)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
2025-02-23 22:58:42 -05:00
Adam Turner
ac455678e7
[3.12] Docs: Test presence of optional extensions with importlib (GH-130445) (#130466)
* [3.12] Docs: Test presence of optional extensions with importlib (GH-130445)
(cherry picked from commit 3cc9e867eb)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-02-22 21:06:13 +00:00
Adam Turner
9bd92fa241
[3.12] gh-121970: Replace .. coroutine{method,function} with :async: (GH-130448) (#130467)
(cherry picked from commit 5ec4bf86b7)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-02-22 18:22:29 +00:00
Miss Islington (bot)
6c59ea6f14
[3.12] Add measuring unit to sys.getswitchinterval docs (GH-130457) (#130459)
Add measuring unit to `sys.getswitchinterval` docs (GH-130457)
(cherry picked from commit 89d8b2d14b)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-02-22 16:13:31 +00:00
Miss Islington (bot)
8559dc3124
[3.12] gh-129712: Document the wheels tags corresponding to each universal SDK. (GH-130389) (#130450)
Document the architectures supported by macOS universal SDK configuration flags,
and add details on wheel tag naming.
(cherry picked from commit 474c388740)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-02-22 08:38:41 +00:00
Adam Turner
35c30608e3
[3.12] GH-121970: Replace custom abstract method directive with the `:abstract:` option (GH-129311) (#130440)
(cherry picked from commit 30e892473e)
2025-02-22 02:11:47 +00:00
Miss Islington (bot)
f452b81b8d
[3.12] gh-130159: Fix list indentation in collections.abc (GH-130165) (#130438)
gh-130159: Fix list indentation in collections.abc (GH-130165)
(cherry picked from commit 8e96adf453)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-02-22 01:48:15 +00:00
Hugo van Kemenade
546ac0191f
[3.12] Itertool recipe additions (gh-127483) (gh-130362) 2025-02-20 17:32:35 -06:00