Commit graph

14731 commits

Author SHA1 Message Date
John Belmonte
95559d2a7e
gh-108951: add TaskGroup.cancel() (#127214)
Fixes #108951

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Guido van Rossum <guido@python.org>
2026-04-24 11:22:05 -07:00
Eoin Shaughnessy
435be06dd2
gh-148663: Document that calendar.IllegalMonthError inherits from both ValueError and IndexError (#148664)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-04-23 15:50:23 +01:00
Victorien
8bf99ae3a9
gh-119180: Document the format parameter in typing.get_type_hints() (#143758)
Do not mention `__annotations__` dictionaries, as this is slightly
outdated since 3.14.

Rewrite the note about possible exceptions for clarity. Also do not
mention imported type aliases, as since 3.12 aliases with the `type`
statement do not suffer from this limitation anymore.
2026-04-23 02:50:15 +00:00
John Seong
75ff1afcb6
gh-142965: Fix Concatenate documentation to reflect valid use cases (#143316)
The documentation previously stated that Concatenate is only valid
when used as the first argument to Callable, but according to PEP 612,
it can also be used when instantiating user-defined generic classes
with ParamSpec parameters.
2026-04-22 19:46:04 -07:00
Vikash Kumar
bd7352d807
gh-145194: Fix typing in re tokenizer example (#145198) 2026-04-22 19:40:10 -07:00
Pieter Eendebak
8e43f3d117
gh-145056: Add support for frozendict in dataclass asdict and astuple (#145125) 2026-04-22 19:39:08 -07:00
Sanjay Janardhan
79321fdce3
gh-148883: Docs: clarify grammar in Counter dictionary methods note (gh-148882) 2026-04-22 17:56:14 -05:00
Raymond Hettinger
b16886528e
Additional itertool recipes for running statistics (gh-148879) 2026-04-22 11:52:41 -05:00
KotlinIsland
04fd103713
gh-148207: add additional keywords to typing.TypeVarTuple (#148212) 2026-04-22 06:28:12 -07:00
Gabriele N. Tornetta
858e69eab0
gh-142186: Allow all PEP-669 events to be per-code object and disableable (GH-146182)
* Make the `PY_UNWIND` monitoring event available as a code-local
event to allow trapping on function exit events when an exception
bubbles up. This complements the PY_RETURN event by allowing to
catch any function exit event.

* Allow `PY_UNWIND`  to be `DISABLE`d; disabling it disables the event for the whole code object.

* Do the above for `PY_THROW`, `RAISE`, `EXCEPTION_HANDLED`, and `RERAISE` events.
2026-04-22 09:08:23 +01:00
ByteFlow
9a1c70c639
Fix typos in asyncio, ctypes, and importlib documentation (#148747) 2026-04-20 12:22:37 -07:00
Stan Ulbrych
3fd61b74de
Use soft-deprecated in more places (#148769) 2026-04-20 17:00:35 +01:00
Manoj K M
983c7462d6
Docs: Fix some typos in calendar.rst (GH-148756) 2026-04-20 14:37:12 +00:00
Matthew Davis
e50acef0b2
gh-148763: Fix paramter name in multiprocessing.connection.send_bytes/recv_bytes_into docs (GH-126603)
Doc: Fix buf argument name in multiprocessing connection send_bytes
2026-04-19 17:05:50 -07:00
Hugo van Kemenade
e9bbf8617d
Add a new Sphinx soft-deprecated directive (#148630)
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-04-18 11:37:54 +03:00
Jelle Zijlstra
92164dc917
gh-148639: Implement PEP 800 (typing.disjoint_base) (#148640)
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-04-17 19:20:41 -07:00
Havmaagen
9d38143088
Docs: Fix typos and a comment in enum.rst (#148156) 2026-04-16 11:23:29 +05:30
Hugo van Kemenade
eb2f634b83
gh-148100: Soft deprecate re.match and re.Pattern.match in favour of prefixmatch (#148101) 2026-04-15 23:09:47 +03:00
Hugo van Kemenade
55c9d60a3a
Docs: Use bash lexer for http.server CLI commands, not Python (#148612) 2026-04-15 18:18:49 +03:00
Anerdw
d14e31ed68
gh-147957: pop items from UserDict in LIFO order (gh-147958) 2026-04-14 23:29:41 -05:00
Stan Ulbrych
d0e7c6acc9
GH-70647: Remove support for %d (and deprecate for %e) without year in strptime() (GH-144570)
* Add deprecation for %e with no year
* schedule `%e` for 3.17, and remove `%d` now
2026-04-14 17:15:27 -07:00
Kliment Lamonov
94d42bf5c2
gh-148186: Improve assertCountEqual description in docs. (#148463) 2026-04-14 19:39:16 -04:00
Gregory P. Smith
236aa0a4e2
tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580)
pair of minor doc typo fixes
2026-04-14 23:29:35 +00:00
Hugo van Kemenade
bdb0b36192
gh-86519: Update docs for prefixmatch (#148096)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2026-04-14 20:15:06 +03:00
Santi Hernandez
4286227308
gh-72406: Document argument ordering in argparse help output (#148534)
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-04-14 16:24:16 +00:00
Gleb Popov
8ecb6b8b0c
Fix "encodings" typo in argparse.FileType documentation (#148502) 2026-04-13 11:12:25 -07:00
Ram Vikram Singh
b3b0cef0c2
gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation (#100326)
Co-authored-by: Éric <merwok@netwok.org>
2026-04-12 03:07:42 +00:00
WYSIATI
22290ed011
gh-147965: Add shutdown() to multiprocessing.Queue excluded methods (GH-147970)
The multiprocessing.Queue documentation states it implements all
methods of queue.Queue except task_done() and join(). Since
queue.Queue.shutdown() was added in Python 3.13,
multiprocessing.Queue also does not implement it. Update the docs
to include shutdown() in the list of excluded methods.
2026-04-11 17:46:06 -07:00
Jonathan Dung
d7c9f1877c
gh-148320: document that import sys.monitoring raises ModuleNotFoundError (#148365)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-04-11 17:22:48 +02:00
Stan Ulbrych
70b86e7829
gh-148337: Document importlib.resources security model (#148340) 2026-04-10 17:02:22 +01:00
Stan Ulbrych
1b691564a7
Remove dead links to pkg_resources in importlib docs (#148344) 2026-04-10 17:02:00 +01:00
Manoj K M
2acb8d9257
gh-148091: clarify asyncio.Future.cancel(msg) behaviour (#148248) 2026-04-09 19:41:31 +05:30
Adorilson Bezerra
d11e9ff8ca
gh-106318: Add example for str.swapcase() method (#144575) 2026-04-09 16:33:31 +03:00
WYSIATI
8000a9de3c
gh-146646: Document that glob functions suppress OSError (#147996) 2026-04-09 12:44:24 +02:00
Raymond Hettinger
096212d3c0
Minor edit: Four space indent in example (#148264) 2026-04-08 12:48:54 -05:00
Hugo van Kemenade
55ea59e7dc Python 3.15.0a8 2026-04-07 14:24:03 +03:00
Petr Viktorin
cf59bf7647
gh-146121: Clarify security model of pkgutil.getdata; revert checks (GH-148197)
This reverts commit bcdf231946,
and clarifies get_data's security model.


Co-authored-by: Stan Ulbrych <stan@python.org>
2026-04-07 11:39:50 +02:00
Semyon Moroz
132abfd135
gh-112632: Add optional keyword-only argument expand to pprint (#136964)
Co-authored-by: stodoran <stefan.todoran@uipath.com>
Co-authored-by: StefanTodoran <stefan.alex4@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-04-07 07:42:54 +03:00
Gregory P. Smith
bac4fee745
gh-73613: clarify padding= docs in for base64 & binascii modules (GH-148183)
Based on mayeut's comment in https://github.com/python/cpython/pull/147974#discussion_r3038498019.
2026-04-06 16:45:13 -07:00
Pablo Galindo Salgado
ca960b6f38
gh-148110: Resolve lazy import filter names for relative imports (#148111) 2026-04-06 22:29:02 +01:00
Serhiy Storchaka
d0e204fb1d
gh-148153: Do not use assert for parameter validation in base64 (GH-148154)
base64.b32encode() now always raises ValueError instead of
AssertionError for the value of map01 with invalid length.
2026-04-06 13:47:27 +03:00
Gregory P. Smith
a1cf4430ed
gh-94632: document the subprocess need for extra_groups=() with user= (GH-148129) 2026-04-05 11:07:07 -07:00
Serhiy Storchaka
8bf8bf9292
gh-73613: Support Base32 and Base64 without padding (GH-147974)
Add the padded parameter in functions related to Base32 and Base64 codecs
in the binascii and base64 modules.  In the encoding functions it controls
whether the pad character can be added in the output, in the decoding
functions it controls whether padding is required in input.

Padding of input no longer required in base64.urlsafe_b64decode() by default.
2026-04-04 21:26:16 +03:00
TT
611d606a18
gh-148067: Fix typo in asyncio event loop docs: 'signals' -> 'signal' (#148073) 2026-04-04 16:02:58 +05:30
Joshua Swanson
80d0a85d96
gh-126676: Expand argparse docs for type=bool with warning and alternatives (#146435)
Co-authored-by: joshuaswanson <joshuaswanson@users.noreply.github.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
2026-04-03 18:07:03 +00:00
Miikka Koskinen
f3b74d6269
gh-80642: timeit - make target time of autorange configurable (#140283)
Co-authored-by: Alessandro Cucci <alessandro.cucci@gmail.com>
Co-authored-by: blurb-it[bot] <blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-04-03 06:47:21 +00:00
Tadej Magajna
617f4cc1c2
gh-142533: Document CRLF injection vulnerabilities in http.server doc (#143395)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-04-02 23:26:21 +02:00
Peter Sutton
021ee7fd6a
Docs: Use !r in __repr__ example (gh-146273) 2026-04-01 11:16:36 -05:00
Serhiy Storchaka
42825e6387
gh-146431: Add the wrapcol and ignorechars parameters for more Base XX codec (GH-146434)
Add the wrapcol parameter to base64 functions b16encode(), b32encode(),
b32hexencode(), b85encode() and z85encode(), and binascii functions
b2a_base32() and b2a_base85().

Add the ignorechars parameter to base64 functions b16decode(), b32decode(),
b32hexdecode(), b85decode() and z85decode(), and binascii functions
a2b_hex(), unhexlify(), a2b_base32() and a2b_base85().
2026-04-01 10:48:50 +03:00
Stan Ulbrych
62a6e898e0
gh-147856: Allow the 'count' argument of bytes.replace() to be a keyword (#147943) 2026-03-31 19:27:52 +02:00