Commit graph

13691 commits

Author SHA1 Message Date
Rafael Fontenelle
bc3390c00a
[3.13] Docs: Move "or" outside monospace syntax in tarfile.rst (GH-136263) (GH-136348)
Docs: Move "or" outside monospace syntax in `tarfile.rst` (GH-136263)

(cherry picked from commit ade1988094)
2025-07-06 21:24:51 -04:00
Miss Islington (bot)
52180bfb37
[3.13] gh-109070: Document that get_context in multiprocessing have side effect (GH-136341) (GH-136344)
gh-109070: Document that get_context in multiprocessing have side effect (GH-136341)

Document that get_context in multiprocessing have side effect
(cherry picked from commit 77a8bd29da)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2025-07-06 18:32:15 +00:00
Miss Islington (bot)
e7a2d2ae2c
[3.13] gh-101100: Fix references in http.cookiejar docs (GH-136238) (GH-136317)
gh-101100: Fix references in `http.cookiejar` docs (GH-136238)
(cherry picked from commit f0c7344a8f)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
2025-07-05 13:35:52 +00:00
Miss Islington (bot)
0c439de010
[3.13] gh-136169: Update parameter name in fractions.from_float method (GH-136172) (#136175)
gh-136169: Update parameter name in fractions.from_float method (GH-136172)

Update parameter name in fractions.from_float method
(cherry picked from commit 9c0cb5beb8)

Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.com>
2025-07-01 13:30:49 +00:00
Miss Islington (bot)
b415d1c18e
[3.13] gh-63207: Update time.time documentation after GH-116822 (GH-136068) (#136139)
gh-63207: Update `time.time` documentation after GH-116822 (GH-136068)
(cherry picked from commit 486587da42)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-06-30 16:16:27 +00:00
Miss Islington (bot)
38c7b0efb8
[3.13] gh-136122: Fix video link for math.tau documentation (GH-136129) (#136132)
Co-authored-by: sedram <54665381+sedram@users.noreply.github.com>
2025-06-30 14:49:35 +00:00
Miss Islington (bot)
ef4a70b63f
[3.13] gh-48181: Document codecs.charmap_build (GH-135997) (#136124)
gh-48181: Document `codecs.charmap_build` (GH-135997)
(cherry picked from commit 2bdd50309f)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-06-30 15:52:53 +02:00
Miss Islington (bot)
ad5f88eafa
[3.13] gh-131885: Update documented signatures for csv.{writer,reader} (GH-136085) (GH-136121)
gh-131885: Update documented signatures for `csv.{writer,reader}` (GH-136085)
(cherry picked from commit 75f40595e5)

Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
2025-06-30 13:38:49 +00:00
Miss Islington (bot)
008c8cafed
[3.13] gh-132813: Fix the csv documentation for quoting and escaping (GH-133209) (#136114)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-30 07:48:11 +00:00
Brian Schubert
cee66dd2a0
[3.13] Docs: Fix duplicate word typos (GH-135958) (GH-136008)
(cherry picked from commit 34ce1920ca)
2025-06-26 20:13:46 -04:00
Miss Islington (bot)
3be3c496df
[3.13] gh-91555: add warning to docs about possibility of deadlock/infinite recursion (GH-135954) (GH-135989)
(cherry picked from commit a4625d597f)
2025-06-26 15:26:11 +01:00
Miss Islington (bot)
335d7da5db
[3.13] Docs: Fix indentation in slice class of functions.rst (GH-134393) (GH-135949)
Docs: Fix indentation in `slice` class of `functions.rst` (GH-134393)

Paragraph should not be under `slice.step`. It applies to the whole class.

(cherry picked from commit 6227662ff3)

Co-authored-by: Rob Reynolds <13379223+reynoldsnlp@users.noreply.github.com>
2025-06-25 17:45:57 +00:00
Miss Islington (bot)
980d6cc0c8
[3.13] Docs: Use arguments to replace args in argparse.rst (GH-135510) (GH-135867)
Docs: Use `arguments` to replace `args` in `argparse.rst` (GH-135510)
(cherry picked from commit caad163b69)

Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
2025-06-23 22:59:17 +00:00
Miss Islington (bot)
6e0ad71a29
[3.13] gh-135815: skip netrc security checks if os.getuid is missing (GH-135816) (#135826)
gh-135815: skip `netrc` security checks if `os.getuid` is missing (GH-135816)
(cherry picked from commit b57b619e34)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-22 20:12:20 +00:00
Miss Islington (bot)
4eab9da960
[3.13] gh-135756: Fix nonexistent parameter in tkinter docs (GH-135770) (#135777)
gh-135756: Fix nonexistent parameter in tkinter docs (GH-135770)

Remove nonexistent color parameter from tkinter.commondialog.Dialog.show() method documentation.
(cherry picked from commit 4ddf505d99)

Co-authored-by: Marcell Perger <102254594+MarcellPerger1@users.noreply.github.com>
2025-06-20 23:35:39 +00:00
Miss Islington (bot)
a8c3af080a
[3.13] gh-135273: Unify ZoneInfo.from_file signatures (GH-135274) (#135715)
gh-135273: Unify `ZoneInfo.from_file` signatures (GH-135274)

Align `ZoneInfo.from_file` pure-Python signature with Argument Clinic signature.
(cherry picked from commit 7cc8949692)

Co-authored-by: Andrii Hrimov <andrew.hrimov@gmail.com>
2025-06-19 15:10:54 +00:00
Miss Islington (bot)
af48f39a44
[3.13] Docs: Emphasize parameter name in pkgutil.iter_importers (GH-135597) (GH-135711)
Docs: Emphasize parameter name in `pkgutil.iter_importers` (GH-135597)
(cherry picked from commit ff639af8ee)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2025-06-19 13:04:46 +00:00
Miss Islington (bot)
7e783e5574
gh-134538: Add link to shutil.rmtree example in function docs (GH-135540)
(cherry picked from commit e9b647dd30)

Co-authored-by: alexey semenyuk <alexsemenyuk88@gmail.com>
2025-06-18 21:17:42 +00:00
Miss Islington (bot)
dfe0e30c80
[3.13] Docs: Fix markups for emphasis (GH-135598) (GH-135686)
Docs: Fix markups for emphasis (GH-135598)

The word emphasis character `_` is not supported as sphinx markup, so changed to `*`.
(cherry picked from commit 46c60e0d0b)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-06-18 17:44:43 +00:00
Miss Islington (bot)
3bd2818664
[3.13] gh-67022: Document bytes/str inconsistency in email.header.decode_header() and suggest email.headerregistry.HeaderRegistry as a sane alternative (GH-92900) (#135549)
gh-67022: Document bytes/str inconsistency in email.header.decode_header() and suggest email.headerregistry.HeaderRegistry as a sane alternative (GH-92900)

* gh-67022: Document bytes/str inconsistency in email.header.decode_header()

This function's possible return types have been surprising and error-prone
for the entirety of its Python 3.x history. It can return either:

1. `typing.List[typing.Tuple[bytes, typing.Optional[str]]]` of length >1
2. or `typing.List[typing.Tuple[str, None]]`, of length exactly 1

This means that any user of this function must be prepared to accept either
`bytes` or `str` for the first member of the 2-tuples it returns, which is a
very surprising behavior in Python 3.x, particularly given that the second
member of the tuple is supposed to represent the charset/encoding of the
first member.

This patch documents the behavior of this function, and adds test cases
to demonstrate it.

As discussed in bpo-22833, this cannot be changed in a backwards-compatible
way, and some users of this function depend precisely on the existing
behavior.

Add warnings about obsolescence of 'email.header.decode_header' and 'email.header.make_header' functions.

Recommend use of `email.headerregistry.HeaderRegistry` instead, as suggested
in https://github.com/python/cpython/pull/92900#discussion_r1112472177
(cherry picked from commit 60181f4ed0)

Co-authored-by: Dan Lenski <dlenski@gmail.com>
2025-06-15 16:02:43 -04:00
Miss Islington (bot)
bea67a1d60
[3.13] doc: Remove what was essentially duplicate wording. (GH-135431) (GH-135441)
(cherry picked from commit f273fd77d7)
2025-06-13 17:53:52 +01:00
Miss Islington (bot)
6b9672c2bd
[3.13] gh-106318: Add example for str.expandtabs() (GH-134525) (#135477)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
2025-06-13 15:50:53 +00:00
Miss Islington (bot)
c260ed15d1
[3.13] gh-106318: Add example for str.endswith() (GH-134523) (#135460)
gh-106318: Add example for `str.endswith()` (GH-134523)
(cherry picked from commit eed827ed09)

Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-13 15:13:59 +03:00
Miss Islington (bot)
db408a484c
[3.13] gh-106318: Add example for str.encode() (GH-134520) (#135458)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-13 14:46:14 +03:00
Miss Islington (bot)
9a10b734f1
[3.13] Fix presentation of dataclasses' unsafe_hash default value (GH-116532) (#135417)
Fix presentation of dataclasses' `unsafe_hash` default value (GH-116532)

(cherry picked from commit 71f5fafdfb)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-06-12 01:37:30 +00:00
Miss Islington (bot)
8c28241f0d
[3.13] Use f-strings in csv docs example (GH-135245) (#135286)
Use f-strings in csv docs example (GH-135245)
(cherry picked from commit 2677dd017a)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2025-06-09 06:41:03 +00:00
Miss Islington (bot)
b13720ee22
[3.13] gh-135263: Fix typo in token.NAME documentation (GH-135275) (#135281)
gh-135263: Fix typo in token.NAME documentation (GH-135275)
(cherry picked from commit 8d17a412da)

Co-authored-by: Vladyslav Lazoryk <80263725+lazorikv@users.noreply.github.com>
2025-06-08 17:55:12 -04:00
Miss Islington (bot)
47a828e5d3
[3.13] gh-134976: document the exception type that can be raised by s[i] (GH-134977) (#135259)
gh-134976: document the exception type that can be raised by `s[i]` (GH-134977)
(cherry picked from commit 158e5162bf)

Co-authored-by: Yongzi Li <204532581+Yzi-Li@users.noreply.github.com>
2025-06-08 14:37:55 +02:00
Thomas Wouters
8a526ec7cb Python 3.13.4 2025-06-03 17:34:24 +02:00
T. Wouters
aa9eb5f757
[3.13] gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') (GH-135037) (GH-135064)
Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.
(cherry picked from commit 3612d8f517)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Signed-off-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-03 15:59:54 +02:00
Miss Islington (bot)
7e2ebdbe9c
[3.13] gh-74232: Add a note about roundtrip of non-float numerics in CSV (GH-134963) (GH-135049)
(cherry picked from commit e814f43f2c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-06-02 20:39:01 +00:00
Bénédikt Tran
11f7270e8f
[3.13] gh-122153: indicate that Windows does not support socket.{send,recv}_fds (GH-134960) (#135017)
This amends commit e3b6ff19aa.
(cherry picked from commit 128195e12e)

Co-authored-by: GalaxySnail <me@glxys.nl>
2025-06-02 10:44:39 +00:00
Miss Islington (bot)
0446628697
[3.13] gh-133503: clarify compileall -s/-p docs (GH-134756) (#134996)
gh-133503: clarify `compileall -s/-p` docs (GH-134756)
(cherry picked from commit fe6f8a3619)

Co-authored-by: Rihaan Meher <meherrihaan@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-06-01 08:27:26 +00:00
Miss Islington (bot)
366a7902a0
[3.13] gh-134918: Fix and improve doctest's documentation (GH-134919) (GH-134967)
(cherry picked from commit 3c66e59766)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-31 09:09:07 +00:00
Miss Islington (bot)
19b31d10c2
[3.13] GH-106235: Clarify parse_known_args documentation by removing "remaining" (GH-126921) (#134914)
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:22 -07:00
Miss Islington (bot)
7c5a1ea9f6
[3.13] gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-134925) (GH-134941)
Optional None values are always omitted.
(cherry picked from commit 1a89991d23)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-30 19:30:26 +03:00
Miss Islington (bot)
f4b8cd5510
[3.13] ast docs: Fix description of ast.Constant (GH-134741) (#134912)
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:19:04 +00:00
Miss Islington (bot)
aebb4eab45
[3.13] gh-69011: : clarify & deduplicate ctypes.create_*_buffer docs (GH-132858) (GH-134882)
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:22:33 +00:00
Miss Islington (bot)
8e60e6ca84
[3.13] gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-134818) (GH-134824)
(cherry picked from commit 7be5916f6d)
2025-05-28 12:32:57 +00:00
Miss Islington (bot)
956490b8a5
[3.13] Update outdated statement from math about C standard (GH-134621) (#134826)
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:24 +00:00
Miss Islington (bot)
73e432896b
[3.13] gh-134789: Document del s[i] operation for mutable sequences (GH-134804) (#134809)
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:54:16 +00:00
Miss Islington (bot)
a5f281f4e4
[3.13] gh-134664: document cleanup_socket parameter in asyncio.start_unix_server (GH-134750) (#134780)
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:29 +05:30
Miss Islington (bot)
b31d46e880
[3.13] gh-134559: Add versionadded for `object.__replace__()` (GH-134672) (#134700)
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:53 +00:00
Miss Islington (bot)
44d184984d
[3.13] gh-80334: fix multiprocessing.freeze_support for other spawn platforms (GH-134462) (#134620)
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:13:37 +00:00
Miss Islington (bot)
1dbb644a5b
[3.13] gh-106318: Add example for str.count() (GH-134519) (#134573)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
2025-05-23 09:53:19 +00:00
Miss Islington (bot)
5b203f511b
[3.13] gh-106318: Add example for str.center() (GH-134518) (#134572)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
2025-05-23 09:50:17 +00:00
Miss Islington (bot)
b212653049
[3.13] Avoid __file__ in hashlib example (GH-134540) (#134550)
Avoid `__file__` in `hashlib` example (GH-134540)
(cherry picked from commit 9b292ff022)

Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
2025-05-22 21:38:04 +00:00
Gregory P. Smith
5ecc39e9f4
[3.13] gh-80050: Update BufferedReader.read docs around non-blocking (GH-130653) (#134445)
(cherry picked from commit e1f891414b)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 17:07:03 +00:00
Miss Islington (bot)
fcebf5aebf
[3.13] gh-110631: Fix some incorrect indents in the documentation (GH-129312) (#134420)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-21 14:00:13 +00:00
Miss Islington (bot)
7df6749219
[3.13] gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372) (#134375)
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:09 -07:00