Commit graph

29540 commits

Author SHA1 Message Date
Miss Islington (bot)
446c91e5fb
[3.13] gh-149861: Fix rule in match statement case_block PEG grammar (#150512)
(cherry picked from commit 99c254e2f7)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
2026-05-27 16:25:43 +01:00
Miss Islington (bot)
effcfd725d
[3.13] gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897) (GH-150384)
(cherry picked from commit 832afeddce)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
2026-05-25 10:07:38 +00:00
Jonathan Dung
29fcf3c5f9
[3.13] Document that import sys.monitoring raises ModuleNotFoundError (GH-148320) (#148422) 2026-05-24 12:54:29 +05:30
Miss Islington (bot)
7388a67340
[3.13] gh-150232: update Thread group parameter doc (GH-150283) (#150299)
gh-150232: update Thread group parameter doc (GH-150283)
(cherry picked from commit 82191c6d2c)

Co-authored-by: My-ABC <569817555@qq.com>
2026-05-23 14:04:15 +05:30
Miss Islington (bot)
5cf32883dc
[3.13] gh-149902: Remove dead packaging docs link and add a new section for external resources (GH-150030) (#150239)
Co-authored-by: Mia Albert <micha@2231puppy.tech>
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-05-22 14:45:31 +03:00
Jelle Zijlstra
1df755c135
[3.13] gh-149995: Update typing.py docstrings and documentation (#150217)
Some of these docstrings read as if they were written when typing.py was
first written, and things have evolved since then.

A few motivations:
- Call protocols protocols instead of ABCs. They are also ABCs, but the fact
  they are protocols is more relevant to typing.
- Avoid recommending direct use of .__annotations__ and steer users to
  annotationlib instead.
- For TypedDict, mention NotRequired before total=False since it is more
  general and probably more frequently useful.
- For overloads, mention runtime use first instead of stub use. I think early on
  there was talk of allowing overload only in stubs, but it is now heavily used at
  runtime too and that's more likely to be relevant to users.
(cherry picked from commit f159419ae2)
2026-05-22 05:09:41 +00:00
Stan Ulbrych
6f72734446
[3.13] Fix minor typos in unicode.rst (GH-149587) (#150163)
(cherry picked from commit 4e97ff3351)

Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
2026-05-20 15:37:06 +00:00
Miss Islington (bot)
792a552879
[3.13] gh-134887: Add references to locale module for locale-aware number formatting references in string module docs (GH-134888) (GH-150122)
(cherry picked from commit 47723af4e7)

Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
2026-05-20 02:55:24 +02:00
Miss Islington (bot)
6fb207ef3e
[3.13] gh-69619: Clarify whitespace definition in str.strip docs (GH-150021) (GH-150047)
(cherry picked from commit 17eb17d43f)

Co-authored-by: Daniil <d.mayorov@innopolis.university>
2026-05-19 23:07:20 +02:00
Miss Islington (bot)
8ee6aff140
[3.13] gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994) (GH-150066)
(cherry picked from commit ba0aca3bff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Sebastian Gassner <sebastian.gassner@gmail.com>
2026-05-19 08:44:21 +00:00
Miss Islington (bot)
09b2e00b42
[3.13] gh-95816: Fix TLS version range example in docs (GH-148574) (#150010)
gh-95816: Fix TLS version range example in docs (GH-148574)

docs(ssl): Fix TLS version range example
(cherry picked from commit dbd8985e82)

Co-authored-by: Jan Brasna <1784648+janbrasna@users.noreply.github.com>
2026-05-18 14:47:35 -07:00
Miss Islington (bot)
e90f3baf5d
[3.13] gh-134837: Correct and improve base85 documentation for base64 module (GH-145843) (GH-149743) (GH-149893)
(cherry picked from commit e667d62f11)
(cherry picked from commit 9ad8a1b955)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: David Huggins-Daines <dhd@ecolingui.ca>
2026-05-15 21:36:47 +03:00
Miss Islington (bot)
012530ba4f
[3.13] gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804) (GH-149872)
Like IBM00858, CP00858, IBM01140, CP01140.
(cherry picked from commit 20438866ae)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-05-15 15:08:50 +03:00
sobolevn
a89fafca65
[3.13] gh-149763: Improve availablity docs in select.rst (GH-149764) (#149856)
(cherry picked from commit 7e98debdf4)
2026-05-15 07:33:33 +00:00
Miss Islington (bot)
4da3e91363
[3.13] Link to existing rules in compound_stmts.rst (GH-149811) (GH-149838)
Link to existing rules in compound_stmts.rst (GH-149811)

In gh-138418, `!` was added to links to rules that don't exist in
the docs, in order to silence broken link warnings.
However, productionlist doesn't parse the `!`, which ends up in
the rendered documentation. (It's possible that gh-127835 broke
the `!` support.)

Replace the names with ones that appear in docs:

- `star_named_expression` in the grammar corresponds to
  `flexible_expression` in the docs
- `star_named_expressions` in the grammar corresponds to
  `flexible_expression_list` in the docs
- `named_expression` in the grammar corresponds to
  `assignment_expression` in the docs

Having two sets of names isn't great of course. Consolidating them
is tracked in (subissues of) gh-127833.
(cherry picked from commit c37529293d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-05-14 19:34:29 +02:00
Miss Islington (bot)
a76d9f48d5
[3.13] gh-149574: Document that is_typeddict, is_protocol, is_dataclass, isclass return False for generic aliases (GH-149604) (#149752)
gh-149574: Document that is_typeddict, is_protocol, is_dataclass, isclass return False for generic aliases (GH-149604)
(cherry picked from commit a4e51c8dac)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-05-13 03:07:24 +00:00
Miss Islington (bot)
ae65e0cf85
[3.13] gh-148669: Clarify __reduce__() module lookup behavior (GH-148670) (#149705)
gh-148669: Clarify `__reduce__()` module lookup behavior (GH-148670)
(cherry picked from commit 54a5fd4126)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
2026-05-12 02:52:36 +00:00
Miss Islington (bot)
a42082b6a1
[3.13] gh-146061: Clarify indent=None in json docs (GH-146095) (GH-149669)
(cherry picked from commit 833dae7c1f)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
2026-05-11 11:38:56 +00:00
Miss Islington (bot)
412b001fa7
[3.13] docs: Clarify docs for error case of PyDict_GetItemRef (GH-149506) (#149548)
docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506)
(cherry picked from commit 3565d31690)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
2026-05-08 16:36:11 +05:30
Serhiy Storchaka
561d1b95b9
[3.13] gh-138907: Support RFC 9309 in robotparser (GH-138908) (GH-149376)
* empty lines are always ignored instead of separating groups
* the "user-agent" line after a rule starts a new group
* groups matching the same user agent are now merged
* the rule with the longest match wins instead of the first matching rule
* in case of equal matches, the “Allow” rule wins over “Disallow”
* special characters “$” and “*” are now supported in rules
* prefer full match for user agent

(cherry picked from commit bc285e5832)
2026-05-04 18:43:03 +00:00
Miss Islington (bot)
3868444600
[3.13] gh-137337: Clarify import statement namespace binding (GH-144607) (GH-149370)
It is not always in the local namespace.
(cherry picked from commit b8ebd078f9)

Co-authored-by: Kit Dallege <xaum.io@gmail.com>
2026-05-04 14:52:02 +00:00
Miss Islington (bot)
76e250189f
[3.13] gh-87245: Improve IPv6Address.ipv4_mapped documentation (GH-92572) (#149361)
gh-87245: Improve IPv6Address.ipv4_mapped documentation (GH-92572)

Avoid the phrasing ‘starting with ::FFFF/96’, which is confusing since
it seems to mix a prefix and a range. Instead, make it clear what the
actual range is, and refer to the relevant RFC.

Closes GH-87245.
(cherry picked from commit 7aedd0a6c6)

Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>
2026-05-04 13:10:17 +00:00
Miss Islington (bot)
6a2f12b031
[3.13] gh-148663: Document that calendar.IllegalMonthError inherits from both ValueError and IndexError (GH-148664) (#148918)
(cherry picked from commit 435be06dd2)

Co-authored-by: Eoin Shaughnessy <45000144+EoinTrial@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-05-03 17:42:39 +01:00
Miss Islington (bot)
e961c00255
[3.13] gh-149267: Document ast.Constant.kind attribute (GH-149268) (#149294)
gh-149267: Document ast.Constant.kind attribute (GH-149268)

The kind attribute of ast.Constant was not mentioned in the
documentation. It is set to 'u' for u-prefixed string literals
and None for all other constants.

---------
(cherry picked from commit 3a1df787e1)

Co-authored-by: Anuj Nitin Bharambe <119653366+anujbharambe@users.noreply.github.com>
Co-authored-by: Anuj Bharambe <anujnitinb@gmail.com>
2026-05-02 20:05:24 +03:00
Miss Islington (bot)
b274204657
[3.13] gh-111264: Add a note about untrusted input to tomllib docs (#149226)
(cherry picked from commit 9d41e2a534)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-05-02 12:13:57 +01:00
Miss Islington (bot)
bed659fa1d
[3.13] Fix source link in Doc/howto/descriptor.rst (GH-149215) (#149251)
Co-authored-by: sobolevn <mail@sobolevn.me>
2026-05-01 22:47:58 +03:00
Miss Islington (bot)
c38c463c14
[3.13] gh-135944: Add a "Runtime Components" Section to the Execution Model Docs (gh-135945) (#139510)
* gh-135944: Add a "Runtime Components" Section to the Execution Model Docs (gh-135945)

The section provides a brief overview of the Python runtime's execution environment.  It is meant to be implementation agnostic,
(cherry picked from commit 46a1f0a9ff)

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

* concurrent.interpreters was added to Python 3.14

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-04-30 10:42:34 +00:00
Miss Islington (bot)
2a64c966af
[3.13] gh-149035: Modernize legacy Python patterns in Doc/tutorial/stdlib2.rst (GH-149036) (#149090)
Co-authored-by: ByteFlow <fakeshadow1337@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 05:16:36 +00:00
Serhiy Storchaka
0fd4fd4496
[3.13] gh-148529: Minor improvements of the struct module documentation (GH-148565) (GH-149072)
* Document that 's' and 'p' accept bytes and bytearray.
* Fix some footnotes.
* Clarify that "string" is a byte string.
* Fix the module docstring.
(cherry picked from commit 3e5a3cb2bd)
2026-04-27 20:22:47 +00:00
Miss Islington (bot)
a724c9f6fb
[3.13] gh-82665 Mention that HTMLParser.handle_starttag value can be None (GH-134312) (#149038)
gh-82665 Mention that HTMLParser.handle_starttag value can be None (GH-134312)

* Specify boolean attribute behavior in parser

* Tweak wording and example




* Fix backticks

---------
(cherry picked from commit 804c213c89)

Co-authored-by: Micah Najacht <micah.najacht@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-04-27 22:31:35 +08:00
Miss Islington (bot)
9e68f174c2
[3.13] Document that multiprocessing treats local same-user processes as trusted (GH-149001) (#149034)
Document that multiprocessing treats local same-user processes as trusted (GH-149001)

Clarify in the Authentication keys section that the authkey handshake
covers Listener/Client (addressable endpoints) only, not the anonymous
pipes behind Pipe() and Queue, and that isolation between same-user
processes must be arranged at the OS level.
(cherry picked from commit f27e91e372)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2026-04-27 01:48:39 +00:00
Miss Islington (bot)
7dd784e701
[3.13] gh-142965: Fix Concatenate documentation to reflect valid use cases (GH-143316) (#148900)
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.
(cherry picked from commit 75ff1afcb6)

Co-authored-by: John Seong <39040639+sandole@users.noreply.github.com>
2026-04-22 19:57:40 -07:00
Miss Islington (bot)
a52c8cbbf5
[3.13] gh-145194: Fix typing in re tokenizer example (GH-145198) (#148898)
(cherry picked from commit bd7352d807)

Co-authored-by: Vikash Kumar <163628932+Vikash-Kumar-23@users.noreply.github.com>
2026-04-23 02:46:31 +00:00
Miss Islington (bot)
df47919a9b
[3.13] Docs: Fix some typos in calendar.rst (GH-148756) (GH-148796)
Docs: Fix some typos in `calendar.rst` (GH-148756)
(cherry picked from commit 983c7462d6)

Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
2026-04-20 14:43:55 +00:00
Miss Islington (bot)
bef4d84e7f
[3.13] gh-148763: Fix paramter name in multiprocessing.connection.send_bytes/recv_bytes_into docs (GH-126603) (#148787)
gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_bytes_into` docs (GH-126603)
(cherry picked from commit e50acef0b2)


Doc: Fix buf argument name in multiprocessing connection send_bytes

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
2026-04-20 00:12:30 +00:00
Miss Islington (bot)
01f7218983
[3.13] gh-148779: Update Briefcase link in android.rst documentation (GH-148777) (#148781)
Use canonical beeware.org URL for link to Briefcase.
(cherry picked from commit 82767780f8)

Co-authored-by: partev <petrosyan@gmail.com>
2026-04-19 21:50:45 +00:00
Miss Islington (bot)
9c2db8144e
[3.13] gh-100305: Deemphasize that ast.literal_eval is safe in eval documentation (GH-100326) (#148421)
(cherry picked from commit b3b0cef0c2)

Co-authored-by: Ram Vikram Singh <ramvikrams243@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
2026-04-15 17:15:31 +01:00
Hugo van Kemenade
1797dcda4e
[3.13] Docs: Use bash lexer for http.server CLI commands, not Python (GH-148612) (#148621) 2026-04-15 19:01:04 +03:00
Miss Islington (bot)
e76aa128fe
[3.13] tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580) (#148582)
tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580)

pair of minor doc typo fixes
(cherry picked from commit 236aa0a4e2)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2026-04-14 17:06:49 -07:00
Miss Islington (bot)
cb4b94c74d
[3.13] gh-148186: Improve assertCountEqual description in docs. (GH-148463) (#148586)
gh-148186: Improve `assertCountEqual` description in docs. (GH-148463)
(cherry picked from commit 94d42bf5c2)

Co-authored-by: Kliment Lamonov <klimentlamonov@yandex.ru>
2026-04-14 23:45:32 +00:00
Savannah Ostrowski
ee34f95dbc
[3.13] gh-72406: Document argument ordering in argparse help output (GH-148534) (#148567)
gh-72406: Document argument ordering in argparse help output (#148534)

(cherry picked from commit 4286227308)

Co-authored-by: Santi Hernandez <santi@santihdzs.com>
2026-04-14 17:53:11 +00:00
Miss Islington (bot)
f35859bca6
[3.13] Fix "encodings" typo in argparse.FileType documentation (GH-148502) (#148514)
Fix "encodings" typo in argparse.FileType documentation (GH-148502)
(cherry picked from commit 8ecb6b8b0c)

Co-authored-by: Gleb Popov <gvpopov.dev@gmail.com>
2026-04-13 11:34:05 -07:00
Miss Islington (bot)
4830d291e7
[3.13] gh-147965: Add shutdown() to multiprocessing.Queue excluded methods (GH-147970) (#148417)
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.
(cherry picked from commit 22290ed011)

Co-authored-by: WYSIATI <chester.lee.cold@gmail.com>
2026-04-12 00:52:32 +00:00
Miss Islington (bot)
2f30fcf674
[3.13] gh-148337: Document importlib.resources security model (GH-148340) (#148355)
gh-148337: Document `importlib.resources` security model (GH-148340)
(cherry picked from commit 70b86e7829)

Co-authored-by: Stan Ulbrych <stan@python.org>
2026-04-11 17:10:53 -07:00
Miss Islington (bot)
83cca73a0d
[3.13] gh-148091: clarify asyncio.Future.cancel(msg) behaviour (GH-148248) (#148300)
gh-148091: clarify asyncio.Future.cancel(msg) behaviour (GH-148248)
(cherry picked from commit 2acb8d9257)

Co-authored-by: Manoj K M <136242596+manoj-k-m@users.noreply.github.com>
2026-04-09 20:22:59 +05:30
Miss Islington (bot)
88b4c2305e
[3.13] gh-148067: Fix typo in asyncio event loop docs: 'signals' -> 'signal' (GH-148073) (#148245)
Co-authored-by: TT <70463940+Herrtian@users.noreply.github.com>
2026-04-09 14:07:54 +00:00
Miss Islington (bot)
8337805ad1
[3.13] gh-106318: Add example for str.swapcase() method (GH-144575) (#148297)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2026-04-09 13:40:28 +00:00
Miss Islington (bot)
0438467b2d
[3.13] gh-146646: Document that glob functions suppress OSError (GH-147996) (#148289)
gh-146646: Document that glob functions suppress OSError (GH-147996)
(cherry picked from commit 8000a9de3c)

Co-authored-by: WYSIATI <chester.lee.cold@gmail.com>
2026-04-09 10:51:12 +00:00
Miss Islington (bot)
4002c3a461
[3.13] Minor edit: Four space indent in example (gh-148264) (gh-148266) 2026-04-08 17:56:10 +00:00
Miss Islington (bot)
5af6ce3e7b
[3.13] gh-146121: Clarify security model of pkgutil.getdata; revert checks (GH-148197) (#148205)
gh-146121: Clarify security model of pkgutil.getdata; revert checks (GH-148197)

This reverts commit bcdf231946,
and clarifies get_data's security model.

(cherry picked from commit cf59bf7647)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2026-04-07 12:26:51 +02:00