Commit graph

123841 commits

Author SHA1 Message Date
Miss Islington (bot)
506c76f1bd
[3.13] gh-129502: Fix handling errors in ctypes callbacks (GH-129504) (#129517)
gh-129502: Fix handling errors in ctypes callbacks (GH-129504)

Unlikely errors in preparing arguments for ctypes callback are now
handled in the same way as errors raised in the callback of in converting
the result of the callback -- using sys.unraisablehook() instead of
sys.excepthook() and not setting sys.last_exc and other variables.
(cherry picked from commit 9d63ae5fe5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-02-04 00:05:51 +00:00
Miss Islington (bot)
646bd7958e
[3.13] gh-128696: Add arm64 to the get_platform return val description (GH-128701) (#128774)
gh-128696: Add arm64 to the get_platform return val description (GH-128701)
(cherry picked from commit 553cdc6d68)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-02-03 23:56:23 +00:00
Miss Islington (bot)
de27372234
[3.13] gh-129345: null check for indent syslogmodule (GH-129348) (#129442)
gh-129345: null check for indent syslogmodule (GH-129348)
(cherry picked from commit 25cf79a082)

Co-authored-by: Burkov Egor <xwooffie@gmail.com>
2025-02-04 00:37:24 +01:00
Miss Islington (bot)
9120330354
[3.13] gh-128078: Use PyErr_SetRaisedException in _PyGen_SetStopIterationValue (GH-128287) (#128789)
gh-128078: Use `PyErr_SetRaisedException` in `_PyGen_SetStopIterationValue` (GH-128287)
(cherry picked from commit 402b91da87)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-02-04 00:34:02 +01:00
Miss Islington (bot)
186165e509
[3.13] gh-101944: Clarify PyModule_AddObjectRef() documentation (GH-129433) (#129612)
gh-101944: Clarify PyModule_AddObjectRef() documentation (GH-129433)
(cherry picked from commit 04264a286e)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-02-03 12:02:00 +00:00
Miss Islington (bot)
85e162087f
[3.13] gh-129407: Clarify that a SystemError isn't always CPython's fault (GH-129410) (#129610)
gh-129407: Clarify that a `SystemError` isn't always CPython's fault (GH-129410)
(cherry picked from commit 39b754a359)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-03 11:52:29 +00:00
Miss Islington (bot)
9862800a71
[3.13] gh-126609: Allow translating the `availability` directive (GH-129549) (#129584)
gh-126609: Allow translating the ``availability`` directive (GH-129549)
(cherry picked from commit 0612a89ffc)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-02-03 08:28:11 +00:00
Miss Islington (bot)
b13b76f98a
[3.13] gh-127975: Avoid reusing quote types in ast.unparse if not needed (GH-127980) (#129600)
gh-127975: Avoid reusing quote types in ast.unparse if not needed (GH-127980)
(cherry picked from commit 8df5193d37)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2025-02-03 00:38:44 +00:00
Miss Islington (bot)
d75e9a0954
[3.13] gh-105875: amend sqlite3 docstring wrt. SQLite requirement (GH-129599) (#129602)
(cherry picked from commit ecd2f84555)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-02-02 23:26:38 +00:00
Jason R. Coombs
6aa09a5898
[3.13] gh-127096: Do not recreate unnamed section on every read in ConfigParser (GH-127228) (#129593)
* Do not recreate unnamed section on every read in ConfigParser

* Remove duplicate section creation code
(cherry picked from commit 914c232e93)

Co-authored-by: Andrey Efremov <duxus@yandex.ru>
2025-02-02 18:53:23 +00:00
Collin Funk
65f3432ac3
[3.13] gh-129539: Include sysexits.h before checking EX_OK (#129590)
Previously, the macro would be redefined when the header was included.
2025-02-02 19:37:32 +01:00
Adam Turner
63cae73797
[3.13] GH-121970: Extract `misc_news` into a new extension (GH-129577) (#129586)
(cherry picked from commit ae4788809d)
2025-02-02 16:24:48 +00:00
Miss Islington (bot)
e9febe51af
[3.13] gh-115514: Fix incomplete writes after close while using ssl in asyncio(GH-128037) (#129581)
gh-115514: Fix incomplete writes after close while using ssl in asyncio(GH-128037)

(cherry picked from commit 4e38eeafe2)

Co-authored-by: Vojtěch Boček <vbocek@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-02-02 16:12:12 +00:00
Miss Islington (bot)
90e526ae67
[3.13] gh-105704: Disallow square brackets ([ and ]) in domain names for parsed URLs (GH-129418) (GH-129526)
gh-105704: Disallow square brackets (`[` and `]`) in domain names for parsed URLs (GH-129418)

* gh-105704: Disallow square brackets ( and ) in domain names for parsed URLs

* Use Sphinx references



* Add mismatched bracket test cases, fix news format

* Add more test coverage for ports

---------

(cherry picked from commit d89a5f6a6e)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-02-02 00:12:51 -08:00
Miss Islington (bot)
1459d08b56
[3.13] gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561) (#129564)
gh-119461: Restore the testSocket VSOCK skipUnless removed by PR GH-119465 (GH-129561)

Restore the skipUnless removed by GH-119465.

This test can only pass on virtual machines, not actual machines.

actual machines see:

```
    self.cli.connect((cid, VSOCKPORT))
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
OSError: [Errno 19] No such device
```

Reproduced on (Linux) Ubuntu 24.04.1 running 6.8.0-52-generic.
(cherry picked from commit e1006ce1de)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-02-02 05:11:30 +00:00
Miss Islington (bot)
2d60dcfda9
[3.13] gh-126022: Replace TeX quotation marks with `"` in Doc/license.rst (GH-129535) (#129551)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-02-01 16:57:58 +00:00
Miss Islington (bot)
0468ea1230
[3.13] gh-126108: Fix potential null pointer dereference in PySys_AddWarnOptionUnicode (GH-126118) (#129520)
gh-126108: Fix potential null pointer dereference in `PySys_AddWarnOptionUnicode` (GH-126118)
(cherry picked from commit fad36bf382)

Co-authored-by: Valery Fedorenko <federicovalenso@gmail.com>
2025-01-31 20:32:44 +05:30
Victor Stinner
9a59a51733
[3.13] gh-111495: Add PyFile tests (#129449) (#129477)
gh-111495: Add PyFile tests (#129449)

Add tests for the following functions in test_capi.test_file:

* PyFile_FromFd()
* PyFile_GetLine()
* PyFile_NewStdPrinter()
* PyFile_WriteObject()
* PyFile_WriteString()
* PyObject_AsFileDescriptor()

Add Modules/_testlimitedcapi/file.c file.

Remove test_embed.StdPrinterTests which became redundant.

(cherry picked from commit 4ca9fc08f8)
2025-01-30 20:29:27 +01:00
Irit Katriel
a853e2f076
[3.13] gh-128799: Add frame of except* to traceback when wrapping a naked exception (#128971) (#129299) 2025-01-30 12:20:13 +00:00
Miss Islington (bot)
fcb265671c
[3.13] gh-129438: Update `--enable-experimental-jit` section with install requirements (GH-129450) (#129472)
gh-129438: Update ``--enable-experimental-jit`` section with install requirements (GH-129450)

Add a note to the `JIT` docs that building CPython with `JIT` requires Python 3.11 or newer.

(cherry picked from commit 652f66ac38)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2025-01-30 10:22:05 +00:00
Miss Islington (bot)
ad4a141a6b
[3.13] gh-129403: Fix ValueError messages in asyncio.Barrier and threading.Barrier (GH-129419) (#129468)
gh-129403: Fix `ValueError` messages in `asyncio.Barrier` and `threading.Barrier` (GH-129419)
(cherry picked from commit bcb25d60b1)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-30 09:33:30 +00:00
Miss Islington (bot)
25a3f3ac46
[3.13] remove type annotations from multiprocessing. (GH-129381) (#129470)
remove type annotations from multiprocessing. (GH-129381)

* remove type annotations from multiprocessing.

One of them was technically invalid per typing specs... but since we're not
checking these in the stdlib today lets elide them.

https://discuss.python.org/t/static-type-annotations-in-cpython/65068/13

* use the actual comment style annotation format



---------
(cherry picked from commit 71aecc284e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
2025-01-30 08:54:15 +00:00
Miss Islington (bot)
8b4a0d641c
[3.13] gh-125522: Fix bare except in test_uuid (GH-129018) (#129455)
gh-125522: Fix bare except in `test_uuid` (GH-129018)
(cherry picked from commit a1a4e9f39a)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-29 21:23:10 +00:00
Miss Islington (bot)
f502c8f6a6
[3.13] gh-118761: Improve import time of subprocess (GH-129427) (#129447)
gh-118761: Improve import time of `subprocess` (GH-129427)

* subprocess: lazy import signal and locale to improve module import time
(cherry picked from commit 49f24650e4)

Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
2025-01-29 16:55:24 +00:00
Miss Islington (bot)
1883667c31
[3.13] CI: Change job name to 'build arm64' on Windows (GH-129434) (#129439) 2025-01-29 13:40:04 +00:00
Miss Islington (bot)
48b87d14e8
[3.13] gh-129409: Fix Integer overflow - SEGV while writing data more than 2GB in CSV file (GH-129413) (#129436)
gh-129409: Fix Integer overflow -  SEGV while writing data more than 2GB in CSV file (GH-129413)
(cherry picked from commit 97b0ef05d9)

Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్  రెడ్డి) <thatiparthysreenivas@gmail.com>
2025-01-29 11:39:16 +00:00
Miss Islington (bot)
8597be4613
[3.13] gh-129408: http: Fix typo 'RFF' to RFC' in docstring (GH-129411) (#129414)
gh-129408: http: Fix typo 'RFF' to RFC' in documentation (GH-129411)
(cherry picked from commit 7dd0a7e52e)

Co-authored-by: Samuel GIFFARD <samuel@giffard.co>
2025-01-28 18:48:51 +00:00
Miss Islington (bot)
bf6c256a64
[3.13] gh-112064: Fix incorrect handling of negative read sizes in HTTPResponse.read() (GH-128270) (#129395)
gh-112064: Fix incorrect handling of negative read sizes in `HTTPResponse.read()` (GH-128270)

The parameter `amt` of `HTTPResponse.read()`, which could be a negative integer,
has not been handled before and led to waiting for the connection to close
for `keep-alive connections`. Now, this has been fixed, and passing negative values
to `HTTPResponse().read()` works the same as passing `None` value.
(cherry picked from commit 4d0d24f6e3)

Co-authored-by: Yury Manushkin <manushkin@gmail.com>
2025-01-28 12:00:54 +00:00
Miss Islington (bot)
332426b4af
[3.13] gh-85046: Document errno constants (GH-126420) (#129383)
(cherry picked from commit 1c3bb200da)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
2025-01-28 00:19:06 +00:00
Miss Islington (bot)
87d587faba
[3.13] GH-124398: Pin LLVM to 18.1.0 for Windows JIT CI (GH-124399) (#129380)
GH-124398: Pin LLVM to 18.1.0 for Windows JIT CI (GH-124399)
(cherry picked from commit b4d0d7de0f)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2025-01-27 22:22:56 +00:00
Miss Islington (bot)
5829f7bf70
[3.13] gh-119511: Fix a potential denial of service in imaplib (GH-119514) (GH-129355)
gh-119511: Fix a potential denial of service in imaplib (GH-119514)

The IMAP4 client could consume an arbitrary amount of memory when trying
to connect to a malicious server, because it read a "literal" data with a
single read(size) call, and BufferedReader.read() allocates the bytes
object of the specified size before reading. Now the IMAP4 client reads data
by chunks, therefore the amount of used memory is limited by the
amount of the data actually been sent by the server.
(cherry picked from commit 735f25c5e3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2025-01-27 14:05:59 -08:00
Miss Islington (bot)
247c3b2644
[3.13] gh-129346: Handle allocation errors for SQLite aggregate context (GH-129347) (#129372)
(cherry picked from commit 379ab856f5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-01-27 17:41:59 +00:00
Miss Islington (bot)
d7d4edfa75
[3.13] gh-109975: Add list of 3.13 removed library replacements (GH-127816) (#129242)
Co-authored-by: Jeong, YunWon <69878+youknowone@users.noreply.github.com>
2025-01-27 18:27:11 +02:00
Miss Islington (bot)
c7f9e7446c
[3.13] gh-129061: Fix FORCE_COLOR and NO_COLOR when empty strings (GH-129140) (#129360)
gh-129061: Fix `FORCE_COLOR` and `NO_COLOR` when empty strings (GH-129140)
(cherry picked from commit 9546fe2ef2)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-27 14:48:05 +00:00
Russell Keith-Magee
98c25b8e13
[3.13] gh-129156: Fix variable quoting in android-env.sh script (GH-129321) (#129332)
Adds quoting to `android-env.sh` to protect against spaces in paths.
(cherry picked from commit a49225cc66)

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-01-27 15:07:40 +08:00
Miss Islington (bot)
6e887411b6
[3.13] gh-123987: Fix NotADirectoryError in NamespaceReader when sentinel present (GH-124018) (#129319)
gh-123987: Fix NotADirectoryError in NamespaceReader when sentinel present (GH-124018)
(cherry picked from commit b543b32eff)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2025-01-26 12:04:09 -05:00
Miss Islington (bot)
53b7b0f782
[3.13] gh-126022: Remove zope.org from the permitted linkcheck redirects (GH-129308) (#129317)
Co-authored-by: partev <petrosyan@gmail.com>
2025-01-26 14:51:49 +00:00
Terry Jan Reedy
1499f66c4c
[3.13] gh-71339: Use new assertion methods in test_idle (#129314)
Revise 10 tests in 7 files, with 1 test split into 2.
(cherry picked from commit dbb25ce)
2025-01-26 09:42:08 +00:00
Miss Islington (bot)
bcececd785
[3.13] GH-121970: Remove pyspecific `PyDecoratorMixin` patches (GH-129306) (#129309)
GH-121970: Remove pyspecific ``PyDecoratorMixin`` patches (GH-129306)
(cherry picked from commit 0ef8d470b7)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-26 03:49:23 +00:00
Hugo van Kemenade
b2ae234672
[3.13] gh-126022: make license.rst consistent with LICENSE (GH-128516) (#129290)
Co-authored-by: partev <petrosyan@gmail.com>
2025-01-25 15:37:14 +02:00
Miss Islington (bot)
e1900db82d
[3.13] Replace strict_concatenate = True with extra_checks = True (GH-126391) (#129286)
Replace `strict_concatenate = True` with `extra_checks = True` (GH-126391)
(cherry picked from commit cc4f0a2770)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-01-25 09:45:22 +00:00
Miss Islington (bot)
aa1beed858
[3.13] gh-129248: Filter out the iOS log prefix from testbed runner output. (GH-129252) (#129283)
Filter out the iOS log prefix from testbed runner output.
(cherry picked from commit a58083811a)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2025-01-25 09:12:32 +00:00
Miss Islington (bot)
104bcff983
[3.13] GH-125722: Remove Sphinx patches (GH-129277) (#129278)
GH-125722: Remove Sphinx patches (GH-129277)
(cherry picked from commit d40692db06)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-25 03:55:36 +00:00
Miss Islington (bot)
e07a6fe7c3
[3.13] Improve tests for _colorize.can_colorize() (GH-129234) (GH-129265)
(cherry picked from commit 7907203bc0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-24 17:00:54 +00:00
Victor Stinner
1ee321b4c0
[3.13] gh-128679: Clear the ref tracer in _PyTraceMalloc_Stop() (#129258)
_PyTraceMalloc_Stop() now calls PyRefTracer_SetTracer(NULL, NULL).
2025-01-24 14:54:02 +01:00
Miss Islington (bot)
eed7865cee
[3.13] gh-97850: Remove the mention of removal from ResourceReader docs (GH-128602) (#128654)
gh-97850: Remove the mention of removal from `ResourceReader` docs (GH-128602)

Remove the mention of removal from ResourceReader docs
(cherry picked from commit a1284e9797)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
2025-01-23 22:17:32 +01:00
Miss Islington (bot)
6a261a02a7
[3.13] gh-126172: Fix a misleading statement in PYTHON_BASIC_REPL documentation (GH-127203) (#129152)
gh-126172: Fix a misleading statement in PYTHON_BASIC_REPL documentation (GH-127203)

Fix a misleading statement in PYTHON_BASIC_REPL documentation.
(cherry picked from commit f18b226492)

Co-authored-by: Michael Kashirin <88917554+mkashirin@users.noreply.github.com>
2025-01-23 22:17:11 +01:00
Miss Islington (bot)
75ec6caa48
[3.13] gh-128479: fix asyncio staggered race leaking tasks, and logging unhandled exception.append exception (GH-128475) (#129227)
gh-128479: fix asyncio staggered race leaking tasks, and logging unhandled exception.append exception (GH-128475)
(cherry picked from commit ec91e1c276)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-01-23 22:16:02 +01:00
Miss Islington (bot)
5c102a12a1
[3.13] gh-118878: Pyrepl: show completions menu below the current line (GH-118939) (#129161)
gh-118878: Pyrepl: show completions menu below the current line (GH-118939)

(cherry picked from commit 29caec62ee)

Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2025-01-23 22:15:27 +01:00
Miss Islington (bot)
52ccf264df
[3.13] gh-128330: Terminal control characters should be restored on repl exit (GH-128331) (#129233)
gh-128330: Terminal control characters should be restored on repl exit (GH-128331)
(cherry picked from commit 0b15d9c0d2)

Co-authored-by: Andy Fiddaman <andy@omnios.org>
2025-01-23 17:55:28 +00:00