Commit graph

28964 commits

Author SHA1 Message Date
Russell Keith-Magee
07a763624d
[3.13] gh-135966: Modify iOS testbed to make app_packages a site directory (GH-135967) (#136013)
The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.
(cherry picked from commit b38810bab7)
2025-06-27 13:37:05 +08: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)
a7246323a2
[3.13] gh-135110: Fix misleading generator.close() documentation (GH-135152) (GH-135986)
gh-135110: Fix misleading `generator.close()` documentation (GH-135152)

The documentation incorrectly stated that generator.close() 'raises' a
GeneratorExit exception. This was misleading because the method doesn't
raise the exception to the caller - it sends the exception internally
to the generator and returns None.
(cherry picked from commit 0d76dccc3b)

Co-authored-by: Connor Denihan <188690869+cdenihan@users.noreply.github.com>
2025-06-26 13:34:11 +00:00
Miss Islington (bot)
3789d8d7d7
[3.13] gh-135965: Delete duplicate word in isolating-extensions howto (GH-135964) (#135978)
gh-135965: Delete duplicate word in isolating-extensions howto (GH-135964)

Change use use to use.
(cherry picked from commit ffb2a02f98)

Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
2025-06-26 11:47:47 +00: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)
86c050a5ca
[3.13] Docs: Add cross-reference for positional_item in the calls productionlist (GH-129977) (GH-135941)
Docs: Add cross-reference for `positional_item` in the `calls` productionlist (GH-129977)

Add missing hyperlink for `positional_item`
(cherry picked from commit d2154912b3)

Co-authored-by: HarryLHW <123lhw321@gmail.com>
2025-06-25 14:31:25 +00:00
Miss Islington (bot)
c344aad655
[3.13] gh-135755: Docs: C API: Document missing PyFunction_GET* macros (GH-135762) (GH-135917)
(cherry picked from commit ca87a47b3d)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-06-25 08:51:58 +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)
c6e26ef881
[3.13] Docs: Document PyExceptionClass functions in the C API (GH-135697) (GH-135758)
Docs: Document `PyExceptionClass` functions in the C API (GH-135697)

* Docs: Document `PyExceptionClass_Name`

`PyExceptionClass_Name` is an undocumented function in the limited API.

* Document `PyExceptionClass_Check`
(cherry picked from commit 59963e866a)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-06-20 14:03:10 +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)
2537188f95
[3.13] Docs: Add missing lines between regex and text (GH-134505) (GH-135719)
Docs: Add missing lines between regex and text (GH-134505)
(cherry picked from commit 754190287e)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2025-06-19 15:07:40 +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)
773ca09caa
[3.13] Document that PyType_GetModuleByDef returns a borrowed reference (GH-135666) (GH-135702)
(cherry picked from commit 140731ff67)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-06-19 09:18:00 +02: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)
be1ca79f33
[3.13] Use replacements to update versions in "Using Python on macOS" (GH-130400) (#135587)
(cherry picked from commit 21bac3aecd)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-06-16 18:17:21 -04: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)
a80d47ecb1
[3.13] gh-135171: Update documentation for the generator expression (GH-135351) (GH-135525)
gh-135171: Update documentation for the generator expression (GH-135351)

* gh-135171: Update documentation for the generator expression

Document that the iterator for the leftmost "for" clause is created
immediately.

* Update Doc/reference/expressions.rst



---------
(cherry picked from commit 8979d3afe3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Brian Skinn <brian.skinn@gmail.com>
2025-06-15 00:38:52 +00: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)
d24d925ab7
[3.13] gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (GH-135337) (#135395)
gh-133264: Correct documentation of how Py_Main and Py_RunMain handle SystemExit (GH-135337)
(cherry picked from commit b706ff003c)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2025-06-11 17:32:42 +02: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)
0a8fbb3677
[3.13] Update tutorial for new "Copy" button (GH-135007) (#135271)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2025-06-08 17:13:34 +00: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
Miss Islington (bot)
b250035384
[3.13] Docs: Update PyExc_* tables in the c-api documentation (GH-131640) (GH-135221)
Docs: Update `PyExc_*` tables in the c-api documentation (GH-131640)

Add `PyExc_BaseExceptionGroup` and `PyExc_EncodingWarning`
(cherry picked from commit f00512db20)

Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-06-06 15:57:52 +00:00
Miss Islington (bot)
705fa8a23f
[3.13] feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (GH-135181) (#135211)
feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (GH-135181)

Giving the right example incitates the tutorial readers to do the same in the future.
(cherry picked from commit 343182853f)

Co-authored-by: Jean-Louis GUENEGO <jlguenego@gmail.com>
2025-06-06 13:23:07 +00:00
Steve Dower
728a881321
[3.13] gh-135151: Fix incorrect packaging of pyconfig.h in Windows installer (GH-135180) 2025-06-05 23:03:38 +01:00
Malcolm Smith
fd39aa3a7f
[3.13] gh-131531: android.py enhancements to support cibuildwheel (GH-132870) (#135164)
Modifies the environment handling and execution arguments of the Android management
script to support the compilation of third-party binaries, and the use of the testbed to
invoke third-party test code.
(cherry picked from commit 2e1544fd2b)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-06-05 17:23:46 +08:00
Miss Islington (bot)
d446dbc68b
[3.13] gh-134160: Improve multi-phase init note on isolation & subinterpreters (GH-134775) (GH-134983)
(cherry picked from commit eb145fabbd)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-06-04 14:50:54 +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)
e69ecfee5e
[3.13] gh-134835: Remove outdated list from howto/urllib2.rst (GH-134844) (#134985)
gh-134835: Remove outdated list from `howto/urllib2.rst` (GH-134844)

🫖
(cherry picked from commit 3704171415)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-05-31 17:54:38 +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)
7fdc829bc2
Doc: remove unnecessary section header (GH-134917)
(cherry picked from commit b367e27af9)
2025-05-30 18:14:00 +09: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)
a9ba2ecae5
[3.13] gh-133260: Remove claim that PyUnicode_InternFromString immortalizes (GH-134213) (GH-134884)
(cherry picked from commit 4109a9c6b3)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-05-29 13:44:00 +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)
9cd608f999
[3.13] GH-134848: Use a set to store `AuditEvents.sources` (GH-134849) (#134854)
GH-134848: Use a set to store ``AuditEvents.sources`` (GH-134849)
(cherry picked from commit b265a7ddeb)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-28 16:36:59 +00:00