Commit graph

13077 commits

Author SHA1 Message Date
Miss Islington (bot)
1fc1a185ed
[3.12] gh-116938: Fix dict.update docstring and remove erraneous full stop from dict documentation (GH-125421) (#126151)
gh-116938: Fix `dict.update` docstring and remove erraneous full stop from `dict` documentation (GH-125421)
(cherry picked from commit 5527c4051c)

Co-authored-by: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-29 23:22:20 +00:00
Miss Islington (bot)
8da17bb4f7
[3.12] gh-89762: Document strftime %G, %V, and %u format specifiers (GH-124572) (#126095)
(cherry picked from commit 85799f1ffd)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2024-10-28 22:01:18 +00:00
Miss Islington (bot)
05214e66b0
[3.12] gh-120313: amend documentation regarding ctypes._CFuncPtr (GH-120989) (GH-125978)
gh-120313: amend documentation regarding `ctypes._CFuncPtr` (GH-120989)

(cherry picked from commit 417c130ba5)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-10-28 14:21:05 +01:00
Miss Islington (bot)
67b270142d
[3.12] gh-84545: Clarify the 'extend' action documentation in argparse (GH-125870) (GH-125965)
(cherry picked from commit da8673da36)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-26 21:37:42 +03:00
Miss Islington (bot)
0009651d8e
[3.12] gh-124969: Make locale.nl_langinfo(locale.ALT_DIGITS) returning a string again (GH-125774) (GH-125805)
This is a follow up of GH-124974. Only Glibc needed a fix.
Now the returned value is a string consisting of semicolon-separated
symbols on all Posix platforms.
(cherry picked from commit dcc4fb2c90)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-21 19:24:45 +00:00
Miss Islington (bot)
9a22ec735f
[3.12] gh-99030: Added documentation links for types and exceptions (GH-123857) (GH-125765)
gh-99030: Added documentation links for types and exceptions (GH-123857)

* Added documentation links for types and exceptions

* Shortened description sentences

* Change content

* Change documentation

* Move seealso

* Add a spaces
(cherry picked from commit 9256be7ff0)

Co-authored-by: RUANG (Roy James) <longjinyii@outlook.com>
2024-10-21 00:43:26 +00:00
Miss Islington (bot)
1cab726622
[3.12] gh-89819: Add argument_default and conflict_handler to add_argument_group() docs (GH-125379) (GH-125539)
(cherry picked from commit c9826c11db)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-10-15 16:09:55 +00:00
Miss Islington (bot)
449f2c98bd
[3.12] gh-85453: Improve variable mark up for datetime.rst (GH-120702) (#125491)
Variables and literals are marked up using backticks.
(cherry picked from commit 2a5cdb2516)

Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
2024-10-14 22:09:23 +00:00
Miss Islington (bot)
20323bf733
[3.12] gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426) (#125429)
gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426)
(cherry picked from commit cfc27bc50f)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-14 04:51:59 +00:00
Miss Islington (bot)
1d45fae26d
[3.12] gh-125289: Update sample code in asyncio-task.rst (GH-125292) (GH-125375)
gh-125289: Update sample code in asyncio-task.rst (GH-125292)

* Update sample code in asyncio-task.rst

This will change **coroutines** sample code in the **Awaitables** section and make the example clearer.

* Update Doc/library/asyncio-task.rst

Revert the added print



* Update Doc/library/asyncio-task.rst



---------

(cherry picked from commit fa52b82c91)

Co-authored-by: Ghorban M. Tavakoly <58617996+galmyk@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-12 20:44:41 +00:00
Miss Islington (bot)
e01a1784db
[3.12] gh-85935: Explicitly document the case nargs=0 in argparse (GH-125302) (GH-125358)
(cherry picked from commit 07c2d15977)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-12 16:02:14 +03:00
Miss Islington (bot)
3f38ea11c0
[3.12] gh-116938: Clarify documentation of dict and dict.update regarding the positional argument they accept (GH-125213) (#125337)
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-10-11 23:23:54 +00:00
Miss Islington (bot)
7c48c63021
[3.12] Add some doctest cleanups for configparser (GH-125288) (#125291)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-11 09:52:15 +00:00
Miss Islington (bot)
4c40381023
[3.12] gh-125058: update _thread docs regarding interruptibility of lock.acquire() (GH-125141) (#125307)
gh-125058: update `_thread` docs regarding interruptibility of `lock.acquire()` (GH-125141)
(cherry picked from commit 0135848059)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
2024-10-11 08:22:34 +00:00
Miss Islington (bot)
ee1257cb9c
[3.12] gh-125296: Fix strange fragment identifier for name or flags in argparse docs (GH-125297) (#125300)
gh-125296: Fix strange fragment identifier for `name or flags` in argparse docs (GH-125297)
(cherry picked from commit c1913effee)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-10-11 06:39:54 +00:00
Miss Islington (bot)
171ebcd4df
[3.12] [3.13] gh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) (GH-124974) (GH-125232) (GH-125284)
(cherry picked from commit 26a93189e4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Returns a tuple of up to 100 strings for ALT_DIGITS lookup (an empty tuple on most locales).
Previously it returned the first item of that tuple or an empty string.
(cherry picked from commit 21c04e1a97)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-11 09:37:55 +03:00
Miss Islington (bot)
eb320f5ac8
[3.12] Note argparse exit code in documentation (GH-119568) (GH-125275)
(cherry picked from commit 3b87fb74c9)

Co-authored-by: Justin Kunimune <justinkunimune@gmail.com>
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-10-10 21:18:01 +03:00
Miss Islington (bot)
ba292cc301
[3.12] gh-121607: Edited source file import recipe to make it more clear (GH-121519) (GH-124081)
gh-121607: Edited source file import recipe to make it more clear (GH-121519)
(cherry picked from commit 38809171b8)

Co-authored-by: Chris Barker <Chris.Barker@noaa.gov>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-10-10 10:31:27 -07:00
Miss Islington (bot)
01daccff3c
[3.12] gh-71784: [doc] add usage examples for traceback.TracebackException (GH-125189) (#125248)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-10-10 10:37:14 +00:00
Alex Waygood
cba37762ac
[3.12] gh-101100: Consolidate documentation on ModuleType attributes (#124709) (#125211)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-10-09 19:18:38 +00:00
Miss Islington (bot)
046687c620
[3.12] docs: in venv table use executable name (GH-124315) (#125171)
(cherry picked from commit 7f93dbf6fe)
2024-10-09 17:54:38 +01:00
Miss Islington (bot)
7187d4f3b6
[3.12] gh-101100: Fix Sphinx warnings in library/unittest.mock.rst (GH-124106) (#125191)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-10-09 14:16:13 +00:00
Savannah Ostrowski
0dbad1d8b7
[3.12] GH-124478: Cleanup argparse documentation (GH-124877) (#125164)
(cherry picked from commit 37228bd16e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-10-08 16:20:49 -07:00
Raymond Hettinger
cf2532b39d
[3.12] Tee of tee was not producing n independent iterators (gh-123884) (gh-125153) 2024-10-08 20:16:18 +00:00
Miss Islington (bot)
382ee1c7bd
[3.12] gh-124832: Add a note to indicate that datetime.now may return the same instant (GH-124834) (#125146)
gh-124832: Add a note to indicate that `datetime.now` may return the same instant (GH-124834)

* Update datetime.rst

* Update datetime.rst

replace warning with note

* Update Doc/library/datetime.rst



* Update Doc/library/datetime.rst



---------

(cherry picked from commit 760b1e103a)

Co-authored-by: spacemanspiff2007 <10754716+spacemanspiff2007@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-10-08 18:27:50 +00:00
Miss Islington (bot)
65272a382b
[3.12] Doc: Improve description of `GET_LEN` opcode (GH-114583) (#125103)
Doc: Improve description of ``GET_LEN`` opcode (GH-114583)
(cherry picked from commit e8773e59a8)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-10-08 12:32:04 +00:00
Miss Islington (bot)
bc237ed9a8
[3.12] gh-124653: Relax (again) detection of queue API for logging handlers (GH-124897) (GH-125060)
(cherry picked from commit 7ffe94fb24)
2024-10-08 07:24:09 +01:00
Miss Islington (bot)
d2b307171c
[3.12] gh-125018: Fix role syntax (GH-125050) (#125055)
gh-125018: Fix role syntax (GH-125050)
(cherry picked from commit 10094a533a)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-07 16:58:47 +00:00
Alyssa Coghlan
fa32f007f0
[3.12] gh-125018: Add importlib.metadata semantic link targets (GH-125027) (#125048)
This allows direct intersphinx references to APIs via references
like `` :func:`importlib.metadata.version` ``.

---------

(cherry picked from commit cda3b5a576)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-07 14:24:45 +00:00
Miss Islington (bot)
36f9bbbdab
[3.12] gh-125025: _thread docs: fix/update the *caveats* list (GH-125026) (GH-125031)
gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026)
(cherry picked from commit 1e098dc766)

Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net>
2024-10-06 23:03:30 +00:00
Miss Islington (bot)
b338a6122b
[3.12] Highlight datetime.timedelta.seconds vs .total_seconds() in docs. (GH-124811) (GH-124863)
Highlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH-124811)

Thanks to the reviewers for suggesting the use of a "caution" section instead of "warning" or "note".
(cherry picked from commit d150e4abcf)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-10-01 21:57:07 -07:00
Hugo van Kemenade
003771709b
[3.12] Docs: Update and proofread library/venv.rst (GH-124121) (#124680)
* [3.12] Docs: Update and proofread `library/venv.rst` (GH-124121)
(cherry picked from commit 23e812b84a)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>

* Remove 3.13 docs

---------

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-30 14:18:03 -07:00
Miss Islington (bot)
660a7f2b52
[3.12] gh-123223: Adding hyperlink of argument in warnings.catch_warnings: (GH-123231) (#124527)
gh-123223: Adding hyperlink of argument in warnings.catch_warnings: (GH-123231)
(cherry picked from commit 828583a785)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-09-30 14:16:42 -07:00
Miss Islington (bot)
980d4a1bef
[3.12] Docs: improve generic typing.NamedTuple example (GH-124739) (#124765)
Docs: improve generic `typing.NamedTuple` example (GH-124739)
(cherry picked from commit 76fbee642e)

Co-authored-by: CBerJun <121291537+CBerJun@users.noreply.github.com>
2024-09-29 11:13:25 +00:00
Miss Islington (bot)
7677be5ee6
[3.12] gh-61181: Fix support of choices with string value in argparse (GH-124578) (GH-124756)
Substrings of the specified string no longer considered valid values.
(cherry picked from commit f1a2417b9e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-09-29 08:32:51 +00:00
Jelle Zijlstra
67a363106b
[3.12] docs: improve venv docs (GH-124540) (#124728)
- Move "versionchanged" notes that apply to the whole class to the
  end of the class docs
- Remove or move notes next to the method list that apply to individual
  methods.
- Mark up parameters using the appropriate syntax
- Do not capitalize "boolean"
- Shorten some text
(cherry picked from commit c976d789a9)
2024-09-28 06:09:38 -07:00
Miss Islington (bot)
a178445a46
[3.12] gh-90190: Add doc for using singledispatch with precise collection type hints (GH-116544) (#124711)
Co-authored-by: Matt Delengowski <matt.delengowski@gmail.com>
2024-09-27 14:17:37 -07:00
Tomas R
2fa9ca5070
[3.12] gh-118181: Fix parameter markup in AST docs (GH-124473). (#124705)
(cherry picked from commit 09aebb1fbc)
2024-09-27 20:13:00 +00:00
Miss Islington (bot)
1d70dd257b
[3.12] gh-119004: fix a crash in equality testing between OrderedDict (GH-121329) (#124508)
gh-119004: fix a crash in equality testing between `OrderedDict` (GH-121329)
(cherry picked from commit 38a887dc3e)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-09-27 11:33:44 -07:00
Alex Waygood
54c6cd7112
[3.12] Fixup indentation for docs on ModuleSpec attributes (#124681) (#124686)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-27 17:48:33 +00:00
Miss Islington (bot)
42432e5254
[3.12] gh-123560: Correct docs for "empty" format type for floats (GH-123561) (#124597)
gh-123560: Correct docs for "empty" format type for floats (GH-123561)
(cherry picked from commit 274d9ab619)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-09-26 12:53:58 +00:00
Miss Islington (bot)
51b62fb25a
[3.12] gh-124234: Improve docs for Mock.reset_mock (GH-124237) (#124592)
gh-124234: Improve docs for `Mock.reset_mock` (GH-124237)
(cherry picked from commit 19fed6cf6e)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-09-26 12:24:27 +00:00
Tom Most
fca2623c2f
[3.12] Doc: Improve documentation for the `path argument in shutil.which()` (GH-124494) (#124576) 2024-09-26 08:56:30 +01:00
Alex Waygood
d2068c65a6
[3.12] gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480) (#124558) 2024-09-25 23:01:19 +00:00
Miss Islington (bot)
13565f1580
[3.12] gh-108951: Document how to terminate an asyncio.TaskGroup (GH-123837) (#123957)
gh-108951: Document how to terminate an asyncio.TaskGroup (GH-123837)

We don't want to add another API, since the recipe is straightforward and rarely needed.

The advantage is that we could backport this to the earliest Python version that has taskgroups (3.11, alas in security mode already, so we'll just do 3.12 and 3.13).
(cherry picked from commit ef05801ba0)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-09-25 20:40:05 +05:30
Miss Islington (bot)
cf06f5905f
[3.12] gh-123445: calendar: Improve descriptions for day and month attributes (GH-123483) (#124501)
gh-123445: calendar: Improve descriptions for day and month attributes (GH-123483)
(cherry picked from commit 8447c933da)

Co-authored-by: Mat S <mscull@gmail.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-09-25 09:31:17 +00:00
Miss Islington (bot)
10cf0b8caf
[3.12] GH-87358: Add clarification about nargs and default argparse behaviour (GH-124094) (#124441)
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-09-24 20:15:21 +03:00
Miss Islington (bot)
0c36c37841
[3.12] gh-124120: Document Annotated.__origin__ (GH-124125) (#124417)
gh-124120: Document `Annotated.__origin__` (GH-124125)
(cherry picked from commit faef3fa653)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-09-24 13:52:27 +00:00
Miss Islington (bot)
ed44377220
[3.12] gh-65169: Clarify prog default in argparse (GH-31602) (GH-124431)
(cherry picked from commit e69ff34e81)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2024-09-24 14:19:53 +03:00
Savannah Ostrowski
b3709562ad
[3.12] GH-79714: Add mention of stderr for clarity to ArgumentParser.exit() (GH-123932) (GH-124356)
(cherry picked from commit 5f5c0b9c23)
2024-09-23 19:04:36 +00:00