Commit graph

13171 commits

Author SHA1 Message Date
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
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
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
Miss Islington (bot)
e6c3dd3487
[3.12] gh-101100: Fix sphinx warnings in readline.rst (GH-130300) (#130347)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-02-20 15:39:09 +02:00
Miss Islington (bot)
16a06be016
[3.12] gh-130130: Clarify hash=False docs in dataclasses.field (GH-130324) (#130336)
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:53:58 +00:00
Miss Islington (bot)
8d58070d7e
[3.12] gh-130250: fix regression in traceback.print_last (GH-130318) (#130326)
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:01:32 +00:00
sobolevn
0931693f95
[3.12] gh-130160: use option instead of cmdoption in dis.rst (GH-130255) (#130265) 2025-02-18 17:18:30 +03:00
Miss Islington (bot)
aeefac90b7
[3.12] gh-130160: use .. program:: directive for documenting ensurepip CLI (gh-130253) (gh-130258)
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:53:02 +00:00
Stan Ulbrych
8a598fb623
[3.12] gh-82045: Correct and deduplicate "isprintable" docs; add test. (GH-130125)
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.

Co-authored-by: Greg Price <gnprice@gmail.com>
(cherry picked from commit 3402e133ef)
2025-02-17 14:07:59 +01:00
Miss Islington (bot)
f23ed0c985
[3.12] gh-130106: Fix a typo in unittest.mock doc (GH-130107) (#130144)
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:59:08 +00:00
Tomas R.
96a6ee04b1
[3.12] gh-97850: Update the deprecation warning of importlib.abc.Loader.load_module (GH-129855) (GH-130017)
(cherry picked from commit aa81a6f6e4)
2025-02-11 15:31:44 -08:00
Hugo van Kemenade
c62d573a89
[3.12] gh-101100: Docs: Fix some typos in the document (GH-129988) (#129998)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-02-11 23:31:48 +02:00
Miss Islington (bot)
08a9b7c385
[3.12] gh-129143: Fix incorrect documentation for logging.Handler.close(). (GH-129950) (GH-129952)
(cherry picked from commit 7c156a63d3)
2025-02-10 11:26:18 +00:00
Miss Islington (bot)
fd8d445cb3
[3.12] gh-129873: IDLE: Improve help.py's method of parsing HTML (GH-129859) (#129885)
gh-129873: IDLE: Improve help.py's method of parsing HTML (GH-129859)

In `help.copy_strip`, only copy the text `<section>`.  In `help.HelpParser.handle_starttag` and elsewhere, remove code to skip the no longer present html.  Add a reminder at the top of idle.rst to run copy_strip after changes.
---------

(cherry picked from commit 6fbf15f98e)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-09 04:19:55 -05:00
Miss Islington (bot)
d42eba880e
[3.12] gh-64414: mention AF_INET6 and IPv6 in socketserver docs. (GH-129866) (#129869)
gh-64414: mention AF_INET6 and IPv6 in socketserver docs. (GH-129866)

mention AF_INET6 and IPv6 in socketserver docs.
(cherry picked from commit 5ce70ad129)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-02-08 20:13:40 +00:00
Miss Islington (bot)
5c527f8ddc
[3.12] gh-129699: Add description to IDLE doc title (GH-129727) (#129865)
gh-129699: Add description to IDLE doc title (GH-129727)

Also extend the 'idlelib' section header. These additions affect both the displayed idle.html file and the contents.html file displayed by clicking the Complete table of contents link on the main docs.python.org page. (The module index entries are generated from the module name and synopsis within module files.)
---------

(cherry picked from commit 33a7094aa6)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-02-08 19:42:43 +00:00
Bénédikt Tran
1581c9d936
[3.12] Add multinomial to the itertools recipes docs (gh-129760) (gh-129854) 2025-02-08 08:10:41 -06:00
Miss Islington (bot)
7ff8e8dbd5
[3.12] gh-112020: Rework socketserver examples to be correct (GH-129741) (#129744)
gh-112020: Rework socketserver examples to be correct.

Outdated code updated, the BaseRequestHandler example is now much more
illustrative instead of the bad idea of a single recv() call for TCP.

tested, they now work.
(cherry picked from commit 78377c788e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-02-06 17:53:30 +00:00
Miss Islington (bot)
de9380558b
[3.12] Remove an inaccurate note from socket.recv (GH-129733) (#129735)
Remove an inaccurate note from `socket.recv` (GH-129733)

Remove an inaccurate note from socket.recv.
(cherry picked from commit ded54c3baa)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-02-06 09:45:33 -08:00
Serhiy Storchaka
0d51b29806
[3.12] Use roles :data: and :const: for referencing module variables (GH-129507) (GH-129650)
(cherry picked from commit 078ab828b9)
2025-02-04 14:30:57 +00:00
Miss Islington (bot)
4879257d0c
[3.12] gh-97850: Remove the mention of removal from ResourceReader docs (GH-128602) (#128655)
gh-97850: Remove the mention of removal from `ResourceReader` docs (GH-128602)

Remove the mention of removal from ResourceReader docs
(cherry picked from commit a1284e9797)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-02-04 00:29:45 +01:00
Miss Islington (bot)
e4384d1544
[3.12] gh-128696: Add arm64 to the get_platform return val description (GH-128701) (#128773)
gh-128696: Add arm64 to the get_platform return val description (GH-128701)
(cherry picked from commit 553cdc6d68)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-02-04 00:29:16 +01:00
Miss Islington (bot)
eff45c9b1e
[3.12] gh-129407: Clarify that a SystemError isn't always CPython's fault (GH-129410) (#129611)
gh-129407: Clarify that a `SystemError` isn't always CPython's fault (GH-129410)
(cherry picked from commit 39b754a359)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-03 11:54:16 +00:00
Miss Islington (bot)
ea143e67b3
[3.12] gh-85046: Document errno constants (GH-126420) (#129384)
(cherry picked from commit 1c3bb200da)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-01-28 00:20:13 +00:00
Miss Islington (bot)
22c1d895fc
[3.12] gh-129020: Remove ambiguous sentence from tokenize.untokenize docs (GH-129021) (#129036)
gh-129020: Remove ambiguous sentence from `tokenize.untokenize` docs (GH-129021)
(cherry picked from commit bca35f0e78)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-20 00:12:39 +00:00
Miss Islington (bot)
104d37ad99
[3.12] gh-121542: Document trailing newline behavior in set_content() (GH-121543) (#128996)
gh-121542: Document trailing newline behavior in `set_content()` (GH-121543)
(cherry picked from commit fba475ae6f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Yizheng Meng <dev@rapidcow.org>
2025-01-18 18:41:59 +00:00
Bénédikt Tran
3d9b14c19b
[3.12] gh-125997: suggest efficient alternatives for time.sleep(0) (GH-128752) (#128985) 2025-01-18 11:13:03 +00:00
Miss Islington (bot)
1c85f1bc44
[3.12] gh-128017: Make a note that sys variables are read-only (GH-128887) (#128909)
gh-128017: Make a note that sys variables are read-only (GH-128887)
(cherry picked from commit 313b96eb8b)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
2025-01-16 10:23:48 +00:00
Miss Islington (bot)
0308bcfa04
[3.12] gh-97850: Suggest TraversableResources as the alternative for ResourceLoader (GH-128601) (GH-128896)
gh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoader` (GH-128601)

Suggest TraversableResources as the alternative for ResourceLoader.

Previously, ResourceReader was the suggested alternative, but it
is itself deprecated in favour of TraversableResources.
(cherry picked from commit 256d6d2131)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-15 20:55:06 +00:00
Miss Islington (bot)
85255c4df2
[3.12] gh-67206: Document that string.printable is not printable in the POSIX sense (GH-128820) (#128867)
gh-67206: Document that `string.printable` is not printable in the POSIX sense (GH-128820)
(cherry picked from commit d906bde250)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-15 14:28:21 +00:00
Miss Islington (bot)
54c9597a50
[3.12] Fix a "doctest" block in Doc/library/turtle.rst (GH-128831) (#128836)
Fix a "doctest" block in `Doc/library/turtle.rst` (GH-128831)
(cherry picked from commit 1598e18a65)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2025-01-14 15:26:46 +00:00
Miss Islington (bot)
8448552579
[3.12] gh-123345: improve fnmatch docs (GH-123346) (#128775)
gh-123345: improve `fnmatch` docs (GH-123346)
(cherry picked from commit 29fe8072cf)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-13 10:40:22 +00:00
Miss Islington (bot)
8bfc68f0f5
[3.12] gh-124433: fix docs for asyncio.Queue.task_done (GH-128669) (#128672)
gh-124433: fix docs for `asyncio.Queue.task_done` (GH-128669)
(cherry picked from commit 4322a318ea)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-09 12:28:15 +00:00
Miss Islington (bot)
182234f5ea
[3.12] gh-126137: improve docs for loop.add_reader and loop.add_writer (GH-128666) (#128668)
gh-126137: improve docs for `loop.add_reader` and `loop.add_writer` (GH-128666)
(cherry picked from commit b2adf55674)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-09 10:18:23 +00:00
Miss Islington (bot)
a784cdf6e7
[3.12] gh-79149: document reentrant safety of loop.call_soon_threadsafe (GH-128662) (#128665)
gh-79149: document reentrant safety of `loop.call_soon_threadsafe` (GH-128662)
(cherry picked from commit 4685401845)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2025-01-09 09:26:40 +00:00
Miss Islington (bot)
e903b8ad13
[3.12] gh-87506: Document that json.load*() can raise UnicodeDecodeError (GH-127355) (#128608)
(cherry picked from commit 15372d0112)
(cherry picked from commit cdfb8bc93a)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
Co-authored-by: Erlend Aasland <erlend@python.org>
2025-01-08 08:51:19 +00:00
Miss Islington (bot)
82b061d711
[3.12] Docs: mark up json.load() using parameter list (GH-128488) (#128597)
(cherry picked from commit a21e31ec54)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-07 21:14:50 +00:00
Miss Islington (bot)
adddbc3de9
[3.12] gh-108202: Document calendar.Calendar.firstweekday (GH-128566) (#128580)
(cherry picked from commit b3cbd8f1b5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-07 08:06:52 +00:00
Miss Islington (bot)
fb8bb36f56
[3.12] gh-108202: Document calendar.Calendar methods getfirstweekday and setfirstweekday (GH-127579) (#128565)
(cherry picked from commit 953b49e546)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-01-06 23:46:16 +00:00
Miss Islington (bot)
8ba72caf26
[3.12] gh-114990: Add missing mixin methods in collections.abc's document (GH-114991) (#128536)
Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2025-01-06 10:04:57 +00:00
Miss Islington (bot)
4016be2775
[3.12] Docs: fix MessageDefect references in email.policy docs (GH-128468) (#128527)
(cherry picked from commit 3b231be8f0)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-01-05 22:05:48 +00:00
Miss Islington (bot)
e3e4852fe0
[3.12] Docs: amend json.dump() post gh-128482 (GH-128489) (#128494)
(cherry picked from commit 87ee76062a)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-04 19:04:13 +00:00
Miss Islington (bot)
98d3f2bc6e
[3.12] gh-126719: Clarify math.fmod docs (GH-127741) (#128492)
(cherry picked from commit f28d471fbe)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-01-04 17:45:19 +00:00
Miss Islington (bot)
731fc4052c
[3.12] Docs: mark up json.dump() using parameter list (GH-128482) (#128487)
(cherry picked from commit a0088b40bb)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-04 15:50:55 +00:00