summaryrefslogtreecommitdiffstats
path: root/Doc/library
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] typing docs: fix indentation of TypedDict deprecation notice (#120124)Alex Waygood2024-06-051-3/+3
|
* [3.12] gh-119287: clarify doc on BaseExceptionGroup.derive and link to it ↵Miss Islington (bot)2024-06-052-2/+5
| | | | | | | | from contextlib.suppress (GH-119657) (#120106) gh-119287: clarify doc on BaseExceptionGroup.derive and link to it from contextlib.suppress (GH-119657) (cherry picked from commit 5c02ea8bae2287a828840f5734966da23dc573dc) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.12] gh-120078: Fix struct_time attr typo tm_day -> tm_mday in ↵Miss Islington (bot)2024-06-051-1/+1
| | | | | | | Doc/library/time.rst (GH-120084) (cherry picked from commit b6b0dcbfc054f581b6f78602e4c2e9474e3efe21) Co-authored-by: shurj0 <60540027+shurj0@users.noreply.github.com>
* [3.12] GH-119054: Add "Reading and writing files" section to pathlib docs ↵Barney Gale2024-06-021-76/+81
| | | | | | | | (GH-119524) (#119955) Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`, `write_text()` and `write_bytes()`. (cherry picked from commit bd6d4ed6454378e48dab06f50a9be0bae6baa3a2)
* [3.12] GH-119054: Add "Querying file type and status" section to pathlib ↵Barney Gale2024-06-021-145/+151
| | | | | | | | docs (GH-119055) (#119952) Add a dedicated subsection for `Path.stat()`-related methods, specifically `stat()`, `lstat()`, `exists()`, `is_*()`, and `samefile()`. (cherry picked from commit 81d63362302187e5cb838c9a7cd857181142e530)
* [3.12] Improve documentation for typing.get_type_hints (GH-119928) (#119944)Miss Islington (bot)2024-06-021-26/+28
| | | | | | | | | | | | | | | - Explicit list of what it does that is different from "just return __annotations__" - Remove reference to PEP 563; adding the future import doesn't do anything to type aliases, and in general it will never make get_type_hints() less likely to fail. - Remove example, as the Annotated docs already have a similar example, and it's unbalanced to have one example about this one edge case but not about other behaviors of the function. (cherry picked from commit aa9fe98e0649f0a151942914ef4e2810ca6126c2) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] Add unique() recipe to itertools docs (gh-119911) (gh-119917)Miss Islington (bot)2024-06-011-2/+14
|
* [3.12] contextlib docs: Clean up redundant 'up' after 'cleanup' (GH-119873)Miss Islington (bot)2024-05-311-1/+1
| | | | Reported by Michael Kass on docs@ (cherry picked from commit f3fc800d5f17b144a752a262102b750bedcdaa14)
* [3.12] gh-109218: Improve documentation for the complex() constructor ↵Serhiy Storchaka2024-05-302-57/+123
| | | | | | | | | | | | | | | | (GH-119687) (ПР-119805) * Remove the equivalence with real+imag*1j which can be incorrect in corner cases (non-finite numbers, the sign of zeroes). * Separately document the three roles of the constructor: parsing a string, converting a number, and constructing a complex from components. * Document positional-only parameters of complex(), float(), int() and bool() as positional-only. * Add examples for complex() and int(). * Specify the grammar of the string for complex(). * Improve the grammar of the string for float(). * Describe more explicitly the behavior when real and/or imag arguments are complex numbers. (This will be deprecated in future.) (cherry picked from commit ec1ba264607b2b7b98d2602f5536a1d02981efc6)
* [3.12] subprocess docs: Fix semantically important typo (GH-119752) (#119758)Miss Islington (bot)2024-05-301-1/+1
| | | | | | | | | | subprocess docs: Fix semantically important typo (GH-119752) GH-25416 accidentally replaced a reference to the *stderr* argument of `subprocess.run` with a reference to the *stdin* argument. *stdin* is not affected by the `check_output` option. (cherry picked from commit 2cc3502f98bb9aea386ab55443fc077ddcdde91d) Co-authored-by: Zachary Ware <zach@python.org>
* [3.12] gh-119260: Clarify is_dataclass Behavior for Subclasses in ↵Miss Islington (bot)2024-05-301-2/+2
| | | | | | | | | Documentation and Tests (GH-119480) (#119761) gh-119260: Clarify is_dataclass Behavior for Subclasses in Documentation and Tests (GH-119480) (cherry picked from commit bf4ff3ad2e362801e87c85fffd9e140b774cef26) Co-authored-by: Aditya Borikar <adityaborikar2@gmail.com> Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.12] Clarify base64.a85encode docs: *wrapcols* doesn't count the newline ↵Miss Islington (bot)2024-05-281-1/+1
| | | | | | | | (GH-119409) (GH-119482) Clarify base64.a85encode docs: *wrapcols* doesn't count the newline (GH-119409) (cherry picked from commit ffa24aab107b5bc3c6ad31a6a245c226bf24b208) Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.12] [doc] Clarify the nature of the root logger in the `logging` ↵Miss Islington (bot)2024-05-281-9/+11
| | | | | documentation (GH-119440) (GH-119652) (cherry picked from commit b407ad38fb93585332c370b8fa56905fb238cdfd)
* [3.12] Misc cleanups and wording improvements for the itertools docs (gh-119631)Raymond Hettinger2024-05-271-122/+116
|
* [3.12] gh-119580: Improve version added section for convenience variable ↵Miss Islington (bot)2024-05-271-0/+2
| | | | | | (GH-119583) (#119625) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.12] docs: fix a few typos identified by codespell (GH-119516) (#119571)Hugo van Kemenade2024-05-266-8/+8
| | | | Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* [3.12] Misc improvements to the docs for itertools (gh-119532)Raymond Hettinger2024-05-241-55/+55
|
* [3.12] gh-90562: Mention slots pitfall in dataclass docs (GH-107391) (#119351)Miss Islington (bot)2024-05-231-1/+4
| | | | | | | | Co-authored-by: Josh Cannon <joshdcannon@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] gh-70795: Rework RLock documentation (GH-103853) (#119437)Miss Islington (bot)2024-05-221-24/+51
| | | | | | | | | | | | | | | | | | | | | gh-70795: Rework RLock documentation (GH-103853) Attempted to simultaneously reduce verbosity, while more descriptively describing behavior. Fix links (RLock acquire/release previously linking to Lock acquire/release, seems like bad copy pasta). Add a seealso for with-locks. Switch section to use bullet points. --------- (cherry picked from commit 2fbea81d646688cf438be1dc0be82112a9ae4325) Co-authored-by: uıɐɾ ʞ ʇɐɯɐs <_@skj.io> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* [3.12] Clarify that dklen is expected in bytes for the hashlib functions ↵Miss Islington (bot)2024-05-221-2/+2
| | | | | | | (GH-106624) (GH-119384) (cherry picked from commit 5adf78f546a5dc3f5b8eeaa209a2e8437ae96ac8) Co-authored-by: Mathijs Mortimer <thiezn@users.noreply.github.com>
* [3.12] gh-110383: Align dict.get(), .fromkeys(), and .setdefault() docs with ↵Miss Islington (bot)2024-05-221-3/+3
| | | | | | | docstrings (GH-119330) (#119371) (cherry picked from commit 0e3c8cda1f04c983994e76aea93600dbb4714832) Co-authored-by: Landon Wood <landon@elkrange.com>
* [3.12] gh-110383: Document `socket.makefile()` accepts combined modes ↵Miss Islington (bot)2024-05-211-1/+2
| | | | | | | | (GH-119150) (#119325) The supported mode values are 'r', 'w', and 'b', or a combination of those. (cherry picked from commit 62a29be5bb01c2d0f72d8f9b1b5539816e65310c) Co-authored-by: Daniel Williams <dann0a@gmail.com>
* [3.12] gh-118912: Remove description of issue fixed in 3.5 from autospeccing ↵Miss Islington (bot)2024-05-201-32/+8
| | | | | | | | | | | | | | | | | | guide (GH-119232) (#119283) gh-118912: Remove description of issue fixed in 3.5 from autospeccing guide (GH-119232) * Remove description of issue fixed in 3.5 from autospeccing guide * Make autospeccing note text more succint and lint whitespace * Add linting changes (missed in last commit) --------- (cherry picked from commit 7e57640c7ec6b7b5ce9b5eac465f6b771fd6ae69) Co-authored-by: Shauna <shaunagm@gmail.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* [3.12] gh-108267 Fix another dataclasses docs typo (GH-119277) (#119280)Miss Islington (bot)2024-05-201-1/+2
| | | | | | gh-108267 Fix another dataclasses docs typo (GH-119277) (cherry picked from commit 423bbcbbc43cacfb6a217c04f890a47d3cf7c3a9) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] Use correct markup in unittest.mock.reset_mock documentation ↵Miss Islington (bot)2024-05-201-3/+3
| | | | | | | | (GH-119207) (GH-119249) Use correct markup in unittest.mock.reset_mock documentation (GH-119207) (cherry picked from commit 6b80a5b20f31a067bd1c374295608df5f1210f49) Co-authored-by: Tialo <65392801+Tialo@users.noreply.github.com>
* [3.12] DOCS: Suggest always calling exec with a globals argument and no ↵Miss Islington (bot)2024-05-201-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | locals argument (GH-119235) (#119240) DOCS: Suggest always calling exec with a globals argument and no locals argument (GH-119235) Many users think they want a locals argument for various reasons but they do not understand that it makes code be treated as a class definition. They do not want their code treated as a class definition and get surprised. The reason not to pass locals specifically is that the following code raises a `NameError`: ```py exec(""" def f(): print("hi") f() def g(): f() g() """, {}, {}) ``` The reason not to leave out globals is as follows: ```py def t(): exec(""" def f(): print("hi") f() def g(): f() g() """) ``` (cherry picked from commit 7e1a130b8ff1ed8b3a5f00fe0f06d3916b852216) Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
* [3.12] marshal docs: Remove reference to "Sun" (GH-119161) (#119168)Miss Islington (bot)2024-05-191-1/+1
| | | | | | | | Nobody has been using a Sun machine for a long time. When I saw this sentence in a lightning talk just now, I thought it was talking about sending Python code on a spacecraft. (cherry picked from commit 697465ff88e49d98443025474e5b534adfba2cb0) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] Minor improvements to the docs for itertools.tee() (gh-119135) ↵Miss Islington (bot)2024-05-181-10/+11
| | | | (gh-119137)
* [3.12] gh-108267: Fix object.__setattr__ regression in dataclasses docs ↵Miss Islington (bot)2024-05-161-1/+2
| | | | | | (GH-119082) (#119098) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* [3.12] Misc improvements to the itertools docs (gh-119040) (#119044)Miss Islington (bot)2024-05-141-35/+26
|
* [3.12] Itertools docs: fix parameter names and indentation in Python ↵Miss Islington (bot)2024-05-141-5/+5
| | | | equivalents (gh-118977) (#119042)
* [3.12] gh-119010: Adds docs about `__type_params__` to ↵Miss Islington (bot)2024-05-131-2/+6
| | | | | | | | | `functools.update_wrapper` (GH-119012) (#119014) gh-119010: Adds docs about `__type_params__` to `functools.update_wrapper` (GH-119012) (cherry picked from commit b04c497f187b0b474e431a6d8d282269b40ffe52) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] Improve the `rmtree` doc for `dir_fd` param addition in 3.11 ↵Miss Islington (bot)2024-05-131-1/+1
| | | | | | (GH-118964) (#118992) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] GH-118701: Note that recursive wildcards aren't supported in ↵Barney Gale2024-05-111-0/+4
| | | | `PurePath.match()` (#118713)
* [3.12] Correct the argument names for `secrets.choice` and ↵Miss Islington (bot)2024-05-101-3/+3
| | | | | | | | | | `secrets.randbelow` in `secrets.rst` (GH-118098) (GH-118907) Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst` (GH-118098) Correct the argument names for `secrets.choice` and `secrets.randbelow` in `secrets.rst`. (cherry picked from commit c444362c6e0b6c01f49c3bee864100f52bd3b640) Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
* gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488)Steve Dower2024-05-091-0/+7
|
* [3.12] Format None, True, False and NotImplemented as literals (GH-118758) ↵Serhiy Storchaka2024-05-0824-56/+56
| | | | | (GH-118794) (cherry picked from commit 05c2fe1acda9ea5a57061642c36e8b73bb4fbba4)
* [3.12] docs: module page titles should not start with a link to themselves ↵Miss Islington (bot)2024-05-08220-443/+440
| | | | | | | | (GH-117099) (#118791) docs: module page titles should not start with a link to themselves (GH-117099) (cherry picked from commit bcb435ee8ff41b5ec5d879ee0b6651f146a66151) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* [3.12] Docs: fix typos in documentation (GH-118752) (#118786)Miss Islington (bot)2024-05-084-4/+4
| | | | | | Docs: fix typos in documentation (GH-118752) (cherry picked from commit 7b0c247f1c176e092777fce4677a00f22c738b3c) Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
* [3.12] gh-118671: Updated dead ActiveState links (GH-118730) (#118754)Miss Islington (bot)2024-05-087-7/+7
| | | | | | Co-authored-by: trag1c <trag1cdev@yahoo.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.12] gh-118310: Fix documentation for `enum.Enum.__new__` (GH-118311) ↵Miss Islington (bot)2024-05-071-5/+7
| | | | | | | | | | | | | (GH-118699) gh-118310: Fix documentation for `enum.Enum.__new__` (GH-118311) The provided example was incorrect: - The example enum was missing the `int` mixin as implied by the context - The value of `int('1a', 16)` was incorrectly given as 17 (should be 26) (cherry picked from commit 48e52fe2c9a7b33671f6b5d1420a71a6f31ad64b) Co-authored-by: Momo Eissenhauer <mmEissen@users.noreply.github.com>
* [3.12] gh-78612: Mark up eval() using param list (GH-115212) (#116044)Miss Islington (bot)2024-05-071-5/+15
| | | | | | Also mention that the 'expression' parameter can be a string. (cherry picked from commit a71e32ce8e183023fc1ee401c22ebe35e4832f09) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* [3.12] Expand recipe for kernel density estimation to include common tasks. ↵Raymond Hettinger2024-05-061-10/+46
| | | | (gh-118659)
* [3.12] Fix typo in Doc/library/asyncio-task.rst (GH-118627) (#118657)Miss Islington (bot)2024-05-061-1/+1
| | | | | | Fix typo in Doc/library/asyncio-task.rst (GH-118627) (cherry picked from commit fc50f1bdbad3aa52d7cbd3cb836a35806266ec54) Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
* [3.12] GH-115577 Clarify netloc term usage in urllib.parse docs (GH-117632) ↵Miss Islington (bot)2024-05-061-0/+5
| | | | | | | (GH-118656) (cherry picked from commit 3ed3bc379a0c4ce7a107dd4bc276554fbb477998) Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
* [3.12] gh-118476: Fix corner cases in islice() rough equivalent. (Gh-118559) ↵Miss Islington (bot)2024-05-051-18/+11
| | | | (#118587)
* [3.12] Minor improvements to the itertools recipes (GH-118563) (#118565)Miss Islington (bot)2024-05-031-24/+12
|
* [3.12] docs: clarify csv.DictReader's treatment of the first data row ↵Miss Islington (bot)2024-05-031-2/+4
| | | | | | | | (GH-118549) (#118555) (cherry picked from commit 9d67b72a4952766fdba803eb6eadd41dfee29dff) Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
* [3.12] gh-117492: Clarify documentation of `typing.Never` (GH-117678) (#118547)Miss Islington (bot)2024-05-031-24/+22
| | | | | | | (cherry picked from commit 852263e1086748492602a90347ecc0a3925e1dda) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* [3.12] gh-117903: Clarify that the staticmethod descriptor is callable ↵Miss Islington (bot)2024-05-021-2/+3
| | | | | | | (GH-117925) (GH-118509) (cherry picked from commit b3372481b6cae5766330b041c4622c28cee2119f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>