Commit Graph

26359 Commits

Author SHA1 Message Date
Miss Islington (bot) 365e0772c9
[3.11] gh-101100: Fix Sphinx warnings in `curses` and `curses.ascii` modules (GH-103457) (#104124)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-05-02 23:20:50 -06:00
Irit Katriel 5386730cdd
[3.11] gh-103590: do not wrap a single exception raised from a try-except* (#104094) 2023-05-02 19:24:02 +01:00
Shantanu f9231a09be
[3.11] gh-65022: Fix description of tuple return value in copyreg (GH-103892) (#104098)
(cherry picked from commit 587f2f0180)
2023-05-02 11:18:41 -07:00
Rafael Fontenelle 5e76305236
[3.11] GH-103484: Fix redirected permanently URLs (GH-104001) (#104088)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Fix redirected permanently URLs (#104001)
2023-05-02 14:50:16 +03:00
Miss Islington (bot) 3e7e50e656
[3.11] Improve assert_type phrasing (GH-104081) (#104084)
Improve assert_type phrasing (GH-104081)

I'd like to make the fact that this does nothing at runtime
really obvious, since I suspect this is unintuitive for users who are
unfamiliar with static type checking.

I thought of this because of
https://discuss.python.org/t/add-arg-check-type-to-types/26384
wherein I'm skeptical that the user really did want `assert_type`.
(cherry picked from commit 82ba6ce303)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-05-02 08:44:16 +01:00
Hugo van Kemenade b07bae6971
[3.11] Replace Netlify with Read the Docs build previews (#103843) (#104083)
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-05-02 05:29:27 +00:00
Miss Islington (bot) 723aacb7d5
[3.11] gh-100458: Clarify Enum.__format__() change of mixed-in types in the whatsnew/3.11.rst (GH-100387) (GH-104060)
Co-authored-by: Anže Pečar <anze@pecar.me>
Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-05-01 13:06:09 -07:00
Miss Islington (bot) d8055b889c
[3.11] Adjust expression from `==` to `!=` in alignment with the meaning of the paragraph. (GH-104021) (GH-104031)
(cherry picked from commit 93107aa2a4)
2023-05-01 06:58:33 +01:00
Shantanu 86ef1ce121
[3.11] Fix description of MAKE_CELL (#103986)
Backport of part of #103923
2023-04-29 06:12:46 -07:00
Miss Islington (bot) 9fbb614c4e
[3.11] gh-99032: datetime docs: Encoding is no longer relevant (GH-93365) (#103788)
This removes a section of the `strftime` and `strptime` documentation that refers to a bygone era when `strftime` would return an encoded byte string.

---------

(cherry picked from commit 2aa22f72fb)

Co-authored-by: William Andrea <william.j.andrea@gmail.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-04-28 20:09:55 -07:00
Petr Viktorin 241f2e54a6
[3.11] gh-102950: Implement PEP 706 – Filter for tarfile.extractall (GH-102953) (GH-103832)
See [Backporting & Forward Compatibility in PEP 706](https://peps.python.org/pep-0706/#backporting-forward-compatibility).

- Backport b52ad18a76
- Backport c8c3956d90
- Remove the DeprecationWarning
- Adjust docs
- Remove new `__all__` entries
2023-04-28 17:41:09 +02:00
Erlend E. Aasland b3faf8ceec
[3.11] gh-100021: Document that sqlite3's executemany() discards resulting rows (#103939) (#103966) 2023-04-28 08:05:14 +00:00
Erlend E. Aasland 294398c102
[3.11] Docs: fix dunders with too many underscores (#103955) (#103957) 2023-04-27 22:27:59 +00:00
Adam Turner dbc44fab7a
[3.11] GH-103903: Test the minimum Sphinx version in CI (#103904) (#103948)
[3.11] GH-103903: Test the minimum Sphinx version in CI (GH-103904).

(cherry picked from commit 44b5c21f41)
2023-04-27 20:55:09 +00:00
Alex Waygood d20758c4ef
[3.11] gh-51574: Document behaviour of `mkdtemp` on 3.11 and lower (#103844) 2023-04-27 07:56:55 -07:00
Inada Naoki 4041251a36
gh-103883: Doc: Move PyUnicode_FromObject doc (GH-103913)
This API is one of Unicode creator APIs.
This APIs should not be placed in PEP 393 deprecated APIs.

Fixes: gh-103883

(cherry picked from commit ce2383ec66)
2023-04-27 15:05:35 +09:00
Shantanu c0b538b02f
[3.11] gh-101786: Clarify docs that asyncio.Server.sockets is a socket-like TransportSocket (GH-103877) (#103890)
Clarify that asyncio.Server.sockets is a socket-like TransportSocket
(cherry picked from commit 1c0a9c5a1c)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2023-04-26 15:03:34 -06:00
Miss Islington (bot) 410c2ce956
[3.11] gh-94300: Update datetime.strptime documentation (GH-95318) (#103785)
gh-94300: Update datetime.strptime documentation (GH-95318)

The new wording better reflects the cases where `datetime.strptime` differs from` time.strptime`.

---------

(cherry picked from commit 5b404d6cad)

Co-authored-by: Howie Zhao <howiezhaohr@hotmail.com>
Co-authored-by: Paul Ganssle <git@m.ganssle.io>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Alexander Belopolsky <abalkin@users.noreply.github.com>
2023-04-26 14:55:39 -06:00
Miss Islington (bot) bce93c2d83
[3.11] gh-101879: docs - italicize argument in smtplib.SMPT() description (GH-101886) (#103888)
gh-101879: docs - italicize argument in smtplib.SMPT() description (GH-101886)
(cherry picked from commit 28a05f4cc2)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2023-04-26 16:37:32 -04:00
Miss Islington (bot) 97711de594
[3.11] Docs build: Add upper bounds to transitive dependencies (GH-103860) (#103887)
Docs build: Add upper bounds to transitive dependencies (GH-103860)
(cherry picked from commit 81cf94c442)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-26 11:19:15 -06:00
Miss Islington (bot) d9aafe2499
[3.11] gh-103721: Improve cross-references for generic-alias docs (GH-103838) (#103840)
Cc. @adriangb

The "stub documentation" in `types.rst` does already link to the
in-depth docs in `stdtypes.rst`, but the link isn't obvious for new
users. It deserves to be made more prominent.

- Issue: https://github.com/python/cpython/issues/103721
(cherry picked from commit cef542ca57)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-25 22:58:25 +00:00
Miss Islington (bot) 026c3e9cc4
[3.11] gh-91687: modernize dataclass example typing (GH-103773) (#103774)
modernize dataclass example typing `list` rather than `List` and comment
as to that line being the alluded too error.
(cherry picked from commit 7ef614c1ad)

Co-authored-by: Allan Lago <35788148+alago1@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-04-25 18:16:05 +02:00
Miss Islington (bot) 05a25867ae
[3.11] gh-87452: Improve the Popen.returncode docs (#103771)
Clarifies that it remains None until a method checking the child process
status has been called and noticed it has terminated.
(cherry picked from commit 68f5836582)

Co-authored-by: Joshua Herman <30265+zitterbewegung@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-04-25 18:15:48 +02:00
Miss Islington (bot) 03f8d8f0d8
[3.11] ctypes docs: fix missing `not` in variadic functions section (GH-102611) (#103425)
(cherry picked from commit 975d220bbe)

Co-authored-by: mara004 <geisserml@gmail.com>
2023-04-25 16:21:39 +05:30
Łukasz Langa 56d50dd9fb
[3.11] gh-103810: Fix broken references in dataclasses (GH-103811) (#103813)
(cherry picked from commit 0f23eda4b9)

Co-authored-by: Olga Matoula <olgamatoula@gmail.com>
2023-04-24 23:29:03 +00:00
Hugo van Kemenade 9f4364355e
[3.11] gh-101100: Fix Sphinx warnings in `argparse` module (#103289) (#103803)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-04-24 22:15:04 +00:00
Miss Islington (bot) 6f92d3f01a
[3.11] gh-103765: Fix 'Warning: py:class reference target not found: ModuleSpec' (GH-103769) (#103799)
(cherry picked from commit d2745fe850)

Co-authored-by: Jaime Alonso Lorenzo <jaimealonsolorenzo@gmail.com>
2023-04-24 15:57:21 -06:00
Miss Islington (bot) 34df9e740d
[3.11] Change 'dependant' to 'dependent' (GH-103745) (#103754)
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
2023-04-24 08:22:24 -06:00
Miss Islington (bot) e40db6e6ae
[3.11] Descriptor HowTo: Update to include attributes added in Python 3.10 (GH-103666) (#103680)
Descriptor HowTo:  Update to include attributes added in Python 3.10  (GH-103666)
(cherry picked from commit 7b134d3e71)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-04-24 15:05:14 +05:30
Kumar Aditya 16dabf9e56
[3.11] GH-78530: clarify docs for generators yielding tasks in `asyncio.wait` and `asyncio.as_completed` (#103748) 2023-04-24 14:33:12 +05:30
Rafael Fontenelle 8642fdce8c
[3.11] GH-103484: Fix broken links reported by linkcheck (GH-103608) (#103683)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Fix broken links reported by linkcheck (#103608)
2023-04-23 23:26:15 +03:00
Miss Islington (bot) a43dbe13e2
[3.11] gh-68654: Clarify subdirectories used by pkgutil.extend_path (GH-103701)
gh-68654: Clarify subdirectories used by pkgutil.extend_path (GH-103701)

Clarify sub directories used by pkgutil.extend_path in the docs and the docstring
(cherry picked from commit 7bf94568a9)

Co-authored-by: Randy <69558016+san-juan1667@users.noreply.github.com>
2023-04-23 02:57:10 -06:00
Miss Islington (bot) 050b6b34d0
[3.11] Revert "Avoid error lexing multiprocessing docs code block on Pygments 2.15.0" (GH-103616) (#103695)
Revert "Avoid error lexing multiprocessing docs code block on Pygments 2.15.0" (GH-103616)

This reverts commit ace51dcdb7.
(cherry picked from commit 8cb2b0f953)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-04-22 16:13:22 -06:00
Miss Islington (bot) 7f6710bab6
[3.11] GH-103475: cache() and lru_cache() do not have a "call once" guarantee (GH-103669) (#103682)
GH-103475: cache() and lru_cache() do not have a "call once" guarantee (GH-103669)
(cherry picked from commit e5eaac6064)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-04-22 09:54:58 -06:00
Miss Islington (bot) 2b5dbd1f23
Doc: Fix broken link to emscripten networking website (GH-99531)
There was an extra `>` in the url.
(cherry picked from commit ed206e39f0)

Co-authored-by: Alexander Ryabov <73594+haron@users.noreply.github.com>
2023-04-19 07:37:14 -07:00
Miss Islington (bot) 5a81a24c8b
gh-103582: Remove last references to `argparse.REMAINDER` from docs (GH-103586)
(cherry picked from commit f4d087964e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-04-18 22:14:53 -07:00
Miss Islington (bot) 1dad3d1071
GH-103484: Docs: add linkcheck allowed redirects entries for most cases (GH-103569)
(cherry picked from commit f39e00f952)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-04-17 20:06:52 -07:00
Miss Islington (bot) 4c4ef50ec2
GH-83893: Cross reference env. vars and -X command line options (GH-103414)
(cherry picked from commit d65ed693a8)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: Erlend E. Aasland
2023-04-16 16:09:50 -07:00
Ethan Furman 3b929a7b32
[3.11] gh-103479: [Enum] require __new__ to be considered a data type (GH-103495) (GH-103514)
a mixin must either have a __new__ method, or be a dataclass, to be interpreted as a data-type; an __init__ method is not enough (restores pre-3.11 behavior for non-dataclasses).

(cherry picked from commit a6f95941a3)
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-04-13 12:04:06 -07:00
Miss Islington (bot) 804a973d8e
gh-103365: [Enum] STRICT boundary corrections (GH-103494)
STRICT boundary:

- fix bitwise operations
- make default for Flag
(cherry picked from commit 2194071540)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-04-13 08:55:53 -07:00
Miss Islington (bot) e643412ef4
gh-103417: use time.monotonic in the example for sched.scheduler (GH-103418)
(cherry picked from commit f2b7ecb778)

Co-authored-by: Nick Burns <nburns@users.noreply.github.com>
2023-04-12 02:09:08 -07:00
Miss Islington (bot) b5fe28dace
gh-103237: Polish pdb docs (GH-103238)
(cherry picked from commit 449bf2a76b)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2023-04-11 23:26:33 -07:00
Miss Islington (bot) e715da6db1
gh-87864: Use correct function definition syntax in the docs (GH-103312)
(cherry picked from commit 50b4b15984)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-04-11 07:19:33 -07:00
Miss Islington (bot) 07a2851edb
gh-103373: `__mro_entries__` docs: improve cross references (GH-103398)
(cherry picked from commit e071f00aae)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-11 03:34:46 -07:00
Miss Islington (bot) a836d79111
Docs: don't render files in includes/, they're for embedding only (GH-103313)
(cherry picked from commit 280bd536b5)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-04-10 23:26:07 -07:00
Miss Islington (bot) 4a05392adb
Doc: Avoid error lexing multiprocessing docs code block on Pygments 2.15.0 (GH-103421)
(cherry picked from commit 75b6ab80da)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-10 21:07:21 -07:00
Miss Islington (bot) b80e4c89d8
[3.11] gh-103059: Clarify gc.freeze documentation (GH-103058) (#103416)
gh-103059: Clarify gc.freeze documentation (GH-103058)
(cherry picked from commit 8b1b17134e)

Co-authored-by: raylu <lurayl@gmail.com>
2023-04-10 11:17:48 -06:00
Miss Islington (bot) 77359a86b8
gh-103373: Improve documentation for `__mro_entries__` (GH-103374)
(cherry picked from commit 0ba0ca05d2)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-08 07:16:43 -07:00
Miss Islington (bot) 7b03d0f7c5
gh-100574: add examples/links to the `strptime`/`strftime` docs (GH-100575)
(cherry picked from commit 3310b94d3d)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-04-08 01:56:31 -07:00
Miss Islington (bot) 31bec9198b
Docs: use Node.findall to avoid a deprecation warning (GH-99403)
(cherry picked from commit 1e9dfdacef)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-04-08 01:24:27 -07:00
Miss Islington (bot) bbe04d9d1c
gh-103266: Fix a typo in example code for bisect() function (GH-103267)
(cherry picked from commit f0424ba4b6)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-04-06 17:45:07 -07:00
Ethan Furman 58e330ac9c
[3.11] gh-93910: [Enum] remove member.member deprecation (GH-103236) (GH-103299)
i.e. Color.RED.BLUE is now officially supported..
(cherry picked from commit 4ec8dd10bd)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-04-05 21:29:14 -07:00
Miss Islington (bot) 09fb27fa51
gh-102899: Fix doc link for getting filesystem error handler (GH-102901)
(cherry picked from commit fdd0fff277)

Co-authored-by: Olivier Gayot <olivier.gayot@sigexec.com>
2023-04-05 08:03:47 -07:00
Miss Islington (bot) 9357fc9b89
gh-81762: Clarify and simplify description of print's flush param (GH-103264)
(cherry picked from commit c396b6ddf3)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-05 04:49:08 -07:00
Miss Islington (bot) 6258c3cd53
Improve some grammar in the socket docs (GH-103254)
(cherry picked from commit bceb9e00ad)

Co-authored-by: Tim Burke <tim.burke@gmail.com>
2023-04-04 15:54:37 -07:00
Miss Islington (bot) cf72cc25f6
gh-98298, gh-74730: [Enum] update docs (GH-103163)
fix FlagBoundary statements
add warning about reloading modules and enum identity
(cherry picked from commit 5ffc1e5a21)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-04-03 15:27:33 -07:00
Miss Islington (bot) 823622212e
gh-102994: Profile docs has typo in example (GH-103074)
(cherry picked from commit 55decb72c4)

Co-authored-by: Nouran Ali <nouranalimohammed@gmail.com>
2023-04-02 15:52:11 -07:00
Miss Islington (bot) 0854bdf15f
gh-103109: Document ignore_warnings() test support helper (GH-103110)
(cherry picked from commit 32937d6aa4)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-02 15:42:43 -07:00
Miss Islington (bot) 4664a7cf68
Quote literal tokens in standard format specifier grammar (GH-102902)
Reported by Damian Dureck: https://mail.python.org/archives/list/docs@python.org/thread/UZTWBJIXC3MBKTHXVTIBPGDPKBNWZ5LN/
(cherry picked from commit f6405a4662)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-03-31 05:52:52 -07:00
Miss Islington (bot) 41e3ea1396
Minor docs improvements fix for `codeop` (GH-103123)
(cherry picked from commit c1e71ce56f)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-30 15:58:54 -07:00
Miss Islington (bot) 1b40618247
gh-103099: Link mypy docs from typing.rst (GH-103100)
(cherry picked from commit fda95aa194)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-03-30 01:39:49 -07:00
Miss Islington (bot) d189e2db0b
[3.11] gh-102582: Fix invalid JSON in Doc/howto/logging-cookbook.rst (GH-102635) (GH-103106)
(cherry picked from commit d835b3f05d)

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
2023-03-29 10:04:53 +01:00
Miss Islington (bot) e1094c6e6a
Update pdb docs for arguments (GH-102965)
(cherry picked from commit 027223db96)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-25 14:42:28 -07:00
Miss Islington (bot) aae91fa63c
[3.11] gh-103025: fix a ctypes doc typo (GH-103026) (#103029)
* gh-103025: fix two ctypes doc issues  (GH-103026)
(cherry picked from commit 0708437ad0)

Co-authored-by: Peter Jiping Xie <peter.jp.xie@gmail.com>
2023-03-25 10:00:44 +00:00
Hugo van Kemenade 85c686a1a5
[3.11] gh-101100: Document PyObject_ClearWeakRefs, gzip's name, and asyncio.iscoroutine (#103001) 2023-03-25 09:43:52 +02:00
Miss Islington (bot) c834a4c713
gh-102873: logging.LogRecord docs: improve description of `msg` parameter (GH-102875)
(cherry picked from commit f2e5a6ee62)

Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-24 08:08:48 -07:00
Miss Islington (bot) e075631f67
[3.11] gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932) (#102918)
gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932)
(cherry picked from commit af9c34f6ef)

Co-authored-by: Benjamin Fogle <benfogle@gmail.com>
2023-03-24 13:33:24 +01:00
Miss Islington (bot) 60b2b58f87
[3.11] Minor readability improvement to the factor() recipe (GH-102971) (GH-102972) 2023-03-23 14:56:35 -05:00
Miss Islington (bot) 202e16ea05
gh-98239: Document that `inspect.getsource()` can raise `TypeError` (GH-101689)
(cherry picked from commit b6132085ca)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-03-23 12:42:54 -07:00
Miss Islington (bot) e2924c0ee5
gh-102936: typing: document performance pitfalls of protocols decorated with `@runtime_checkable` (GH-102937)
(cherry picked from commit 58d2b30c01)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-23 11:27:28 -07:00
Miss Islington (bot) 84ae50c914
gh-102810 Improve the sphinx docs for `asyncio.Timeout` (GH-102934)
(cherry picked from commit f13fdacadf)

Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-23 09:52:43 -07:00
Miss Islington (bot) f79cfb6625
[doc] Fix error in tutorial example: type(exc) is the type rather than the instance (GH-102751)
(cherry picked from commit 8709697292)

Co-authored-by: Jens-Hilmar Bradt <17177271+jenshb@users.noreply.github.com>
2023-03-22 11:51:48 -07:00
Miss Islington (bot) a9ece4a839
gh-102780: Fix uncancel() call in asyncio timeouts (GH-102815)
Also use `raise TimeOut from <CancelledError instance>` so that the CancelledError is set
in the `__cause__` field rather than in the `__context__` field.

(cherry picked from commit 04adf2df39)

Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-22 11:23:47 -07:00
Miss Islington (bot) f1b96737a4
gh-102921: [doc] Clarify `exc` argument name in `BaseExceptionGroup` is plural (GH-102922)
(cherry picked from commit 9b19d3936d)

Co-authored-by: Kevin Kirsche <Kev.Kirsche+GitHub@gmail.com>
2023-03-22 11:21:59 -07:00
Miss Islington (bot) 4c1b4eccba
gh-95913: Consolidate build requirements changes in 3.11 WhatsNew (GH-98781)
Apply suggestion to combine build requirements changes in 3.11 WhatsNew

(cherry picked from commit 4a3ea1fdd8)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-03-22 06:53:22 -07:00
Miss Islington (bot) 592c34469b
Docs: improve accuracy of sqlite3.Connection.interrupt() (GH-102904)
(cherry picked from commit 7b2d53dacc)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-22 05:00:25 -07:00
Miss Islington (bot) 9a1453b651
Docs: improve the accuracy of the sqlite3.connect() timeout param (GH-102900)
(cherry picked from commit c24f1f1e87)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-22 04:49:46 -07:00
Miss Islington (bot) 44782d3d34
Docs: improve accuracy of pdb alias example (GH-102892)
(cherry picked from commit e0c63b7267)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-22 04:44:21 -07:00
Miss Islington (bot) a7a373e1c5
[3.11] gh-102595: Document `PyObject_Format` c-api function (GH-102596) (GH-102879)
(cherry picked from commit 910a64e301)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Def: 5ffdaf748d/Include/abstract.hGH-L389

Automerge-Triggered-By: GH:encukou
2023-03-22 02:32:02 -07:00
Miss Islington (bot) 1eb9b24929
Add link to `sys.exit` function documentation (GH-102805)
* Add link to `sys.exit` function documentation

* Update Doc/library/os.rst

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

* Update Doc/library/os.rst

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>

---------

(cherry picked from commit 41ef502d74)

Co-authored-by: David Poirier <1152277+david-poirier@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-21 15:06:10 -07:00
Raymond Hettinger e6e3b1b27d
[3.11] Backport itertool recipe updates (GH-102881) 2023-03-21 13:44:32 -05:00
Miss Islington (bot) df399a35d5
[3.11] Fix outdated note about 'int' rounding or truncating (GH-102736) (#102766)
Fix outdated note about 'int' rounding or truncating (GH-102736)
(cherry picked from commit 405739f916)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2023-03-16 20:42:54 +00:00
Miss Islington (bot) 4a7faac557
GH-102653: Make recipe docstring show the correct distribution (GH-102742)
(cherry picked from commit b0ec6253c9)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-03-16 07:42:23 -07:00
Miss Islington (bot) 3ddf397217
gh-101100: Documenting --prefix and --exec-prefix. (GH-102695)
(cherry picked from commit 61b9ff35cb)

Co-authored-by: Julien Palard <julien@palard.fr>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-03-15 15:13:48 -07:00
Hugo van Kemenade 6b6c2f53ec
[3.11] Remove misformatted exclamation marks in docs (GH-102694) (#102716)
Remove the exclamation mark from :program:`!foo` in .rst files because
it inadvertently shows up in the rendered HTML.

(Sphinx's cross-referencing roles use a '!' prefix to suppress
hyperlinking[1], but :program: is not a cross-referencing role so the
'!' is displayed verbatim.)

The exclamation marks in venv.rst were introduced in #98350. See
comments [2] and [3] for additional discussion.

[1]: https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#cross-referencing-syntax
[2]: https://github.com/python/cpython/pull/98350#issuecomment-1285965759
[3]: https://github.com/python/cpython/pull/98350#issuecomment-1286394047

Reported-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Tom Levy <tomlevy93@gmail.com>
2023-03-15 09:25:55 +02:00
Miss Islington (bot) a166cb4131
gh-102703: Fix typo in modules tutorial documentation (GH-102707)
**Before**
This prevents directories with a common name, such as ``string``, unintentionally hiding ...
**After**
This prevents directories with a common name, such as ``string``, from unintentionally hiding ...
(cherry picked from commit 0a539b5db3)

Co-authored-by: Robert Prater (B. Eng) <robcprater@gmail.com>
2023-03-14 17:11:56 -07:00
Miss Islington (bot) 738dde303b
[3.11] gh-102354: change python3 to python in docs examples (GH-102696) (#102697)
gh-102354: change python3 to python in docs examples (GH-102696)
(cherry picked from commit 80abd62647)

Co-authored-by: Paul Watson <paul.hermeneutic@gmail.com>
2023-03-14 12:52:33 -06:00
Miss Islington (bot) 1f7eb8fe6c
gh-100315: clarification to `__slots__` docs. (GH-102621)
refer to tp_itemsize in discussion on "variable-length" built-in types
(cherry picked from commit 88c262c086)

Co-authored-by: T <tnie@tuta.io>
2023-03-14 02:32:09 -07:00
Miss Islington (bot) 0f46d42eb9
doc: Remove a duplicate 'versionchanged' in library/asyncio-task (gh-102677)
(cherry picked from commit 7bdb331b67)

Co-authored-by: Joongi Kim <me@daybreaker.info>
2023-03-13 19:26:11 -07:00
Miss Islington (bot) 43f8082b1c
gh-102627: Replace address pointing toward malicious web page (GH-102630)
* Replace known bad address pointing toward a malicious web page.

(cherry picked from commit 61479d4684)

Co-authored-by: Blind4Basics <32236948+Blind4Basics@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-03-13 15:43:16 -07:00
Alex Waygood a4fcd06c50
[3.11] Fix duplicated words in the docs (#102644)
(cherry-picked from commit f6ca71a422)

With grep utility found some duplicated words

Co-authored-by: Виталий Дмитриев <vitaldmit@bk.ru>
2023-03-13 14:31:50 +00:00
Miss Islington (bot) c39a1d0ba9
gh-101100: Fix Sphinx warnings in `turtle` module (GH-102340)
(cherry picked from commit 78e4e6c3d7)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-13 04:33:38 -07:00
Miss Islington (bot) 6829b1256a
[3.11] Fixes duplicated word (GH-102623) (#102624)
Fixes duplicated word (GH-102623)

In line 1627, the end of the sentence reads "only that that it may be." but it should read "only that it may be" (or alternatively "only that that may be").

(cherry picked from commit e6210621be)

Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Hugo Gabriel Eyherabide <hugogabriel.eyherabide@gmail.com>
2023-03-12 10:00:04 -07:00
Miss Islington (bot) 495cd2de77
gh-86509: Add link to Lib/_threading_local.py in threading docs (GH-101824)
(cherry picked from commit 53dceb53ad)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2023-03-10 04:30:24 -08:00
Miss Islington (bot) ffb41eaaf4
gh-101100: Fix sphinx warnings in `zipapp` and `zipfile` modules (GH-102526)
(cherry picked from commit 1f557f94c2)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-03-08 00:30:44 -08:00
Miss Islington (bot) 8bf8e3d9a0
Fix style in argparse.rst (GH-101733)
(cherry picked from commit 061325e0d2)

Co-authored-by: Marcin Wieczorek <marcin@marcin.co>
2023-03-07 23:33:52 -08:00
Miss Islington (bot) df3ed54e34
[3.11] gh-95913: Edit Faster CPython section in 3.11 WhatsNew (GH-98429) (GH-102490)
gh-95913: Edit Faster CPython section in 3.11 WhatsNew (GH-98429)
(cherry picked from commit 80b19a30c0)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-07 11:08:14 +08:00
Miss Islington (bot) 280b975c3f
Add gettext support to tools/extensions/c_annotations.py (GH-101989)
(cherry picked from commit d959bcd4a0)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
2023-03-06 13:53:47 -08:00
Miss Islington (bot) caff048cb3
[3.11] Move around example in to_bytes() to avoid confusion (GH-101595) (#102434)
Move around example in to_bytes() to avoid confusion (GH-101595)

Moves an example to be closer to the sentence that refers to it.
(cherry picked from commit 5da379ca7d)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2023-03-05 09:42:36 +00:00
Ilya Kulakov cda1d52ab8
[3.11] Clarify re docs for byte pattern group names (GH-99308) (#101001)
Fix wording of the deprecation notice in re for 3.11
2023-03-04 13:36:42 -08:00
Miss Islington (bot) 00791f23b7
gh-102383: [docs] Arguments of `PyObject_CopyData` are `PyObject *` (GH-102390)
(cherry picked from commit 7b9132057d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-03-03 09:27:20 -08:00
Miss Islington (bot) 32a738e5b3
gh-101754: Document that Windows converts keys in `os.environ` to uppercase (GH-101840)
(cherry picked from commit 4e7c0cbf59)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2023-03-03 03:00:06 -08:00
Alex Waygood 3b1201daf6
[3.11] Fix typos in documentation and comments (GH-102374) (#102376)
[3.11] Fix typos in documentation and comments (GH-102374)

Found some duplicate `to`s in the documentation and some code comments and fixed them.

[Misc/NEWS.d/3.12.0a1.rst](ed55c69ebd/Misc/NEWS.d/3.12.0a1.rst) also contains two duplicate `to`s, but I wasn't sure if it's ok to touch that file.  Looks auto generated.  I'm happy to amend the PR if requested. :)

Automerge-Triggered-By: GH:AlexWaygood

Co-authored-by: Michael K <michael-k@users.noreply.github.com>
2023-03-02 16:00:06 +00:00
Hugo van Kemenade 9a5f2e8562
[3.11] gh-90744: Fix erroneous doc links in the sys module (GH-101319) (#102321)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Brad Wolfe <brad.wolfe@gmail.com>
Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Fix erroneous doc links in the sys module (#101319)
2023-03-02 07:43:44 +02:00
Miss Islington (bot) 3effccee48
[3.11] gh-102088 Optimize iter_index itertools recipe (GH-102360) (GH-102363) 2023-03-01 21:52:37 -06:00
Inada Naoki 90ec292ab8
Doc: Fix minor error in ePub (GH-100614)
Fix issue reported https://mail.python.org/archives/list/docs@python.org/message/KE7OIAO53P4XRC4ZOWPDHA63ZQJCHEC3/
(cherry picked from commit 7d1d663418)
2023-03-01 10:19:16 +09:00
Miss Islington (bot) 1ef6e45f96
gh-102296 Document that inspect.Parameter kinds support ordering (GH-102297)
(cherry picked from commit 0db6f44259)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
Automerge-Triggered-By: GH:AlexWaygood
2023-02-27 07:21:27 -08:00
Miss Islington (bot) bd4a709038
gh-101100: Fix sphinx warnings in `types` module (GH-102274)
(cherry picked from commit 101a12c576)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-02-26 23:33:05 -08:00
Miss Islington (bot) 2c4fc87ac1
[3.11] [doc] Improve grammar/fix missing word (GH-102060) (GH-102277)
[doc] Improve grammar/fix missing word (GH-102060)
(cherry picked from commit 6daf42b28e)

Co-authored-by: VMan <vayidm@users.noreply.github.com>
2023-02-26 18:58:55 +05:30
Miss Islington (bot) 626f471d88
[3.11] gh-85417: Clarify behaviour on branch cuts in cmath module (GH-102046) (#102276)
gh-85417: Clarify behaviour on branch cuts in cmath module (GH-102046)

This PR updates the cmath module documentation to reflect the reality that Python is almost always (and as far as I can tell, that "almost" can be omitted) running on a machine whose C double supports signed zeros.

* Removes misleading references to functions being continuous from above / below / the left / the right at branch cuts
* Expands the note on branch cuts at the top of the module documentation to explain the double-sided sign-of-zero-based behaviour
(cherry picked from commit b513c46d99)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2023-02-26 11:55:25 +00:00
Miss Islington (bot) 7a0dc8a802
gh-102259: Fix re doc issue regarding right square brackets (GH-102264)
(cherry picked from commit bcadcde712)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-02-25 18:32:42 -08:00
Shantanu 735ff5ae27
[3.11] GH-99818: improve the documentation for zipfile.Path and Traversable (GH-101589) (#102266)
Automerge-Triggered-By: GH:FFY00
(cherry picked from commit 84181c1404)

Co-authored-by: Filipe Laíns <lains@riseup.net>
2023-02-25 23:42:30 +00:00
Miss Islington (bot) c2f42f1778
gh-101100: Fix sphinx warnings in `typing` module docs (GH-102260)
(cherry picked from commit a498de4c0e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-02-25 13:55:49 -08:00
Miss Islington (bot) 5775863e9d
asyncio docs: Fix dangling hyphen (GH-102227)
Currently this gets rendered with a dangling hyphen.
(cherry picked from commit 207e1c5cae)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-02-25 05:29:35 -08:00
Miss Islington (bot) a109ce00de
gh-101100: Fix Sphinx warnings in `decimal` module (GH-102125)
(cherry picked from commit b7c1126447)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-02-25 01:58:52 -08:00
Miss Islington (bot) 3b4f8fc83d
gh-102105 Fix wording in filterfalse/quantify/filter (GH-102189)
(cherry picked from commit 81bf10e4f2)

Co-authored-by: Stefan Pochmann <609905+pochmann@users.noreply.github.com>
2023-02-24 08:21:40 -08:00
Miss Islington (bot) 61e0bbdb0c
Fix typo in `Py_GetPythonHome` signature (GH-102168)
(cherry picked from commit 9bba8035bd)

Co-authored-by: Tanner Firl <105078804+TannerFirl@users.noreply.github.com>
2023-02-23 05:38:08 -08:00
Miss Islington (bot) 42d0ca92ed
[3.11] gh-100226: Clarify StreamReader.read behavior (GH-101807) (#102001)
gh-100226: Clarify StreamReader.read behavior (GH-101807)
(cherry picked from commit 77d95c8373)

Co-authored-by: Jan Gosmann <jan@hyper-world.de>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-02-23 19:05:59 +05:30
Miss Islington (bot) bf0a8362cd
Fix syntax error in struct doc example (GH-102160)
Missing closing ) reported on Discuss by Chukwudi Nwachukwu.
(cherry picked from commit 8f647477f0)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-02-22 16:02:31 -08:00
Miss Islington (bot) 8b5498e367
GH-101777: `queue.rst`: use 2 spaces after a period to be consistent. (GH-102143)
(cherry picked from commit 96bf24380e)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2023-02-22 13:39:05 -08:00
Miss Islington (bot) 528e91c067
[3.11] gh-102135: Update turtle docs to rename wikipedia demo to rosette (GH-102137) (GH-102138)
(cherry picked from commit 8d46c7ed5e)

Co-authored-by: somebody <98094921+UndoneStudios@users.noreply.github.com>

Automerge-Triggered-By: GH:hugovk
2023-02-22 02:25:17 -08:00
Miss Islington (bot) 78eee76185
gh-102011: use sys.exception() instead of sys.exc_info() in docs where possible (GH-102012)
(cherry picked from commit 4d3bc89a3f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-02-21 03:06:20 -08:00
Miss Islington (bot) a94f3ad10b
gh-100556: Improve clarity of `or` docs (GH-100589)
(cherry picked from commit b40dd71241)

Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-02-21 02:45:49 -08:00
Miss Islington (bot) f94ffcf618
gh-101777: Make `PriorityQueue` docs slightly clearer (GH-102026)
Adjust wording slightly, and use min(entries) instead of
sorted(list(entries))[0] as an example.
(cherry picked from commit 350ba7c07f)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2023-02-21 02:32:58 -08:00
Miss Islington (bot) 4969903f7e
gh-99735: Use required=True in argparse subparsers example (GH-100927)
(cherry picked from commit 6aab56f3c2)

Co-authored-by: Patricio Paez <nospam@pp.com.mx>
2023-02-19 11:11:40 -08:00
Miss Islington (bot) 62db23c944
Fix incorrectly documented attribute in csv docs (GH-101250)
(cherry picked from commit 36b670908b)

Co-authored-by: Reza Rastak <rezarastak@users.noreply.github.com>
2023-02-18 17:04:01 -08:00
Brian Skinn 5220c2df9e
[3.11] gh-85747: Active voice & suggested edits, 'running/stopping loop' & 'callbacks' subsections of asyncio-eventloop.rst (GH-100270) (#102006)
Note: the `timeout` parameter was not added until 3.12.

(cherry picked from commit c4de6b1d52)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>.
Co-authored-by: Brian Skinn <brian.skinn@gmail.com>
2023-02-18 15:57:06 -08:00
Miss Islington (bot) b7a49eb5ff
gh-101739: [Enum] update docs - default boundary for Flag is CONFORM (GH-101746)
(cherry picked from commit 7f1c721756)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2023-02-17 13:44:45 -08:00
Miss Islington (bot) be69ac3c96
gh-101992: update plistlib examples to be runnable (GH-101994)
* gh-101992: update plistlib examples to be runnable

* Update Doc/library/plistlib.rst

---------

(cherry picked from commit a1723caabf)

Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-02-17 11:39:14 -08:00
Miss Islington (bot) 559d0e8073
gh-101973: Fix parameter reference for PyModule_FromDefAndSpec (GH-101976)
(cherry picked from commit a3bb7fbe7e)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-02-17 00:50:46 -08:00
Miss Islington (bot) aedf38391a
gh-93573: Replace wrong example domains in configparser doc (GH-93574)
* Replace bitbucket.org domain by forge.example
* Update example to python.org
* Use explicitly invalid domain

topsecret.server.com domain is not controled by PSF. It's replaced by invalid topsecret.server.example domain. It follows RFC 2606, which advise .example as TLD for documentation.
(cherry picked from commit 924a3bfa28)

Co-authored-by: sblondon <stephane.blondon@gmail.com>
2023-02-16 07:25:31 -08:00
Miss Islington (bot) 4aeae28671
GH-101898: Fix missing term references for hashable definition (GH-101899)
Fix missing term references for hashable definition
(cherry picked from commit 3690688149)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2023-02-14 02:45:42 -08:00
Miss Islington (bot) 01b21c320b
Correct trivial grammar in reset_mock docs (GH-101861)
(cherry picked from commit a1f08f5f19)

Co-authored-by: Steve Kowalik <steven@wedontsleep.org>
2023-02-13 01:20:18 -08:00
Miss Islington (bot) 1b736838e6
gh-101845: pyspecific: Fix i18n for availability directive (GH-101846)
pyspecific: Fix i18n for availability directive

If the directive has content, the previous code would nest paragraph
nodes from that content inside a general paragraph node, which confuses
Sphinx and leads it to drop the content when translating. Instead, use a
container node for the body.

Also use set_source_info so that any warnings have location info.
(cherry picked from commit 6ef6915d35)

Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
2023-02-12 09:28:20 -08:00
Miss Islington (bot) 91fb7c36a3
[3.11] gh-101390: Fix docs for `imporlib.util.LazyLoader.factory` to properly call it a class method (GH-101391) (#GH-101813)
gh-101390: Fix docs for `imporlib.util.LazyLoader.factory` to properly call it a class method (GH-101391)
(cherry picked from commit 17143e2c30)

Co-authored-by: busywhitespace <busywhitespace@tuta.io>
2023-02-10 16:24:28 -08:00
Hugo van Kemenade c485f0e39e
[3.11] Docs: Fix getstatus() -> getcode() typos (GH-101296) (#101805) 2023-02-11 00:26:41 +02:00
Miss Islington (bot) 18313ecb09
Docs: use parameter list for sqlite3.Cursor.execute* (GH-101782)
(cherry picked from commit 2037ebf81b)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-02-10 10:01:38 -08:00
Miss Islington (bot) 4a9dff0e5a
gh-101283: Version was just released, so should be changed in 3.11.3 (GH-101719)
(cherry picked from commit 0e0c5d8baa)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-02-08 16:11:36 -08:00
Miss Islington (bot) 51b079a2d6
Update Lib/subprocess.py 2023-02-08 15:44:06 -08:00
Miss Islington (bot) 7240ba7f94
[3.11] gh-47937: Note that Popen attributes are read-only (GH-93070) (#101684)
* Note that Popen attributes aren't meant to be set by users by rewording the text about the attributes.
* Also update some universal_newlines references to mention the modern text parameter name while in the area.

(cherry picked from commit 027adf42cd)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-02-08 11:03:56 +01:00
Oleg Iarygin fa90671480
[3.11] gh-97725: Fix documentation for the default file of `asyncio.Task.print_stack` (#101652) (#101653)
(cherry picked from commit f87f6e2396)
2023-02-08 11:02:37 +01:00
Miss Islington (bot) c993ffa477
GH-101616: Mention the Docs Discourse forum in the "reporting docs issues" (GH-101617)
Fixes https://github.com/python/cpython/issues/101616
(cherry picked from commit 949c58f945)

Co-authored-by: Mariatta Wijaya <Mariatta@users.noreply.github.com>
2023-02-06 14:07:00 -08:00
Miss Islington (bot) 7cbcfbe2ff
GH-56426: Add cross-reference to the documentation for faulthandler, traceback, and pdb. (GH-101157)
(cherry picked from commit cef9de62b8)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-02-03 19:56:57 -08:00
Miss Islington (bot) 4c763463fc
Add missing `versionadded` directive for `PyCode_Addr2Location` (GH-101347)
(cherry picked from commit f11a3d1ebe)

Co-authored-by: Max Bachmann <oss@maxbachmann.de>
2023-02-03 19:40:51 -08:00
Miss Islington (bot) 4392bf648f
docs: replace PyPI description with link (GH-101506)
(cherry picked from commit 45d014e03b)

Co-authored-by: François Magimel <magimel.francois@gmail.com>
2023-02-02 23:31:43 -08:00
Miss Islington (bot) 2366c1a4fe
gh-100920: Update documentation for `asyncio.StreamWriter.wait_closed` (GH-101514)
(cherry picked from commit 5c39daf50b)

Co-authored-by: Viet Than <thanhoangviet@gmail.com>
2023-02-02 23:26:37 -08:00
Miss Islington (bot) bfac5d9850
gh-100925: Move array methods under class in array doc (GH-101485)
* Move array methods under class in array doc

* Fix a few internal references related to the touched lines
(cherry picked from commit 1b6045668d)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-02-02 16:12:09 -08:00
Miss Islington (bot) 08f5c77359
docs: Fix enum reassign `str` documentation (GH-101507)
(cherry picked from commit 24cbc7a2a0)

Co-authored-by: Peter Gessler <gesslerpd@users.noreply.github.com>
2023-02-02 12:40:30 -08:00
Miss Islington (bot) c2c970fc26
Docs: improve accuracy of sqlite3 `check_same_thread` parameter (GH-101351)
(cherry picked from commit ee21110086)

Co-authored-by: Marcos Pereira <3464445+marcospgp@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-02-01 16:00:27 -08:00
Miss Islington (bot) e98fa7121d
gh-101467: Correct py.exe handling of prefix matches and cases when only one runtime is installed (GH-101468)
(cherry picked from commit eda60916bc)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-02-01 13:31:21 -08:00
Miss Islington (bot) 89442e18e1
gh-101498 : Fix asyncio.Timeout example in docs (GH-101499)
Doc/library/asyncio-task.rstGH-timeout
(cherry picked from commit 95fb0e0258)

Co-authored-by: Raj <51259329+workingpayload@users.noreply.github.com>
2023-02-01 10:19:11 -08:00
Irit Katriel c796d34b2a
[3.11] gh-101454: fix documentation for END_ASYNC_FOR (#101455) (#101493)
gh-101454: fix documentation for END_ASYNC_FOR (#101455)

(cherry picked from commit 62251c3da0)
2023-02-01 14:30:48 +00:00
Miss Islington (bot) 85cc5d0e5d
gh-98657: [docs] `array.typecodes` is a module-level attribute (GH-98729)
* gh-98657: [docs] `array.typecodes` is a module-level attribute

* Update array.rst
(cherry picked from commit c144e57b31)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-01-31 21:48:19 -08:00
Miss Islington (bot) 5e498072dc
[3.11] gh-101440: fix json snippet error in logging-cookbook.rst (GH-101439) (GH-101463)
(cherry picked from commit 20c11f2e60)

Co-authored-by: Peter Jiping Xie <peter.jp.xie@gmail.com>

Automerge-Triggered-By: GH:hugovk
2023-01-31 07:51:48 -08:00
Miss Islington (bot) 9e4ba5c4bf
gh-99276 - Updated Doc/faq/general.rst (GH-101396)
(cherry picked from commit df0068ce48)

Co-authored-by: Raj <51259329+workingpayload@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-01-31 07:27:55 -08:00
Miss Islington (bot) 43af2dbb54
Add JOBS parameter to docs Makefile (GH-101395)
(cherry picked from commit 1a62ae84c6)

Co-authored-by: Christophe Nanteuil <35002064+christopheNan@users.noreply.github.com>
2023-01-31 05:39:06 -08:00
Miss Islington (bot) a79dd88973
gh-77607: Improve accuracy of os.path.join docs (GH-101406)
This is a follow-up to GH-100811.

One of the changes in that PR isn't accurate in that
`os.path.join('', '')` will not end in a separator.

This reverts that change to the previous wording that used "only", but
explicitly calls out the case where the last part ends in a separator,
which is what caused confusin in GH-77607 and motivated the change
in GH-100811.
(cherry picked from commit 909a674693)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-01-30 21:46:48 -08:00
Miss Islington (bot) 6a94f4c973
Fixes typo in asyncio.TaskGroup context manager code example (GH-101449)
(cherry picked from commit ef09bf63d2)

Co-authored-by: Ben <22038077+bcla22@users.noreply.github.com>
2023-01-30 21:46:35 -08:00
Miss Islington (bot) 6ec9f2d5b8
gh-101422: (docs) TarFile default errorlevel argument is 1, not 0 (GH-101424)
(cherry picked from commit ea232716d3)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2023-01-30 10:10:26 -08:00
Miss Islington (bot) 3bcb630e07
gh-98240: Updated Path.rename docs, when it is atomic (GH-98245)
(cherry picked from commit 0023f51deb)

Co-authored-by: Mateusz <mateka@users.noreply.github.com>
2023-01-29 17:52:29 -08:00
Miss Islington (bot) 34679913fe
Fix trivial typo in shebang example (GH-101385)
The example was showing the current version, but should be pinned to 3.7 to match the example command.
(cherry picked from commit 666c0840dc)

Co-authored-by: socal-nerdtastic <37753609+socal-nerdtastic@users.noreply.github.com>
2023-01-29 13:14:23 -08:00
Miss Islington (bot) 88a1e6db0f
[3.11] [doc] Add a section on logging handler configuration order. (GH-101380) (GH-101382)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2023-01-27 19:12:18 +00:00
Miss Islington (bot) 1016909a6d
[3.11] [doc] Add some notices to logging configuration documentation. (GH-101373) (GH-101376)
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2023-01-27 17:45:59 +00:00
Miss Islington (bot) bab79942c4
[docs] Mention how to get/set a bigint PyLong via the C API (GH-101270)
We don't need direct C APIs to get at a bigint representation of PyLong but we
do want the few people who need to understand how.

Additional Author:  CAM-Gerlach
(cherry picked from commit e244401ce5)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-01-23 21:31:06 -08:00
Miss Islington (bot) 4cf4169350
Added asyncio REPL example to docs. (GH-101243)
(cherry picked from commit 5d868efde9)

Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-01-23 03:39:01 -08:00
Miss Islington (bot) 69d12d868e
[3.11] GH-101097: Switch from standard interval notation to greater or less than signs for random.random()'s documentation (GH-101119) (GH-101246)
(cherry picked from commit 8bcd4a6ec7)

Co-authored-by: Andrew Hong <andrewhong@myyahoo.com>

Automerge-Triggered-By: GH:rhettinger
2023-01-22 13:45:55 -08:00
Miss Islington (bot) db0eeb381e
[3.11] gh-86610: Use attribute directive in docs for pathlib.PurePath (GH-101114) (#101205)
(cherry picked from commit 01093b8203)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
2023-01-20 23:28:21 +01:00
Miss Islington (bot) efc89f3454
[3.11] GH-101111: Disambigaute origin of const for store_const and append_const (GH-101121) (#101203)
(cherry picked from commit 9a155138c5)

While the documentation for `optparse` mentioned that both `store_const` and
`append_const` store a constant value, it was not clear where this value was
coming from.

A link to `Option.const` makes this explicit.

Co-authored-by: Jürgen Gmach <juergen.gmach@googlemail.com>
2023-01-20 23:22:04 +01:00
Miss Islington (bot) 1798df2b40
[3.11] Fix minor typos in SSL documentation (GH-101158) (#101201)
(cherry picked from commit 73497690b5)

Co-authored-by: Simon Robinson <simon@robinson.ac>
2023-01-20 23:18:25 +01:00
Miss Islington (bot) 0dc35e4bbb
gh-91485: Avoid unnecessary use of non-Python syntax in io docs (GH-101177)
(cherry picked from commit 783d1bc51b)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-01-20 14:12:26 -08:00
Miss Islington (bot) e039d53dae
[3.11] gh-101100: [Enum] Fix sphinx warnings in docs (GH-101122) (#101173)
(cherry picked from commit 9e025d305f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-01-20 23:07:23 +01:00
Miss Islington (bot) 5e1c4ac85e
[3.11] Provided better example for logging cookbook (GH-101164) (GH-101184)
Co-authored-by: Vladimir Malinovskii <galqiwi@galqiwi.ru>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2023-01-20 17:43:08 +00:00
Gregory P. Smith efe3a389ca
[3.11] gh-101144: Allow zipfile.Path .open & .read_text encoding to be positional (#101179)
The zipfile.Path open() and read_text() encoding parameter can be supplied as a positional argument without causing a TypeError again. 3.10.0b1 included a regression that made it keyword only.

Documentation update included as users writing code to be compatible with a wide range of versions will need to consider this for some time..

(cherry picked from commit 5927013e47)

Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
2023-01-20 00:06:18 -08:00
Miss Islington (bot) 1998ea69c7
gh-101041: Fix a misspelled name of `utctimetuple` in a doc warning (GH-101042)
(cherry picked from commit 8e9d08b062)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-01-19 21:06:47 -08:00
Miss Islington (bot) db65a326a4
Docs: improve sqlite3 placeholders example (GH-101092)
(cherry picked from commit b84be8d9c0)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-01-18 01:43:44 -08:00
Miss Islington (bot) 5e52778b1a
Fix typo in `ReprEnum` documentation (GH-101079)
(cherry picked from commit c5660ae96f)

Co-authored-by: Viicos <65306057+Viicos@users.noreply.github.com>
2023-01-17 02:59:35 -08:00
Miss Islington (bot) a3510c3a4e
gh-100247: Improve documentation for custom shebang commands in py.exe launcher (GH-101083)
(cherry picked from commit 30753c37c6)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-01-16 09:13:47 -08:00
Miss Islington (bot) 6d98282ed4
[3.11] Sync-up parameter name in equivalent code snippet of `enumerate` (GH-101029) (#101030)
Sync-up parameter name in equivalent code snippet of `enumerate` (GH-101029)
(cherry picked from commit ef633e5000)

Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
2023-01-15 12:16:06 +05:30
Miss Islington (bot) c7aa39286b
gh-100668: Clarify how sqlite3 maps parameters onto placeholders (GH-100960)
(cherry picked from commit 206f05a46b)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-01-14 15:04:53 -08:00
Miss Islington (bot) 39c1f68fff
gh-101021: Document binary parameters as bytes (GH-101024)
(cherry picked from commit 49cae39ef0)

Co-authored-by: Bob Kline <bkline@users.noreply.github.com>
2023-01-14 12:22:08 -08:00
Raymond Hettinger ba88628808
[3.11] Add recipes to showcase tee(), zip*, batched, starmap, and product. (GH-101028) 2023-01-13 22:32:32 -06:00
Miss Islington (bot) 6492492ce7
gh-100247: Fix py.exe launcher not using entire shebang command for finding custom commands (GH-100944)
(cherry picked from commit 468c3bf798)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-01-13 04:52:28 -08:00
Serhiy Storchaka 2834fdc689
[3.11] gh-100160: Tweak the documentation for the default asyncio policy (GH-100969) 2023-01-13 10:15:23 +02:00
Miss Islington (bot) 75717645bc
Fix typo in `enum` module documentation (GH-100992)
(cherry picked from commit 2161bbf243)

Co-authored-by: Noam Cohen <noam@noam.me>
2023-01-12 07:51:11 -08:00
Miss Islington (bot) e8097d49f6
GH-100894: Updated the doc for `sys.winver` to clarify its usual contents (GH-100913)
(cherry picked from commit d9dff4c8b5)

Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
2023-01-11 16:21:07 -08:00
Serhiy Storchaka 1b2459dc64
[3.11] gh-100160: Remove any deprecation warnings in asyncio.get_event_loop() (#100412)
Some deprecation warnings will reappear (in a slightly different form) in 3.12.

Co-authored-by: Guido van Rossum <guido@python.org>
2023-01-10 12:20:09 -08:00
Miss Islington (bot) a7f9afdd46
[3.11] gh-100916: Convert argument to appropriate type (GH-100917) (GH-100918)
Co-authored-by: Yao-Ching Huang <tom4996131207@gmail.com>
2023-01-10 10:38:57 +00:00
Hugo van Kemenade 1e74a12bde
[3.11] Fix typos in Doc folder (GH-100880). (#100914)
Co-authored-by: Semen Zhydenko <semen.zhydenko@gmail.com>
2023-01-10 11:42:03 +02:00
Miss Islington (bot) 4e096ec647
bpo-28356: Document os.rename() behavior on Windows for differing volumes (GH-27376)
(cherry picked from commit e098137cd3)

Co-authored-by: Ryan Ozawa <ryan.ozawa21@gmail.com>
2023-01-09 13:52:43 -08:00
Miss Islington (bot) 07d1f99e8f
[3.11] Update copyright years to 2023. (gh-100848) (GH-100849)
(cherry picked from commit 11f99323c2)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2023-01-08 17:57:17 -08:00
Miss Islington (bot) 87076d880c
gh-100783: fix os.path.join documentation (GH-100811)
- Use "drive", not "drive letter", because of UNC paths
- Previous components are not thrown away from relative drive letters
- Use "segment" instead of "component" for consistency with pathlib
- Other miscellaneous improvements
(cherry picked from commit 53455a319f)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-01-08 01:22:44 -08:00
Miss Islington (bot) caed845fb5
gh-100824: Fix typo in the documentation of unittest.TestLoader.testNamePatterns (GH-100825)
(cherry picked from commit 6d3bc4a795)

Co-authored-by: busywhitespace <busywhitespace@tuta.io>
2023-01-08 00:16:49 -08:00
Raymond Hettinger 4b4e6da7b5
[3.11] Future-proof recipe by renaming dotproduct() to sumprod() (GH-100828) 2023-01-07 15:16:38 -06:00
Miss Islington (bot) a3e2407f5c
gh-100673: Removed erroneous note in the get_type_hints docs (GH-100701)
Removed erroneous note in the get_type_hints docs

typing.get_type_hints still includes base class type hints.
(cherry picked from commit deaf090699)

Co-authored-by: FrozenBob <30644137+FrozenBob@users.noreply.github.com>
2023-01-07 09:38:32 -08:00
Miss Islington (bot) 72263f2a20
gh-99026 update dataclasses docs for when annotations are inspected (gh-100798)
update dataclasses docs for when annotations are inspected
(cherry picked from commit 659c2607f5)

Co-authored-by: Akshit Tyagi <37214399+exitflynn@users.noreply.github.com>
2023-01-06 06:34:30 -08:00
Miss Islington (bot) d6b8413e94
gh-87691: clarify use of anchor in pathlib docs (GH-100782)
This is feedback from https://github.com/python/cpython/pull/100737GH-discussion_r1062968696

This matches the wording from the `os.path.join` docs better:
https://docs.python.org/3/library/os.path.htmlGH-os.path.join

In particular, the previous use of "anchor" was incorrect given the
pathlib definition of "anchor".

(cherry picked from commit 2f2fa03ff3)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Barney Gale <barney.gale@gmail.com>
2023-01-05 17:59:27 -08:00
Miss Islington (bot) 75861006d8
gh-87691: add an absolute path pathlib example in / operator docs (GH-100737)
The behaviour is fully explained a couple paragraphs above, but it may be useful to have a brief example to cover the behaviour.
(cherry picked from commit 1ae619c911)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Automerge-Triggered-By: GH:hauntsaninja
2023-01-05 15:04:39 -08:00
Miss Islington (bot) a34f0bdcf6
GH-100766: Note that locale.LC_MESSAGES is not universal (GH-100767)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
2023-01-05 03:46:13 +00:00
Miss Islington (bot) eba6b00953
[3.11] gh-81611: Improve `range` paragraph in 8.3 of language reference (GH-98353) (#100704)
gh-81611: Improve `range` paragraph in 8.3 of language reference (GH-98353)
(cherry picked from commit 8b1f125121)

Co-authored-by: 4l4k4z4m <alakazamjoined@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-01-04 15:57:24 -05:00
Miss Islington (bot) c915f00eca
docs: fix `ssizeobjargproc` parameters (GH-100736)
(cherry picked from commit 5fb1c08e15)

Co-authored-by: David Lechner <david@lechnology.com>
2023-01-04 07:40:06 -08:00