Commit Graph

13435 Commits

Author SHA1 Message Date
Miss Islington (bot) 00ff23f06d
[3.13] gh-60712: Include the "object" type in the lists of documented types (GH-103036) (GH-126197)
gh-60712: Include the "object" type in the lists of documented types (GH-103036)

* add test for the predefined object's attributes

* Include the "object" type in the lists of documented types

* remove 'or' from augment tuple

* 📜🤖 Added by blurb_it.

* Add cross-reference to news



* Fix format for the function parameter



* Add space



* add reference for the 'object'



* add reference for NotImplemented



* Change ref:`string <textseq>`  as class:`str`



* remove hyphen from `newly-created`

* Update Doc/reference/datamodel.rst

'dictionaries' to 'dict'



* Update predefined attribute types in testPredefinedAttrs

* Change `universal type` as `top type`

* Don't mention about the top type

* Update the description of richcmpfuncs

* Update Doc/library/stdtypes.rst



* Revert: Hierarchy Section in Data Model Documentation

* Revert to original explanations of __new__ and __init__ methods in datamodel.rst for improved clarity.

* Update Doc/reference/datamodel.rst



* Remove blank line



* Use ref:`str <textseq>` instead of :class:`str



* Revert changes the description of Other Built-in Types in stdtypes.rst

* Update Doc/reference/datamodel.rst



---------

(cherry picked from commit 4f826214b3)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-30 13:16:38 -07:00
Miss Islington (bot) e6e140db9e
[3.13] gh-126055: Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm (GH-126067) (GH-126199)
gh-126055:  Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm (GH-126067)

* gh-126055:  Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm.

Resolves GH-126055

* gh-126055:  Fix omitted code highlighting
(cherry picked from commit 597d814334)

Co-authored-by: Victor Wheeler <vwheeler63@users.noreply.github.com>
2024-10-30 13:16:00 -07:00
Miss Islington (bot) 56b294e431
[3.13] Fix incorrect indentation in importlib.metadata.rst (GH-126189) (GH-126193)
Fix incorrect indentation in importlib.metadata.rst (GH-126189)
(cherry picked from commit 6f512c6034)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-10-30 11:00:29 -07:00
Serhiy Storchaka 6b0ef1fd6f
[3.13] gh-126071: Improve formatting of the argparse documentation (GH-126073) (GH-126173)
* Use appropriate roles for ArgumentParser, Action, etc.
* Remove superfluous repeated links.
* Explicitly document signatures and add index entries for some methods
  and classes.
* Make it more clear that some parameters are keyword-only.
* Fix some minor errors.
(cherry picked from commit 2ab377a47c)
2024-10-30 09:21:38 +00:00
Miss Islington (bot) 343a7a6259
[3.13] gh-118633: Add warning regarding the unsafe usage of eval and exec (GH-118437) (#126161)
gh-118633: Add warning regarding the unsafe usage of eval and exec (GH-118437)

* Add warning regarding the unsafe usage of eval

* Add warning regarding the unsafe usage of exec

* Move warning under parameters table

* Use suggested shorter text



* Use suggested shorter text



* Improve wording as suggested

---------

(cherry picked from commit 00e5ec0d35)

Co-authored-by: Daniel Ruf <daniel@daniel-ruf.de>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-10-30 00:49:18 +00:00
Miss Islington (bot) f37ac53cd3
[3.13] gh-116938: Fix `dict.update` docstring and remove erraneous full stop from `dict` documentation (GH-125421) (#126150)
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:27:33 +00:00
Miss Islington (bot) f5b1510e6b
[3.13] Doc: Note that pydoc uses and prefers ``MANPAGER`` (GH-125362) (#126152)
Doc: Note that pydoc uses and prefers ``MANPAGER`` (GH-125362)
(cherry picked from commit 0e45b1fd0f)

Co-authored-by: Matthieu Ancellin <31126826+mancellin@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-10-29 23:23:18 +00:00
Miss Islington (bot) 672b915ff9
[3.13] gh-89762: Document strftime %G, %V, and %u format specifiers (GH-124572) (#126094)
(cherry picked from commit 85799f1ffd)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2024-10-28 21:59:41 +00:00
Miss Islington (bot) ccf040896e
[3.13] gh-120313: amend documentation regarding `ctypes._CFuncPtr` (GH-120989) (GH-125979)
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:20:58 +01:00
Miss Islington (bot) e4204e879e
[3.13] gh-84545: Clarify the 'extend' action documentation in argparse (GH-125870) (GH-125964)
(cherry picked from commit da8673da36)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-26 21:37:06 +03:00
Miss Islington (bot) c1c3f5d19e
[3.13] gh-124969: Make locale.nl_langinfo(locale.ALT_DIGITS) returning a string again (GH-125774) (GH-125804)
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:30:23 +00:00
Miss Islington (bot) 483c747939
[3.13] Doc: Fix typos (GH-125728) (#125773)
(cherry picked from commit ded105a62b)

Co-authored-by: ember91 <31469580+ember91@users.noreply.github.com>
2024-10-21 08:49:31 +00:00
Miss Islington (bot) 73bd5bd18f
[3.13] gh-99030: Added documentation links for types and exceptions (GH-123857) (#125764)
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:42:06 +00:00
Miss Islington (bot) 51659f2e5c
[3.13] Doc: Fix pluralization in os.process_cpu_count() documentation (GH-125678) (#125742)
Co-authored-by: Tom Most <twm@freecog.net>
2024-10-20 00:54:12 +00:00
Miss Islington (bot) cc66dfc86c
[3.13] gh-89819: Add argument_default and conflict_handler to add_argument_group() docs (GH-125379) (GH-125538)
(cherry picked from commit c9826c11db)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-10-15 16:09:50 +00:00
Miss Islington (bot) 624a8e4f97
[3.13] gh-85453: Improve variable mark up for datetime.rst (GH-120702) (#125490)
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:08:30 +00:00
Miss Islington (bot) 1279be610d
[3.13] gh-123133: clarify p=0 case for "f" and "e" formatting types (GH-125426) (#125428)
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:50:06 +00:00
Miss Islington (bot) 6afdb09859
[3.13] gh-125289: Update sample code in asyncio-task.rst (GH-125292) (GH-125374)
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:43:30 +00:00
Miss Islington (bot) 0542645354
[3.13] gh-85935: Explicitly document the case nargs=0 in argparse (GH-125302) (GH-125357)
(cherry picked from commit 07c2d15977)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-12 16:02:26 +03:00
Miss Islington (bot) 21764ec5ab
[3.13] gh-116938: Clarify documentation of `dict` and `dict.update` regarding the positional argument they accept (GH-125213) (#125336)
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-10-11 23:29:01 +00:00
Miss Islington (bot) 488807a52a
[3.13] Fix typo in ``Doc/library/functions.rst`` (GH-125327) (#125333)
Fix typo in ``Doclibrary/functions.rst`` (GH-125327)
(cherry picked from commit 76b29d271b)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-10-11 20:06:19 +00:00
Miss Islington (bot) 73c152b346
[3.13] Add some doctest cleanups for `configparser` (GH-125288) (#125290)
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:48:32 +00:00
Miss Islington (bot) 49f171d9ea
[3.13] gh-125058: update `_thread` docs regarding interruptibility of `lock.acquire()` (GH-125141) (#125306)
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:20:46 +00:00
Miss Islington (bot) 1fe27103e0
[3.13] gh-125296: Fix strange fragment identifier for `name or flags` in argparse docs (GH-125297) (#125299)
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:35:49 +00:00
Serhiy Storchaka 26a93189e4
[3.13] gh-124969: Fix locale.nl_langinfo(locale.ALT_DIGITS) (GH-124974) (#125232)
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)
2024-10-11 05:56:22 +08:00
Miss Islington (bot) 319305c0bf
[3.13] Note argparse exit code in documentation (GH-119568) (GH-125274)
(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:17 +03:00
Miss Islington (bot) 47ad32d158
[3.13] gh-71784: [doc] add usage examples for traceback.TracebackException (GH-125189) (#125247)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-10-10 10:46:31 +00:00
Alex Waygood aa4da1e468
[3.13] gh-101100: Consolidate documentation on `ModuleType` attributes (#124709) (#125208)
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 20:03:30 +01:00
Miss Islington (bot) 47fa3f44ef
[3.13] docs: in venv table use executable name (GH-124315) (GH-125172)
(cherry picked from commit 7f93dbf6fe)
2024-10-09 17:54:15 +01:00
Miss Islington (bot) ab5f1790d0
[3.13] gh-101100: Fix Sphinx warnings in `library/unittest.mock.rst` (GH-124106) (#125190)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-10-09 14:13:23 +00:00
Savannah Ostrowski 5f2a5ac9dc
[3.13] GH-124478: Cleanup argparse documentation (GH-124877) (#125162)
(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:01 -07:00
Miss Islington (bot) 21a99add45
[3.13] Misc improvements to the itertools docs (gh-125147) (gh-125149) 2024-10-08 14:37:13 -05:00
Raymond Hettinger 988cdccbe0
[3.13] Itertool docs: Minor clarifications, wording tweaks, spacing, and active voice. (gh-124690) (gh-125148)
Minor clarifications, wording tweaks, spacing, and active voice.
2024-10-08 14:29:15 -05:00
Raymond Hettinger 7bc99dd49e
[3.13] Tee of tee was not producing n independent iterators (gh-123884) (gh-125081) 2024-10-08 14:11:43 -05:00
Miss Islington (bot) f5fea4dec6
[3.13] gh-124832: Add a note to indicate that `datetime.now` may return the same instant (GH-124834) (#125145)
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:26:07 +00:00
Jelle Zijlstra 089c6d2961
[3.13] gh-112433 add versionadded for `ctypes.Structure._align_` (GH-125087) (#125113)
(cherry picked from commit 5967dd8a4d)

Co-authored-by: monkeyman192 <monkey_man_192@yahoo.com.au>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2024-10-08 14:24:27 +00:00
Miss Islington (bot) 0a63c66035
[3.13] Doc: Improve description of ``GET_LEN`` opcode (GH-114583) (#125102)
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:30:52 +00:00
Miss Islington (bot) 0e0a2dadec
[3.13] gh-70870: Clarify dual usage of 'free variable' (GH-122545) (#125088)
The term "free variable" has unfortunately become genuinely
ambiguous over the years (presumably due to the names of
some relevant code object instance attributes).

While we can't eliminate that ambiguity at this late date, we can
at least alert people to the potential ambiguity by describing
both the formal meaning of the term and the common
alternative use as a direct synonym for "closure variable".

---------

(cherry picked from commit 27390990fa)

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-08 17:58:47 +10:00
Miss Islington (bot) 1e820e63e7
[3.13] gh-124653: Relax (again) detection of queue API for logging handlers (GH-124897) (GH-125059)
(cherry picked from commit 7ffe94fb24)
2024-10-08 07:23:40 +01:00
Miss Islington (bot) d869d54962
[3.13] gh-125018: Fix role syntax (GH-125050) (#125080)
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-08 01:23:19 +00:00
Alyssa Coghlan b0d01a1513
[3.13] gh-125018: Add importlib.metadata semantic link targets (GH-125027) (#125047)
gh-125018: Add importlib.metadata semantic link targets (#125027)

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-08 02:16:10 +01:00
Raymond Hettinger 84efcecf03
[3.13] Small improvements to the itertools docs (GH-123885) (#125075) 2024-10-07 23:08:09 +00:00
Miss Islington (bot) 4a9a359f32
[3.13] gh-61181: Fix support of choices with string value in argparse (GH-124578) (GH-124755)
Substrings of the specified string no longer considered valid values.
(cherry picked from commit f1a2417b9e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-10-08 00:28:17 +03:00
Miss Islington (bot) 626b4a824e
[3.13] gh-125025: `_thread` docs: fix/update the *caveats* list (GH-125026) (#125032)
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 21:43:16 -07:00
Miss Islington (bot) 45dedab674
[3.13] Highlight `datetime.timedelta.seconds` vs `.total_seconds()` in docs. (GH-124811) (#124862)
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-03 09:25:12 -07:00
T. Wouters e0eb44ad49
[3.13] GH-124567: Revert the Incremental GC in 3.13 (#124770)
Revert the incremental GC in 3.13, since it's not clear that without further turning, the benefits outweigh the costs.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-09-30 21:27:29 +00:00
Miss Islington (bot) f8e3de8c7d
[3.13] docs: improve venv docs (GH-124540) (#124727)
docs: improve venv docs (GH-124540)

- 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)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-29 17:58:32 -07:00
Miss Islington (bot) e532760f46
[3.13] Docs: improve generic `typing.NamedTuple` example (GH-124739) (#124764)
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 17:53:13 -07:00
Miss Islington (bot) 2b74cce521
[3.13] gh-90190: Add doc for using `singledispatch` with precise collection type hints (GH-116544) (#124710)
gh-90190: Add doc for using `singledispatch` with precise collection type hints (GH-116544)
(cherry picked from commit 2357d5ba48)

Co-authored-by: Matt Delengowski <matt.delengowski@gmail.com>
2024-09-27 21:28:30 +00:00
Miss Islington (bot) c6c3d970ba
[3.13] gh-119004: fix a crash in equality testing between `OrderedDict` (GH-121329) (#124507)
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:34:48 -07:00