Commit graph

14269 commits

Author SHA1 Message Date
Miss Islington (bot)
21c9c919aa
[3.14] gh-137952: update csv.Sniffer().has_header() docs to describe the actual off-by-onish behavior (GH-137953) (#141434)
gh-137952: update `csv.Sniffer().has_header()` docs to describe the actual off-by-onish behavior (GH-137953)

* checks 21, not 20
* Say "header" instead of "first row" to disambiguate per review.

---------
(cherry picked from commit 0d7b48a8f5)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-11 16:13:10 -08:00
Miss Islington (bot)
7618a40a17
[3.14] gh-139533: fix refs to code without proper markups on turtledemo doc (GH-139534) (#141421)
gh-139533: fix refs to code without proper markups on turtledemo doc (GH-139534)
(cherry picked from commit c903d76832)


gh-139533: fix refs to code without proper markups on turtledemo documentation

Co-authored-by: Marco Barbosa <aureliobarbosa@gmail.com>
2025-11-11 19:42:13 +00:00
Miss Islington (bot)
6d31d085f0
[3.14] gh-140578: Doc: Remove sencence implying that concurrent.futures.ThreadPoolExecutor does not exist (GH-140689) (#141382)
gh-140578: Doc: Remove sencence implying that concurrent.futures.ThreadPoolExecutor does not exist (GH-140689)

* Doc: Remove sencence implying that concurrent.futures.ThreadPoolExecutor does not exist

Closes GH-140578

* Add NEWS.d entry for gh-140578

---------
(cherry picked from commit 46b58e1bb9)

Co-authored-by: Louis <paternal@users.noreply.github.com>
Co-authored-by: Louis Paternault <spalax@gresille.org>
2025-11-11 04:56:07 +00:00
Miss Islington (bot)
63a3737ce7
[3.14] gh-139707: Specify winreg, msvcrt and winsound module availability in docs (GH-140429) (GH-141351)
(cherry picked from commit 13fa313beb)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-10 17:40:46 +01:00
Miss Islington (bot)
7618754d53
[3.14] gh-141343: Fix swapped words in sorted doc (GH-141357)
(cherry picked from commit 59b793b0dd)

Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
2025-11-10 15:01:30 +00:00
Stan Ulbrych
c12a0bef40
[3.14] gh-139707: Add docs for optional modules (GH-140171) (GH-141204)
(cherry picked from commit d2ce6d708a)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Author: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-11-10 15:20:00 +01:00
Miss Islington (bot)
c09a65914d
[3.14] gh-141004: Document pyctype.h macros (GH-141272) (GH-141340)
gh-141004: Document `pyctype.h` macros (GH-141272)
(cherry picked from commit df19261621)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-10 10:12:55 +00:00
Miss Islington (bot)
6cbb8cb1f7
[3.14] gh-62480: De-personalize "Partial mocking" section in unittest.mock examples (GH-141321) (#141326)
gh-62480: De-personalize "Partial mocking" section in `unittest.mock` examples (GH-141321)

* Refine some wording in unittest partial mock doc

Some of the descriptions were addressed in first person,
but have now been changed to address the user reading the documentation instead.
(cherry picked from commit b618731781)

Co-authored-by: KarnbirKhera <166065758+KarnbirKhera@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2025-11-09 18:08:30 -06:00
Miss Islington (bot)
5c345ed61a
[3.14] gh-62480: De-personalize "Mocking Unbound Methods" section in unittest.mock examples (GH-141322) (#141324)
gh-62480: De-personalize "Mocking Unbound Methods" section in `unittest.mock` examples (GH-141322)

* Rewrite Mocking Unbound Methods paragraph to second person
(cherry picked from commit ec85d3cbfe)

Co-authored-by: Elena O <31424287+oklena@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-09 17:51:07 -06:00
Miss Islington (bot)
86c63099ed
[3.14] gh-140980: document SET_FUNCTION_ATTRIBUTE flag for annotate function (GH-141306) (#141316)
gh-140980: document `SET_FUNCTION_ATTRIBUTE` flag for `annotate` function  (GH-141306)
(cherry picked from commit 6f20ea1e2d)

Co-authored-by: Lakshya Upadhyaya <lakshya.upadhyaya05@gmail.com>
2025-11-09 19:04:48 +00:00
Miss Islington (bot)
432432bfc8
[3.14] gh-141127: Clarify os.symlink() documentation for argument order (GH-141144) (#141278)
gh-141127: Clarify os.symlink() documentation for argument order (GH-141144)
(cherry picked from commit 7ae440f262)

Co-authored-by: Chilla Kalyan <127284726+chillakalyan@users.noreply.github.com>
2025-11-09 11:19:09 +01:00
Miss Islington (bot)
7db06be57f
[3.14] gh-141246: Link to correct Windows docs in time.sleep() doc (GH-141248) (#141251)
gh-141246: Link to correct Windows docs in `time.sleep()` doc (GH-141248)
(cherry picked from commit 6545a4e8f8)

Co-authored-by: 莯凛 <1348292515@qq.com>
2025-11-08 15:02:35 +00:00
Miss Islington (bot)
41944be1e1
[3.14] gh-141004: correctly document Py_HASH_* and PyHASH_* as hash_info attributes (GH-141233) (#141234)
gh-141004: correctly document `Py_HASH_*` and `PyHASH_*` as `hash_info` attributes (GH-141233)
(cherry picked from commit 87942d911b)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-11-08 12:28:01 +00:00
Miss Islington (bot)
24619962e0
[3.14] gh-140793: Improve documentatation and tests for the ensure_ascii option in the json module (GH-140906) (GH-141227)
* Document that ensure_ascii=True forces escaping not only non-ASCII, but also
  non-printable characters (the only affected ASCII character is U+007F).
* Ensure that the help output for the json module does not exceed 80
  columns (except one long line in an example and generated lines).
* Add more tests.
(cherry picked from commit 7e90bac3cc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-11-08 10:32:44 +00:00
Miss Islington (bot)
229846e841
[3.14] Minor documentation improvements (GH-140626) (#141160)
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2025-11-06 17:19:30 +00:00
Miss Islington (bot)
47ede24d49
[3.14] Minor fixes to idle.rst and regenerate help.html (GH-140037) (#141121)
Minor fixes to `idle.rst` and regenerate `help.html` (GH-140037)
(cherry picked from commit 4e6e208be9)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-06 08:51:28 +00:00
Miss Islington (bot)
f2353d60db
[3.14] gh-140569: recommend the new REPL in the asyncio REPL docs (GH-140570) (#141115)
gh-140569: recommend the new REPL in the asyncio REPL docs (GH-140570)
(cherry picked from commit 8822166200)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-11-06 05:46:15 +00:00
Stan Ulbrych
12847bfff7
[3.14] Fix Queue.shutdown docs for condition to unblock a join (gh-137088) (#141073)
(cherry picked from commit ea06ae5b5e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2025-11-06 11:11:31 +05:30
Miss Islington (bot)
9878611f28
[3.14] gh-118516: clarify that subprocess are automatically killed if transport gets garbage collected (GH-140997) (#141110)
gh-118516: clarify that subprocess are automatically killed if transport gets garbage collected (GH-140997)
(cherry picked from commit 101c9c0a21)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-11-06 10:34:27 +05:30
Miss Islington (bot)
00087dc466
[3.14] GH-108009: Add clarification of parser and argument defaults in argparse docs (GH-124154) (#141084)
GH-108009: Add clarification of parser and argument defaults in argparse docs (GH-124154)
(cherry picked from commit 95f6e1275b)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2025-11-05 22:52:22 +00:00
Miss Islington (bot)
f35a6e14f3
[3.14] gh-76007: remove curses.__version__ doc (GH-141052) (#141076)
Co-authored-by: Zenith <me@arielle.codes>
2025-11-05 22:06:27 +00:00
Miss Islington (bot)
fa8f46412f
[3.14] gh-139313: Improve docs on XML security (GH-139460) (GH-141065)
Clarify that:
- it takes parsing for an attack
- that some doors are closed by default
- only Expat version 2.7.2 has all the fixes
- use of the bundle depends on configuration
(cherry picked from commit baa9f33897)

Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
2025-11-05 19:07:03 +00:00
Miss Islington (bot)
19ba59369e
[3.14] Docs: Fix cached calls count in factorial example (gh-140882) (gh-141031)
Co-authored-by: Clifford Gama <cliffygamy@gmail.com>
2025-11-05 12:14:12 -06:00
Miss Islington (bot)
2511fce2ef
[3.14] gh-141007: update string module source code link (GH-141008) (#141030)
gh-141007: update string module source code link (GH-141008)

In 3.14, the former string.py became `__init__.py` within a new `string` directory that also contains a new submodule file, `templatelib.py`.
(cherry picked from commit fa02422918)

Co-authored-by: alex <30386655+alexomics@users.noreply.github.com>
2025-11-05 00:11:42 +00:00
Filip Łajszczak
dc76de26e5
[3.14] gh-139434: Update selected RFC 2822 references to RFC 5322 (GH-139435) (#141025)
Update selected RFC 2822 references to RFC 5322

RFC 2822 was obsoleted by RFC 5322 in 2008. This updates references
to use the current standard in documentation, docstrings, and comments.

It preserves RFC 2822 references in legacy API components to maintain their
historical context.

RFC 822 → RFC 2822 → RFC 5322 progression is explained where relevant.

In some places specific sections of RFC are referenced where it seems helpful.

Scout rule was applied in some places and RFC mentions format was
normalized in doc strings and comments.
(cherry picked from commit ce1bb85d28)
2025-11-04 16:23:16 -05:00
Miss Islington (bot)
d82d340096
[3.14] Docs: Fix typo in email.headerregistry.rst (GH-140965) (#141020)
Docs: Fix typo in `email.headerregistry.rst` (GH-140965)

Fix missing 'Header' suffix on header class name in `email.headerregistry.rst`
(cherry picked from commit 97d8dda980)

Co-authored-by: Guo Ci <zguoci@gmail.com>
2025-11-04 19:35:20 +00:00
Miss Islington (bot)
4358b8417f
[3.14] gh-134817: Restore accidentally deleted line in documentation. (GH-141013) (GH-141016)
(cherry picked from commit 66c86c6563)
2025-11-04 18:40:12 +00:00
Miss Islington (bot)
52f18790eb
[3.14] Document that returning sys.monitoring.DISABLE in response to a global event raises ValueError (GH-140726) (GH-141014)
Document that returning `sys.monitoring.DISABLE` in response to a global event raises `ValueError` (GH-140726)
(cherry picked from commit 8a7dbb7a68)

Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-11-04 18:34:04 +00:00
AN Long
c3f9702f04
[3.14] gh-140826 Remove the wrong documents about comparison behavior on winreg.HKEYType (GH-140999) 2025-11-04 16:14:44 +00:00
Miss Islington (bot)
5b88a6533c
[3.14] Fix minor typo: 'web site' -> 'website' (GH-140561) (GH-140976)
(cherry picked from commit 08115d241a)

Co-authored-by: commitWithTisha <tishaa1010@gmail.com>
2025-11-04 14:11:08 +01:00
Miss Islington (bot)
a9c964f368
[3.14] Docs: Fix a typo in idle.rst (Chitespace -> Whitespace) (GH-140946) (#140953)
Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
2025-11-04 10:02:10 +02:00
Miss Islington (bot)
fa9bb9a092
[3.14] gh-140693: Improve argparse documentation about controlling color (GH-140737) (#140932)
gh-140693: Improve `argparse` documentation about controlling color (GH-140737)
(cherry picked from commit 31de83d5e2)

Co-authored-by: Krishna Chaitanya <141550576+XChaitanyaX@users.noreply.github.com>
2025-11-02 21:08:47 -08:00
Bénédikt Tran
bf2865f80f
[3.14] gh-90949: add Expat API to prevent XML deadly allocations (CVE-2025-59375) (GH-139234) (#139359)
* [3.14] gh-90949: add Expat API to prevent XML deadly allocations (CVE-2025-59375) (GH-139234)

Expose the XML Expat 2.7.2 mitigation APIs to disallow use of
disproportional amounts of dynamic memory from within an Expat
parser (see CVE-2025-59375 for instance).

The exposed APIs are available on Expat parsers, that is,
parsers created by `xml.parsers.expat.ParserCreate()`, as:

- `parser.SetAllocTrackerActivationThreshold(threshold)`, and
- `parser.SetAllocTrackerMaximumAmplification(max_factor)`.

(cherry picked from commit f04bea44c3)
(cherry picked from commit 68a1778b77)
2025-11-02 09:33:36 +00:00
Miss Islington (bot)
89818a5939
[3.14] gh-137836: Support more RAWTEXT and PLAINTEXT elements in HTMLParser (GH-137837) (GH-140841)
* the "plaintext" element
* the RAWTEXT elements "xmp", "iframe", "noembed" and "noframes"
* optionally RAWTEXT (if scripting=True) element "noscript"
(cherry picked from commit a17c57eee5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-31 16:13:13 +00:00
Miss Islington (bot)
6bb49ae650
[3.14] gh-138162: Fix logging.LoggerAdapter with merge_extra=True and without the extra argument (GH-140511) (GH-140784)
(cherry picked from commit 327dbbedff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-10-30 11:19:27 +00:00
Miss Islington (bot)
596111546d
[3.14] gh-124694: Add versionadded note to InterpreterPoolExecutor (GH-140605)
(cherry picked from commit 421a475c87)

Co-authored-by: Zachary Ware <zach@python.org>
2025-10-25 23:37:24 +00:00
Miss Islington (bot)
4fcc102524
[3.14] gh-140463: Fix typo in xmlrpc.client documentation (GH-140552) (#140568)
gh-140463: Fix typo in xmlrpc.client documentation (GH-140552)

Fix typo in xmlrpc.client documentation
(cherry picked from commit 44b6eead21)

Co-authored-by: Miša Jakovljević <misajakovljevic3@gmail.com>
2025-10-24 20:53:24 +00:00
Miss Islington (bot)
564bb00b27
[3.14] gh-138774: use value to ast.unparse code when str is None in ast.Interpolation (GH-139415) (#140503)
gh-138774: use `value` to `ast.unparse` code when `str` is `None` in `ast.Interpolation` (GH-139415)
(cherry picked from commit 4d0849426f)

Co-authored-by: George Ogden <38294960+George-Ogden@users.noreply.github.com>
2025-10-23 14:39:02 +00:00
Emma Smith
a490d671fa
[3.14] zlib.rst: Link to constants and deduplicate text (GH-140115) (GH-140349)
* Link to compression setting constants from compression functions
* De-duplicate descriptions of the constants
(cherry picked from commit 091e8513bb)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-10-21 14:44:47 -07:00
Miss Islington (bot)
c7fda9b3d1
[3.14] gh-138764: annotationlib: Make call_annotate_function fallback to using VALUE annotations if both the requested format and VALUE_WITH_FAKE_GLOBALS are not implemented (GH-138803) (#140426)
gh-138764: annotationlib: Make `call_annotate_function` fallback to using `VALUE` annotations if both the requested format and `VALUE_WITH_FAKE_GLOBALS` are not implemented (GH-138803)
(cherry picked from commit 95c257e2e6)

Co-authored-by: David Ellis <ducksual@gmail.com>
2025-10-21 16:22:29 +00:00
Miss Islington (bot)
ba6d956eb9
[3.14] [Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() (GH-139565) (#140386)
[Docs] Add missing note about Required/NotRequired/ReadOnly in get_type_hints() (GH-139565)
(cherry picked from commit a752f58d6b)

Co-authored-by: Sam Bull <git@sambull.org>
2025-10-20 13:23:19 -07:00
Miss Islington (bot)
357284edb5
[3.14] gh-101100: Fix sphinx warnings in library/resource.rst (GH-140023) (#140352)
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
2025-10-20 07:21:31 +00:00
Miss Islington (bot)
2699643d71
[3.14] docs: be clearer that glob results are unordered (GH-140184) (#140339)
(cherry picked from commit ed672f7a8a)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2025-10-20 07:31:05 +03:00
Miss Islington (bot)
a4b977cfe2
[3.14] gh-138997: Remove false justify fill option from Tkinter docs (GH-139023) (#140319)
gh-138997: Remove false justify `fill` option from Tkinter docs (GH-139023)
(cherry picked from commit 115a04b802)

Co-authored-by: Marat Khagazheev <marathagazeev@gmail.com>
Co-authored-by: marat <khagazheev@artlebedev.ru>
2025-10-19 03:52:59 +00:00
Miss Islington (bot)
7be317fea6
[3.14] gh-128571: Document UTF-16/32 native byte order (GH-139974) (#140309)
Closes GH-128571
(cherry picked from commit 920de7ccdc)

Co-authored-by: Parham MohammadAlizadeh <prhmma@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-18 18:59:37 +00:00
Miss Islington (bot)
c70f409da0
[3.14] gh-140241: Fix documentation for the registry parameter of warnings.warn_explicit() (GH-140242) (GH-140292)
(cherry picked from commit 78e1d65a4d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-10-18 11:02:09 +00:00
Tan Long
12903c098b
[3.14] Remove duplicate words in the documentation (GH-140221) (GH-140225)
(cherry picked from commit 2ebd0cdb16)
2025-10-16 20:10:15 +02:00
Miss Islington (bot)
48b60495b7
[3.14] gh-140078: fix typo in tkinter docs (GH-140081) (#140217)
gh-140078: fix typo in tkinter docs (GH-140081)

Remove extraneous word.
(cherry picked from commit 5f357f3b0d)

Co-authored-by: wangxiaolei <fatelei@gmail.com>
2025-10-16 15:22:57 +00:00
Miss Islington (bot)
6a467d3eda
[3.14] gh-106318: Add examples for str.istitle() (GH-140046) (#140113)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2025-10-14 14:27:37 +00:00
Miss Islington (bot)
af9b8970ef
[3.14] gh-82575: Adjust time.get_clock_info *adjustable* attribute doc (GH-135920) (#140097)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-10-14 08:36:39 +00:00