Commit graph

13573 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)
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)
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)
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)
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
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)
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)
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)
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)
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)
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)
10dd9725b8
[3.13] gh-127522: wsgiref: indicate that start_response objects should follow a specific protocol (GH-127525) (GH-130504)
(cherry picked from commit 39ba4b6619)

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

Co-authored-by: UV <yuvrajpradhan667@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-24 07:23:16 +02:00
Miss Islington (bot)
766170405e
[3.13] gh-130160: use .. program:: directive for documenting idle CLI (GH-130278) (#130494)
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:28 -05:00
Miss Islington (bot)
c68a8722be
[3.13] gh-121970: Replace .. coroutine{method,function} with :async: (GH-130448) (#130465)
(cherry picked from commit 5ec4bf86b7)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-02-22 18:00:49 +00:00
Miss Islington (bot)
27a28eef87
[3.13] Add measuring unit to sys.getswitchinterval docs (GH-130457) (#130458)
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:12:45 +00:00
Adam Turner
c7d6aa5b51
[3.13] GH-121970: Replace custom abstract method directive with the `:abstract:` option (#129311) (#130439)
(cherry picked from commit 30e892473e)
2025-02-22 02:04:54 +00:00
Miss Islington (bot)
bb4cd89d7a
[3.13] gh-130159: Fix list indentation in collections.abc (GH-130165) (#130437)
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:47:18 +00:00
Miss Islington (bot)
8db3eee4cd
[3.13] gh-124234: Improve docs for Mock.reset_mock (GH-124237) (#130408)
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-02-21 14:58:08 +00:00
sobolevn
2a978e16d6
[3.13] Add .. versionadded directive to dis CLI options (GH-130267) (#130401)
(cherry picked from commit 9bf73c032f)
2025-02-21 13:14:27 +00:00
Miss Islington (bot)
c05d0d8425
[3.13] gh-101100: Fix sphinx warnings in readline.rst (GH-130300) (#130346)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-02-20 15:06:33 +02:00
Miss Islington (bot)
178b2ec81f
[3.13] Fix some ctypes docs typos (GH-130307) (GH-130343)
Fix some ctypes docs typos (GH-130307)
(cherry picked from commit 417372bd43)

Co-authored-by: Alcaro <floating@muncher.se>
2025-02-20 11:05:23 +00:00
Miss Islington (bot)
6041dba911
[3.13] gh-130130: Clarify hash=False docs in dataclasses.field (GH-130324) (#130337)
gh-130130: Clarify `hash=False` docs in `dataclasses.field` (GH-130324)
(cherry picked from commit 47ace53995)

Co-authored-by: Sabfo <alpha.sabfo@gmail.com>
2025-02-20 07:51:39 +00:00
Miss Islington (bot)
d172415a4e
[3.13] gh-130250: fix regression in traceback.print_last (GH-130318) (#130325)
gh-130250: fix regression in traceback.print_last (GH-130318)
(cherry picked from commit 6c982aeb54)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2025-02-19 22:06:43 +00:00
sobolevn
57e8b0cbee
[3.13] gh-130160: use option instead of cmdoption in dis.rst (GH-130255) (#130264)
(cherry picked from commit 97d0011e7e)
2025-02-18 13:55:30 +00:00
Miss Islington (bot)
a273543444
[3.13] gh-130160: use .. program:: directive for documenting ensurepip CLI (gh-130253) (gh-130259)
gh-130160: use `.. program::` directive for documenting `ensurepip` CLI (gh-130253)
(cherry picked from commit 8cd7f8bf8d)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
2025-02-18 12:51:33 +00:00
Stan Ulbrych
320316ef7e
[3.13] gh-82045: Correct and deduplicate "isprintable" docs; add test. (GH-130127)
We had the definition of what makes a character "printable" documented in three places, giving two different definitions.
The definition in the comment on `_PyUnicode_IsPrintable` was inverted; correct that.

With that correction, the two definitions turn out to be equivalent -- but to confirm that, you have to go look up, or happen to know, that those are the only five "Other" categories and only three "Separator" categories in the Unicode character database.  That makes it hard for the reader to tell whether they really are the same, or if there's some subtle difference in the intended semantics.

Fix that by cutting the C API docs' and the C comment's copies of the subtle details, in favor of referring to the Python-level docs. That ensures it's explicit that these are all meant to agree, and also lets us concentrate improvements to the wording in one place.

Speaking of which, borrow some ideas from the C comment, along with other tweaks, to hopefully add a bit more clarity to that one newly-centralized copy in the docs.

Also add a thorough test that the implementation agrees with this definition.

Author:    Greg Price <gnprice@gmail.com>

Co-authored-by: Greg Price <gnprice@gmail.com>
(cherry picked from commit 3402e133ef)
2025-02-17 15:02:39 +01:00
Miss Islington (bot)
e5ee784a7c
[3.13] gh-130106: Fix a typo in unittest.mock doc (GH-130107) (#130143)
gh-130106: Fix a typo in unittest.mock doc (GH-130107)
(cherry picked from commit d2e60d8e59)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
2025-02-15 03:37:05 +00:00
Andrew Svetlov
7b0543ebe6
[3.13] gh-128308: pass **kwargs to asyncio task_factory (GH-128768) (#130084)
* [3.13] gh-128308: pass `**kwargs` to asyncio task_factory (GH-128768)
(cherry picked from commit 38a9956876)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>


---------

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-02-14 22:04:17 +05:30