| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Doc/library/time.rst (GH-120084)
(cherry picked from commit b6b0dcbfc054f581b6f78602e4c2e9474e3efe21)
Co-authored-by: shurj0 <60540027+shurj0@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
(GH-119524) (#119955)
Add a dedicated subsection for `open()`, `read_text()`, `read_bytes()`,
`write_text()` and `write_bytes()`.
(cherry picked from commit bd6d4ed6454378e48dab06f50a9be0bae6baa3a2)
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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>
|
| |
|
|
|
|
| |
Reported by Michael Kass on docs@
(cherry picked from commit f3fc800d5f17b144a752a262102b750bedcdaa14)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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)
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
| |
documentation (GH-119440) (GH-119652)
(cherry picked from commit b407ad38fb93585332c370b8fa56905fb238cdfd)
|
| |
|
|
|
|
|
|
| |
(GH-119583) (#119625)
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
|
|
|
|
| |
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
(GH-106624) (GH-119384)
(cherry picked from commit 5adf78f546a5dc3f5b8eeaa209a2e8437ae96ac8)
Co-authored-by: Mathijs Mortimer <thiezn@users.noreply.github.com>
|
|
|
|
|
|
|
| |
docstrings (GH-119330) (#119371)
(cherry picked from commit 0e3c8cda1f04c983994e76aea93600dbb4714832)
Co-authored-by: Landon Wood <landon@elkrange.com>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
gh-108267 Fix another dataclasses docs typo (GH-119277)
(cherry picked from commit 423bbcbbc43cacfb6a217c04f890a47d3cf7c3a9)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
(gh-119137)
|
|
|
|
|
|
| |
(GH-119082) (#119098)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
|
| |
|
|
|
|
| |
equivalents (gh-118977) (#119042)
|
|
|
|
|
|
|
|
|
| |
`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>
|
|
|
|
|
|
| |
(GH-118964) (#118992)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
|
|
|
|
| |
`PurePath.match()` (#118713)
|
|
|
|
|
|
|
|
|
|
| |
`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-118794)
(cherry picked from commit 05c2fe1acda9ea5a57061642c36e8b73bb4fbba4)
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
| |
Docs: fix typos in documentation (GH-118752)
(cherry picked from commit 7b0c247f1c176e092777fce4677a00f22c738b3c)
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
| |
Also mention that the 'expression' parameter can be a string.
(cherry picked from commit a71e32ce8e183023fc1ee401c22ebe35e4832f09)
Co-authored-by: Erlend E. Aasland <erlend@python.org>
|
|
|
|
| |
(gh-118659)
|
|
|
|
|
|
| |
Fix typo in Doc/library/asyncio-task.rst (GH-118627)
(cherry picked from commit fc50f1bdbad3aa52d7cbd3cb836a35806266ec54)
Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
|
|
|
|
|
|
|
| |
(GH-118656)
(cherry picked from commit 3ed3bc379a0c4ce7a107dd4bc276554fbb477998)
Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
|
|
|
|
| |
(#118587)
|
| |
|
|
|
|
|
|
|
|
| |
(GH-118549) (#118555)
(cherry picked from commit 9d67b72a4952766fdba803eb6eadd41dfee29dff)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
| |
(GH-117925) (GH-118509)
(cherry picked from commit b3372481b6cae5766330b041c4622c28cee2119f)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|