Commit graph

14000 commits

Author SHA1 Message Date
Miss Islington (bot)
2912fcc2e4
[3.14] GH-106235: Clarify parse_known_args documentation by removing "remaining" (GH-126921) (#134913)
GH-106235: Clarify `parse_known_args` documentation by removing "remaining" (GH-126921)
(cherry picked from commit a4251411a9)

Co-authored-by: Savannah Bailey <savannahostrowski@gmail.com>
2025-05-30 13:24:08 -07:00
Miss Islington (bot)
41fe324d8b
[3.14] gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-134925) (GH-134940)
Optional None values are always omitted.
(cherry picked from commit 1a89991d23)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-30 19:30:13 +03:00
Miss Islington (bot)
370f91b946
[3.14] gh-134906: Document CompressionParameter.content_size_flag (GH-134907) (#134915)
gh-134906: Document CompressionParameter.content_size_flag (GH-134907)

* Document CompressionParameter.content_size_flag
(cherry picked from commit 5f60d0fccc)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
2025-05-30 04:43:33 +00:00
Miss Islington (bot)
4927596c49
[3.14] ast docs: Fix description of ast.Constant (GH-134741) (#134911)
Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.
(cherry picked from commit 381020d41f)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-05-30 04:17:18 +00:00
Miss Islington (bot)
da4f37596f
[3.14] gh-69011: clarify & deduplicate ctypes.create_*_buffer docs (GH-132858) (GH-134881)
This adds a warning about the possibly-missing NUL terminator, but in a way
that doesn't make it sound like a bug/wart.
(cherry picked from commit b783e1791b)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-05-29 13:23:19 +00:00
Miss Islington (bot)
7515384974
[3.14] gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-134818) (GH-134823)
(cherry picked from commit 7be5916f6d)
2025-05-28 12:32:59 +00:00
Miss Islington (bot)
2194729f3a
[3.14] Update outdated statement from math about C standard (GH-134621) (#134825)
Update outdated statement from `math` about C standard (GH-134621)
(cherry picked from commit 21672b694b)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2025-05-28 07:36:40 +00:00
Miss Islington (bot)
0aa0b9b05f
[3.14] Fix typing.TYPE_CHECKING docs to reflect PEP 649. (GH-134813) (#134822)
Fix typing.TYPE_CHECKING docs to reflect PEP 649. (GH-134813)

typing.TYPE_CHECKING should no longer steer users towards
manual or automatic stringization (and PEP 563); PEP 649
makes all that unnecessary.
(cherry picked from commit d7256ae4d7)

Co-authored-by: larryhastings <larry@hastings.org>
2025-05-27 23:15:17 -07:00
Miss Islington (bot)
0ea41f8464
[3.14] gh-134789: Document del s[i] operation for mutable sequences (GH-134804) (#134808)
gh-134789: Document del s[i] operation for mutable sequences (GH-134804)

[main] Update stdtypes.rst

- Added explicit mention of `del s[i]` (item deletion by index) to the Mutable Sequence Types section.
- Clarified that this operation removes the item at the specified index from the sequence.
- Addresses issue GH-134789.
(cherry picked from commit 967f361993)

Co-authored-by: Rishabh Singh <67859818+rishabh11336@users.noreply.github.com>
2025-05-27 18:53:52 +00:00
Miss Islington (bot)
0f93b2f862
[3.14] gh-134664: document cleanup_socket parameter in asyncio.start_unix_server (GH-134750) (#134779)
gh-134664: document `cleanup_socket` parameter in `asyncio.start_unix_server` (GH-134750)
(cherry picked from commit 92ea1eb38f)

Co-authored-by: Shamil <ashm.tech@proton.me>
2025-05-27 14:04:43 +05:30
Miss Islington (bot)
c8379c7edf
[3.14] gh-134559: Add versionadded for `object.__replace__()` (GH-134672) (#134699)
gh-134559: Add versionadded for ``object.__replace__()`` (GH-134672)
(cherry picked from commit 71290a6fbe)

Co-authored-by: tmlnv <108088921+tmlnv@users.noreply.github.com>
2025-05-26 10:29:51 +00:00
Miss Islington (bot)
9c6d2dbe26
[3.14] gh-133960: Improve typing.evaluate_forward_ref (GH-133961) (#134663)
gh-133960: Improve typing.evaluate_forward_ref (GH-133961)

As explained in GH-133960, this removes most of the behavior differences with ForwardRef.evaluate.
The remaining difference is about recursive evaluation of forwardrefs; this is practically useful
in cases where an annotation refers to a type alias that itself is string-valued.

This also improves several edge cases that were previously not handled optimally. For example,
the function now takes advantage of the partial evaluation behavior of ForwardRef.evaluate() to
evaluate more ForwardRefs in the FORWARDREF format.

This also fixes GH-133959 as a side effect, because the buggy behavior in GH-133959 derives from
evaluate_forward_ref().
(cherry picked from commit 57fef27cfc)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-05-25 17:52:04 +00:00
Miss Islington (bot)
8c6653428f
[3.14] annotationlib docs: note that ForwardRef.evaluate eventually defaults to empty globals (GH-134661) (#134662)
annotationlib docs: note that ForwardRef.evaluate eventually defaults to empty globals (GH-134661)
(cherry picked from commit b51b08a0a5)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-05-25 10:39:44 -07:00
Miss Islington (bot)
00fd5440f0
[3.14] gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462) (#134619)
gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462)

Doc/library/multiprocessing.rst: freeze_support: Change to specify spawn method instead of platform
Have multiprocessing.freeze_support() enable on spawn, not just win32.

---------
(cherry picked from commit 80284b5c5e)

Co-authored-by: Eddy Mulyono <eddymul@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-05-24 04:16:02 +00:00
Miss Islington (bot)
896b745a7a
[3.14] gh-106318: Add example for str.count() (GH-134519) (#134574)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
2025-05-23 09:53:16 +00:00
Miss Islington (bot)
7efe67ae35
[3.14] gh-106318: Add example for str.center() (GH-134518) (#134571)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
2025-05-23 09:51:17 +00:00
Miss Islington (bot)
1cdbb33771
[3.14] gh-128307: Update docs for asyncio.create_task, TaskGroup.create_task, asyncio.create_task (GH-134202) (#134553)
gh-128307: Update docs for asyncio.create_task, TaskGroup.create_task, asyncio.create_task (GH-134202)
(cherry picked from commit a3d0306ca0)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2025-05-23 09:36:19 +05:30
Miss Islington (bot)
06a3a85f15
[3.14] Avoid __file__ in hashlib example (GH-134540) (#134549)
Avoid `__file__` in `hashlib` example (GH-134540)
(cherry picked from commit 9b292ff022)

Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
2025-05-22 21:37:52 +00:00
Miss Islington (bot)
df6d9e7fbd
[3.14] gh-80050: Update BufferedReader.read docs around non-blocking (GH-130653) (#134444)
gh-80050: Update BufferedReader.read docs around non-blocking (GH-130653)
(cherry picked from commit e1f891414b)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 09:50:02 -07:00
Miss Islington (bot)
9be568eda4
[3.14] gh-132983: Add documentation for compression.zstd (GH-133911) (#134425)
gh-132983: Add documentation for compression.zstd (GH-133911)

Add documentation for compression & compression.zstd.

🎉

---------
(cherry picked from commit d862b6de1b)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Sumana Harihareswara <sh@changeset.nyc>
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
2025-05-21 14:24:23 +00:00
Miss Islington (bot)
f7cdee93f4
[3.14] gh-110631: Fix some incorrect indents in the documentation (GH-129312) (#134419)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-21 13:58:09 +00:00
Miss Islington (bot)
ac27008ccd
[3.14] Fix signature of _curses.assume_default_colors in the docs (GH-134409) (#134417)
Fix signature of `_curses.assume_default_colors` in the docs (GH-134409)
(cherry picked from commit dcfc91e4e5)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-21 13:08:20 +00:00
Miss Islington (bot)
b0bf48a134
[3.14] Add documentation for remote debugging with pdb (GH-134260) (#134398) 2025-05-21 09:29:42 +00:00
Miss Islington (bot)
04829d4d87
[3.14] gh-134209: use heap-allocated memory in _curses.window.{instr,getstr} (GH-134283) (#134391)
gh-134209: use heap-allocated memory in `_curses.window.{instr,getstr}` (GH-134283)

* made curses buffer heap allocated instead of stack
* change docs to explicitly mention the max buffer size
* changing GetStr() function to behave similarly too
* Update Doc/library/curses.rst
* Update instr with proper return error handling
* Update Modules/_cursesmodule.c
* change to strlen and better memory safety
* change from const int to Py_ssize_t
* add mem allocation guard
* update versionchanged to mention it was an increase.
* explicitly use versionchanged 3.14 as that is its own branch now.

TESTED: `python -m test -u curses test_curses`

---------
(cherry picked from commit aadda87b3d)

Co-authored-by: tigerding <43339228+zydtiger@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-20 14:01:45 -07:00
Miss Islington (bot)
899ce7d390
[3.14] gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372) (#134374)
gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372)

Added a clarification that the underlying binary buffer of a TextIOBase can be a BufferedIOBase OR a RawIOBase
(cherry picked from commit 36eb711d2f)

Co-authored-by: Alex Kautz <alex@takemobi.com>
2025-05-20 12:28:03 -07:00
Miss Islington (bot)
ff0facd332
[3.14] gh-101100: Fix Sphinx warnings in library/decimal.rst (GH-134303) (#134338)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-20 14:52:11 +00:00
Miss Islington (bot)
a3fa72578a
[3.14] gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069) (GH-134328)
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)

(cherry picked from commit a31bbc951a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-05-20 12:15:34 +00:00
Miss Islington (bot)
e20f05f53f
[3.14] gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288) (#134298)
gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288)

Explain history of de-facto standard and how to pick between the two Base-85 encoding functions in the base-64 module.

---------
(cherry picked from commit 66aaad6103)

Co-authored-by: Alek Binion <aleksander.binion@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2025-05-20 00:05:26 +00:00
Miss Islington (bot)
e3cc4008c4
[3.14] gh-122055: Clarify documentation for empty matches in RE (GH-133169) (GH-134217)
(cherry picked from commit 44b73d3cd4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-19 16:49:46 +03:00
Miss Islington (bot)
bf39decabd
[3.14] gh-134150: Clarify distinction between JSON and Python objects (GH-134154) (#134166)
gh-134150: Clarify distinction between JSON and Python objects (GH-134154)

* gh-134150: Clarify distinction between JSON objects and Python objects in json module docs

* Revert change to JSON introduction

* Clarify occurrences of "object literal" as JSON
(cherry picked from commit fa4e088668)

Co-authored-by: Micha Albert <micha@2231puppy.tech>
2025-05-18 01:54:00 +00:00
Miss Islington (bot)
b43e1d0b48
[3.14] Docs: fix spelling of "test case" in unittest documentation (GH-134137) (#134138)
Docs: fix spelling of "test case" in `unittest` documentation (GH-134137)
(cherry picked from commit b41d79c776)

Co-authored-by: Clifford Gama <53076065+cliff688@users.noreply.github.com>
2025-05-17 14:03:33 +02:00
Miss Islington (bot)
851b26f4be
[3.14] gh-113878: fix versionadded in dataclasses.field() documentation (GH-134065) (#134128)
gh-113878: fix `versionadded` in `dataclasses.field()` documentation (GH-134065)
(cherry picked from commit 9d73875072)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
2025-05-17 08:06:04 +00:00
Miss Islington (bot)
7a5851dc90
[3.14] gh-117026: Remove outdated sentence in SimpleHTTPRequestHandler docs (GH-117027) (GH-134107)
The code was changed in 0f7cddc308 (bpo-839496/gh-39531).
(cherry picked from commit ea2d707bd5)

Co-authored-by: Saleh Dehqanpour <salehdeh76@gmail.com>
2025-05-16 22:23:52 +03:00
Miss Islington (bot)
c8dcde4d5e
[3.14] gh-133286: add explanation about seq for pathlib Pattern Language (GH-133340) (#134105)
gh-133286: add explanation about `seq` for pathlib Pattern Language (GH-133340)
(cherry picked from commit ac8df4b589)

Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
2025-05-16 20:20:47 +01:00
Miss Islington (bot)
2d00484f30
[3.14] gh-133515: fix docs for unawaited coroutines in debug mode (GH-134081) (#134093)
gh-133515: fix docs for unawaited coroutines in debug mode (GH-134081)
(cherry picked from commit d94b1e9cac)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-16 15:37:01 +00:00
Miss Islington (bot)
fe5636ea96
[3.14] gh-124210: Add introduction to threading docs (GH-127046) (#134090)
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-16 12:29:40 +00:00
Miss Islington (bot)
b6299e8f16
[3.14] gh-133986: Document string split algorithm when sep is None and maxsplit is 0 (GH-133987) (#133993)
---------
(cherry picked from commit 3e23047363)

Co-authored-by: Joey Smith <joeysmith@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
2025-05-14 21:32:45 -04:00
Miss Islington (bot)
5ba525c7d0
[3.14] gh-133413: Fix references to removed Request.has_data (GH-133414) (GH-133945)
The has_data() method of http.request.Request
was removed in version 3.4.
(cherry picked from commit 86c1d439e0)

Co-authored-by: ppaez <pp@pp.com.mx>
2025-05-12 18:23:35 +00:00
Miss Islington (bot)
ecc12bff24
[3.14] gh-133904: Fix math.factorial documentation (GH-133907) (#133918)
gh-133904: Fix `math.factorial` documentation (GH-133907)
(cherry picked from commit 27ed64575d)

Co-authored-by: mkaraev <maruf.karaev97@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-12 12:53:44 +00:00
Miss Islington (bot)
94938caf35
[3.14] gh-119180: annotationlib: Fix values of Format members in docs (GH-133841) (#133903)
gh-119180: annotationlib: Fix values of Format members in docs (GH-133841)
(cherry picked from commit 0eb448cae5)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2025-05-11 15:49:21 +00:00
Miss Islington (bot)
a3475e68bb
[3.14] gh-119180: More documentation for PEP 649/749 (GH-133552) (#133902)
gh-119180: More documentation for PEP 649/749 (GH-133552)

The SC asked that the Appendix in PEP-749 be added to the docs.
(cherry picked from commit 3396df56d0)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-11 15:49:06 +00:00
Miss Islington (bot)
13c94d0401
[3.14] gh-132642: document how to render human-readable timedelta objects (GH-133825) (#133837)
gh-132642: document how to render human-readable `timedelta` objects (GH-133825)
(cherry picked from commit efcc42ba70)

Co-authored-by: Kentaro Jay Takahashi <64148935+KentaroJay@users.noreply.github.com>
2025-05-10 16:00:36 +00:00
Miss Islington (bot)
4b78cbd76f
[3.14] gh-132971: Update shutil.which() docs (GH-133067) (#133803)
gh-132971: Update shutil.which() docs (GH-133067)
(cherry picked from commit d13d5fdf61)

Co-authored-by: Kokona <125976684+985025074@users.noreply.github.com>
2025-05-10 10:51:55 +02:00
Miss Islington (bot)
94a823f501
[3.14] Docs: use boolean constants for returning boolean value (GH-133325) (GH-133760)
(cherry picked from commit 076004ae54)

Co-authored-by: Yongzi Li <1538321957@qq.com>
2025-05-09 14:17:53 +00:00
Miss Islington (bot)
d35c0e48da
[3.14] gh-133641: Doc: Add missing source link in `concurrent.futures` (GH-133642) (#133643)
gh-133641: Doc: Add missing source link in ``concurrent.futures`` (GH-133642)
(cherry picked from commit 4fcd377563)

Co-authored-by: Jonas Obrist <ojiidotch@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-08 09:34:20 +01:00
Miss Islington (bot)
effe8d4971
[3.14] gh-125028: Prohibit placeholders in partial keywords (GH-126062) (GH-133645)
(cherry picked from commit afed5f8835)

Co-authored-by: dgpb <3577712+dg-pb@users.noreply.github.com>
2025-05-08 08:26:14 +00:00
Miss Islington (bot)
cc588aaa5f
[3.14] gh-133361: move the explanation of dict equal before its use (GH-133424) (#133620)
gh-133361: move the explanation of dict equal before its use (GH-133424)

Also move up the explanation of insertion order preservation.  Both paragraphs seemed out of place down where they were.
---------
(cherry picked from commit 61ac88c06e)

Co-authored-by: Yongzi Li <1538321957@qq.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-05-07 22:10:51 +00:00
Brian Schubert
e2d440ebc6
[3.14] gh-131535: Fix stale example in html.parser docs, make examples doctests (GH-131551) (GH-133589)
(cherry picked from commit ee76e36d76)
2025-05-07 22:03:30 +00:00
Hugo van Kemenade
b092705907 Python 3.14.0b1 2025-05-06 18:33:52 +03:00
Hugo van Kemenade
3dfed23092
gh-123299: Copyedit "What's New in Python 3.14" (#133452)
Co-authored-by: Daniel Hollas <danekhollas@gmail.com>
2025-05-06 15:05:20 +03:00