Commit Graph

13525 Commits

Author SHA1 Message Date
Miss Islington (bot) c6c9ff56a5
[3.13] Docs: Fix indents in `xmlrpc.client.rst` (GH-127782) (#127799)
Docs: Fix indents in `xmlrpc.client.rst` (GH-127782)
(cherry picked from commit 035f512046)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2024-12-10 17:41:01 +00:00
Miss Islington (bot) 00d60623e9
[3.13] gh-101100: Fix sphinx warnings in `whatsnew/3.0.rst` (GH-127662) (#127783)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-12-10 10:45:30 +00:00
Miss Islington (bot) a1c52d1265
[3.13] gh-127347: Document `traceback.print_list` (GH-127348) (#127569)
Add an documentation entry about `traceback.print_list`

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
2024-12-04 10:28:14 +02:00
Miss Islington (bot) bb46b74d9d
[3.13] Itertool recipe additions (gh-127483) (gh-127585) 2024-12-03 18:34:42 -06:00
Thomas Wouters 0671451779 Python 3.13.1 2024-12-03 18:59:52 +01:00
Miss Islington (bot) d9bbb52c7e
[3.13] gh-122838: Document missing opcodes (GH-123073) (#126492)
gh-122838: Document missing opcodes (GH-123073)
(cherry picked from commit 9cba47d9f1)

Co-authored-by: Kamil Turek <kamil.turek@hotmail.com>
2024-12-02 15:07:38 +01:00
Miss Islington (bot) 23ab1f9ff1
[3.13] gh-99880: document rounding mode for new-style formatting (GH-121481) (#126334)
The CPython uses _Py_dg_dtoa(), which does rounding to nearest with half
to even tie-breaking rule.

If that functions is unavailable, PyOS_double_to_string() fallbacks to
system snprintf().  Since CPython 3.12, build requirements include C11
compiler *and* support for IEEE 754 floating point numbers (Annex F).
This means that FE_TONEAREST macro is available and, per default,
printf-like functions should use same rounding mode as _Py_dg_dtoa().

(cherry picked from commit 7d7d56d8b1)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-12-02 15:05:13 +01:00
Miss Islington (bot) 26f1e88aae
[3.13] gh-101100: Fix Sphinx warnings about list methods (GH-127054) (#127511)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2024-12-02 13:57:40 +00:00
Miss Islington (bot) 4cba0e66c2
[3.13] gh-127303: Add docs for token.EXACT_TOKEN_TYPES (GH-127304) (#127390)
gh-127303: Add docs for token.EXACT_TOKEN_TYPES (GH-127304)

---------

(cherry picked from commit dd3a87d2a8)

Co-authored-by: Илья Любавский <100635212+lubaskinc0de@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-11-30 08:13:13 +00:00
Miss Islington (bot) ee57221872
[3.13] Link to correct class methods in asyncio primitives docs (GH-127270) (#127423)
Link to correct class methods in asyncio primitives docs (GH-127270)
(cherry picked from commit 15d6506d17)

Co-authored-by: Ollanta Cuba Gyllensten <ollantaster@gmail.com>
2024-11-29 16:26:42 +00:00
Miss Islington (bot) d5a08f0ecb
[3.13] Fix indentation for contextlib.asynccontextmanager docs (GH-127333) (#127334)
Fix indentation for contextlib.asynccontextmanager docs (GH-127333)
(cherry picked from commit 9328db7652)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-11-27 14:45:07 +00:00
Miss Islington (bot) a6e61fd9d8
[3.13] Improve `pathname2url()` and `url2pathname()` docs (GH-127125) (#127232)
Improve `pathname2url()` and `url2pathname()` docs (GH-127125)

These functions have long sown confusion among Python developers. The
existing documentation says they deal with URL path components, but that
doesn't fit the evidence on Windows:

    >>> pathname2url(r'C:\foo')
    '///C:/foo'
    >>> pathname2url(r'\\server\share')
    '////server/share'  # or '//server/share' as of quite recently

If these were URL path components, they would imply complete URLs like
`file://///C:/foo` and `file://////server/share`. Clearly this isn't right.
Yet the implementation in `nturl2path` is deliberate, and the
`url2pathname()` function correctly inverts it.

On non-Windows platforms, the behaviour until quite recently is to simply
quote/unquote the path without adding or removing any leading slashes. This
behaviour is compatible with *both* interpretations -- 1) the value is a
URL path component (existing docs), and 2) the value is everything
following `file:` (this commit)

The conclusion I draw is that these functions operate on everything after
the `file:` prefix, which may include an authority section. This is the
only explanation that fits both the  Windows and non-Windows behaviour.
It's also a better match for the function names.
(cherry picked from commit 307c633586)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2024-11-24 17:46:54 +00:00
Miss Islington (bot) a8e69fc68d
[3.13] gh-126896: Fix docs about `asyncio.start_server()` (GH-126897) (GH-126934)
gh-126896: Fix docs about `asyncio.start_server()` (GH-126897)
(cherry picked from commit 0c5c80928c)

Co-authored-by: beavailable <beavailable@proton.me>
2024-11-23 18:55:58 -08:00
Miss Islington (bot) 9291095a74
[3.13] Fix a few typos found in the docs (GH-127126) (GH-127181)
Fix a few typos found in the docs (GH-127126)
(cherry picked from commit 39e60aeb38)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-11-23 00:09:35 +00:00
Miss Islington (bot) 7f22b87d35
[3.13] gh-127001: Fix PATHEXT issues in shutil.which() on Windows (GH-127035) (GH-127156)
* Name without a PATHEXT extension is only searched if the mode does not
  include X_OK.
* Support multi-component PATHEXT extensions (e.g. ".foo.bar").
* Support files without extensions in PATHEXT contains dot-only extension
  (".", "..", etc).
* Support PATHEXT extensions that end with a dot (e.g. ".foo.").
(cherry picked from commit 8899e85de1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-11-22 16:18:44 +00:00
Miss Islington (bot) 1b58c0f308
[3.13] GH-122679: Add `register()` to argparse docs (GH-126939) (GH-127149)
(cherry picked from commit fcfdb55465)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-11-22 16:12:05 +02:00
Jun Komoda af00c58652
[3.13] gh-127082: Replace "Windows only" with the `availability: Windows` in `ctypes` doc (GH-127099) (#127144)
(cherry picked from commit 3c770e3f09)
2024-11-22 14:09:53 +01:00
Serhiy Storchaka 6e5e7bc5f8
[3.13] gh-126727: Fix locale.nl_langinfo(locale.ERA) (GH-126730) (GH-127097)
It now returns multiple era description segments separated by semicolons.
Previously it only returned the first segment on platforms with Glibc.
(cherry picked from commit 4803cd0244)
2024-11-21 11:49:19 +00:00
Sergey B Kirpichev 190d710e68
[3.13] Doc: Reorganize math module documentation (GH-126337) (#126998)
(cherry picked from commit ce453e6c2f)

Co-authored-by: Joseph Martinot-Lagarde <contrebasse@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-11-19 09:02:01 +01:00
Miss Islington (bot) 9b06a8d2f5
[3.13] Docs: re-create pages for removed modules to document their removal. (GH-126622) (#126709)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2024-11-17 22:20:32 +02:00
Miss Islington (bot) c8962104f2
[3.13] Added a warning to the urljoin docs, indicating that it is not safe to use with attacker controlled URLs (GH-126659) (#126888)
Added a warning to the urljoin docs, indicating that it is not safe to use with attacker controlled URLs (GH-126659)

This was flagged to me at a party today by someone who works in red-teaming as a frequently encountered footgun. Documenting the potentially unexpected behavior seemed like a good place to start.
(cherry picked from commit d6bcc154e9)

Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2024-11-15 23:15:27 +00:00
Miss Islington (bot) 9a02690513
[3.13] gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance (GH-126182) (GH-126825)
gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance (GH-126182)

* gh-123832: Adjust `socket.getaddrinfo` docs for better POSIX compliance

This changes nothing changes for CPython supported platforms,
but hints how to deal with platforms that stick to the letter of
the spec.
It also marks `socket.getaddrinfo` as a wrapper around `getaddrinfo(3)`;
specifically, workarounds to make the function work consistently across
platforms are out of scope in its code.

Include wording similar to the POSIX's “by providing options and by
limiting the returned information”, which IMO suggests that the
hints limit the resulting list compared to the defaults, *but* can
be interpreted differently. Details are added in a note.

Specifically say that this wraps the underlying C function. So, the
details are in OS docs. The “full range of results” bit goes away.

Use `AF_UNSPEC` rather than zero for the *family* default, although
I don't think a system where it's nonzero would be very usable.

Suggest setting proto and/or type (with examples, as the appropriate
values aren't obvious). Say why you probably want to do that that
on all systems; mention the behavior on the “letter of the spec”
systems.

Suggest that the results should be tried in order, which is,
AFAIK best practice -- see RFC 6724 section 2, and its predecessor
from 2003 (which are specific to IP, but indicate how people use this):

> Well-behaved applications SHOULD iterate through the list of
> addresses returned from `getaddrinfo()` until they find a working address.

(cherry picked from commit ff0ef0a54b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-11-15 14:06:57 +01:00
Miss Islington (bot) 75d643166c
[3.13] gh-126731: Update outdated project information in `pprint.pp` doc (GH-126732) (#126818)
gh-126731: Update outdated project information in `pprint.pp` doc (GH-126732)
(cherry picked from commit 6a93a1adbb)

Co-authored-by: Wulian <xiguawulian@gmail.com>
2024-11-14 05:04:03 +00:00
Miss Islington (bot) 02cd3ce0f2
[3.13] gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-124865) (gh-125709) (GH-125204)
* gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-124865)

Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init. In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it. For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.

This is an un-revert of gh-124646 that then addresses the Py_TRACE_REFS
failures identified by gh-124785.
(cherry picked from commit f2cb399470)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>

* [3.13] gh-125286: Share the Main Refchain With Legacy Interpreters (gh-125709)

They used to be shared, before 3.12.  Returning to sharing them resolves a failure on Py_TRACE_REFS builds.

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-11-12 13:45:12 +01:00
Miss Islington (bot) e5e70c5f09
Update documentation links to Microsoft's documentation pages (GH-126379)
(cherry picked from commit 6e25eb1541)

Co-authored-by: 谭九鼎 <109224573@qq.com>
2024-11-11 17:18:01 +00:00
Miss Islington (bot) 3d8f5490e2
[3.13] gh-126543: Docs: change "bound type var" to "bounded" when used in the context of the 'bound' kw argument to TypeVar (GH-126584) (#126657)
(cherry picked from commit 434b29767f)

Co-authored-by: Pedro Fonini <fonini@protonmail.ch>
2024-11-10 18:48:44 -08:00
Miss Islington (bot) 8ebb6a051b
gh-125298: Remove misleading text in os.kill documentation (GH-125749)
Windows has not accepted process handles in many releases.
(cherry picked from commit 75ffac296e)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2024-11-08 15:47:52 +00:00
Miss Islington (bot) 05da4eea5a
[3.13] gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` documentation (GH-125437) (#126421)
gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` documentation (GH-125437)

Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` doc, as well as to it's parent ``RawConfigParser``.
Split too long line on ``ConfigParser`` signature.
Add some sections about when some of ``RawConfigParser`` parameters were added.
(cherry picked from commit d960226547)

Co-authored-by: lit <litlighilit@foxmail.com>
2024-11-05 03:04:32 +00:00
Miss Islington (bot) 9e72a3f2e1
[3.13] Doc: Fix typo in documentation for ``MAKE_FUNCTION`` opcode (GH-126396) (#126406)
Doc: Fix typo in documentation for  ``MAKE_FUNCTION`` opcode (GH-126396)
(cherry picked from commit e5a4b402ae)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
2024-11-04 17:35:12 +00:00
Miss Islington (bot) 6245ee279d
[3.13] Docs: turn getopt examples into doctests (GH-126377) (#126385)
(cherry picked from commit 0d80777981)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-11-04 08:34:36 +00:00
Miss Islington (bot) d89d78bfdf
[3.13] gh-126165: Improve docs of function `math.isclose` (GH-126215) (#126380)
gh-126165: Improve docs of function `math.isclose` (GH-126215)
(cherry picked from commit 081706f873)

Co-authored-by: Zhikang Yan <2951256653@qq.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2024-11-04 04:14:05 +00:00
Miss Islington (bot) 2f7793196a
[3.13] gh-125761: Clarify repeated warning suppression criteria in warnings module (gh-126330)
(cherry picked from commit 10eeec2d4f)

Co-authored-by: 고병찬 <70642609+byungchanKo99@users.noreply.github.com>
2024-11-02 11:43:30 +00:00
Miss Islington (bot) 6e4b7eadf5
[3.13] gh-125875: Fix docs typo FORMAT_SPEC to FORMAT_WITH_SPEC (gh-126319) (gh-126320) 2024-11-02 05:16:24 +00:00
Miss Islington (bot) bdda85ec87
[3.13] docs: add a more precise example in enum doc (GH-121015) (#126306)
docs: add a more precise example in enum doc (GH-121015)

* docs: add a more precise example

Previous example used manual integer value assignment in class based declaration but in functional syntax has been used auto value assignment what could be confusing for the new users. Additionally documentation doesn't show how to declare new enum via functional syntax with usage of the manual value assignment.

* docs: remove whitespace characters

* refactor: change example

---------

(cherry picked from commit ff257c7843)

Co-authored-by: Filip "Ret2Me" Poplewski <37419029+Ret2Me@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2024-11-01 16:17:35 -07:00
Miss Islington (bot) f8a9a1ced1
[3.13] Doc: Add a single table as summary to math documentation (GH-125810) (GH-126308)
Doc: Add a single table as summary to math documentation (GH-125810)

* Summary for math module with separate tables

* Forgot remainder description

* Single table

* data instead of func

* Add arguments in the table

* Fix inconsistencies in pow documentation

* Remove full stops from the table



* Fix math.pow link

* Fix spacing

---------

(cherry picked from commit 74cf5967f3)

Co-authored-by: Joseph Martinot-Lagarde <contrebasse@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-11-01 16:11:40 -07:00
Miss Islington (bot) 5c04055082
[3.13] gh-122767: document "new style" formatting for complexes (GH-122848) (#126128)
gh-122767: document "new style" formatting for complexes (GH-122848)

(cherry picked from commit 0bbbe15f56)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2024-11-01 12:29:29 -07:00
Miss Islington (bot) 2e20a49cae
[3.13] gh-126259: Fix "unclosed database" warning in sqlite3 doctest (GH-126260) (#126265)
(cherry picked from commit 295262c8ec)

Co-authored-by: sobolevn <mail@sobolevn.me>
2024-11-01 07:23:11 +00:00
Miss Islington (bot) 256fc5529a
[3.13] gh-126256: Update time.rst to use the same clock as instead of the same clock than (GH-126257) (#126258)
gh-126256: Update time.rst to use the same clock as instead of the same clock than (GH-126257)

Update time.rst to use `the same clock as` instead of `the same clock than`

The time documentation uses the same clock than time.monotonic instead of the same clock as time.monotonic, which is grammatically false. This PR fixes changes two instances of `the same clock than` to `the same clock as`.
(cherry picked from commit d0abd0b826)

Co-authored-by: Alperen Keleş <alpkeles99@gmail.com>
2024-10-31 21:50:20 +00:00
Miss Islington (bot) 57668a4be5
[3.13] gh-125818: Fix incorrect signature of argument `skip_file_prefixes` in warnings docs (GH-125823) (#126216)
gh-125818: Fix incorrect signature of argument `skip_file_prefixes` in warnings docs (GH-125823)

Change documentation
(cherry picked from commit d467d9246c)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2024-10-30 18:32:04 -07:00
Richard Hansen 2db2b5ea9c
[3.13] gh-124872: Refine contextvars documentation (GH-124773) (#125233)
[3.13] gh-124872: Refine contextvars documentation

  * Add definitions for "context", "current context", and "context
    management protocol".
  * Update related definitions to be consistent with the new
    definitions.
  * Restructure the documentation for the `contextvars.Context` class
    to prepare for adding context manager support, and for consistency
    with the definitions.
  * Use `testcode` and `testoutput` to test the `Context.run` example.

(cherry-picked from commit 99400930ac)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2024-10-30 20:48:02 +00:00
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
Miss Islington (bot) 4c97ed4682
[3.13] Docs: Update and proofread `library/venv.rst` (GH-124121) (#124644)
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>
2024-09-27 11:16:02 -07:00
Alex Waygood 0c6ddadbc4
[3.13] Fixup indentation for docs on `ModuleSpec` attributes (#124681) (#124685)
Fixup indentation for docs on `ModuleSpec` attributes (#124681)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-09-27 17:59:52 +00:00
Miss Islington (bot) c74679bff7
[3.13] gh-118181: Fix parameter markup in AST docs (GH-124473) (#124600)
gh-118181: Fix parameter markup in AST docs (GH-124473)
(cherry picked from commit 09aebb1fbc)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2024-09-26 13:52:37 -07:00
Miss Islington (bot) c2aaf50780
[3.13] gh-123560: Correct docs for "empty" format type for floats (GH-123561) (#124596)
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 13:52:18 -07:00
Malcolm Smith 9f5b921491
[3.13] gh-123014: Disable pidfd API on older Android versions (GH-124458) (#124543)
gh-123014: Disable pidfd API on older Android versions (#124458)

(cherry picked from commit c58c572a65)
2024-09-26 13:36:12 -07:00
Alex Waygood 9f2e6ca199
[3.13] gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480) (#124556) 2024-09-25 17:29:48 -07:00
Miss Islington (bot) 9fba1063a1
[3.13] gh-123223: Adding hyperlink of argument in warnings.catch_warnings: (GH-123231) (#124528)
gh-123223: Adding hyperlink of argument in warnings.catch_warnings: (GH-123231)

* Adding hyperlink of argument

* Modify as reviewer suggested
(cherry picked from commit 828583a785)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
2024-09-25 17:16:18 -07:00
Miss Islington (bot) 6607c72991
[3.13] gh-123968: fix -f/--float command line option description (GH-124517) (#124523)
gh-123968: fix -f/--float command line option description (GH-124517)

* fix -f/--float command line option description

See gh-123968 gh-124009

* Update Doc/library/random.rst

---------

(cherry picked from commit f8651a2988)

Co-authored-by: Robert Wolff <mahlzahn@posteo.de>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2024-09-25 17:16:02 -07:00
Miss Islington (bot) 139f47fe5d
[3.13] gh-123445: calendar: Improve descriptions for day and month attributes (GH-123483) (#124500)
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 17:13:14 -07:00
Miss Islington (bot) 5b7d4cef82
[3.13] Doc: Improve documentation for the ``path`` argument in ``shutil.which()`` (GH-124494) (#124497)
Doc: Improve documentation for the ``path`` argument in ``shutil.which()`` (GH-124494)
(cherry picked from commit 0d38409f42)

Co-authored-by: Tom Most <twm@freecog.net>
2024-09-25 17:12:48 -07:00