]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Thomas Wouters [Tue, 4 Feb 2025 14:49:28 +0000 (15:49 +0100)]
Python 3.13.2
Serhiy Storchaka [Tue, 4 Feb 2025 14:25:18 +0000 (16:25 +0200)]
[3.13] Use roles :data: and :const: for referencing module variables (GH-129507) (GH-129649)
(cherry picked from commit
078ab828b9a21ed0e683941bd141d5017b5f62d9 )
donBarbos [Tue, 4 Feb 2025 14:18:22 +0000 (18:18 +0400)]
[3.13] gh-127349: Add check for correct resizing in REPL (GH-127387) (#129485)
(cherry picked from commit
510fefdc625dd2ed2b6b3975314a59e291b94ae8 )
Miss Islington (bot) [Tue, 4 Feb 2025 00:05:51 +0000 (01:05 +0100)]
[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
9d63ae5fe52d95059ab1bcd4cbb1f9e17033c897 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 3 Feb 2025 23:56:23 +0000 (00:56 +0100)]
[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
553cdc6d6856c1b4539a45eb90d0769f7c629355 )
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
Miss Islington (bot) [Mon, 3 Feb 2025 23:37:24 +0000 (00:37 +0100)]
[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
25cf79a0829422bd8479ca0c13c72b769422077b )
Co-authored-by: Burkov Egor <xwooffie@gmail.com>
Miss Islington (bot) [Mon, 3 Feb 2025 23:34:02 +0000 (00:34 +0100)]
[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
402b91da87052878b4e7e8946ba91bdf4ee4bebe )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Mon, 3 Feb 2025 12:02:00 +0000 (13:02 +0100)]
[3.13] gh-101944: Clarify PyModule_AddObjectRef() documentation (GH-129433) (#129612)
gh-101944: Clarify PyModule_AddObjectRef() documentation (GH-129433)
(cherry picked from commit
04264a286e5ddfe8ac7423f7376ca34a2ca8b7ba )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 3 Feb 2025 11:52:29 +0000 (12:52 +0100)]
[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
39b754a35976924f6df46cd475e889bcf8598ca1 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Mon, 3 Feb 2025 08:28:11 +0000 (09:28 +0100)]
[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
0612a89ffcf0bb52b1750a3466671ba8daad1d87 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Mon, 3 Feb 2025 00:38:44 +0000 (01:38 +0100)]
[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
8df5193d37f70a1478642c4b456dcc7d6df6c117 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sun, 2 Feb 2025 23:26:38 +0000 (00:26 +0100)]
[3.13] gh-105875: amend sqlite3 docstring wrt. SQLite requirement (GH-129599) (#129602)
(cherry picked from commit
ecd2f84555bf494007420ba5a37adf8d1c23e856 )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Jason R. Coombs [Sun, 2 Feb 2025 18:53:23 +0000 (13:53 -0500)]
[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
914c232e9391e8e5014b089ba12c75d4a3b0cc7f )
Co-authored-by: Andrey Efremov <duxus@yandex.ru>
Collin Funk [Sun, 2 Feb 2025 18:37:32 +0000 (10:37 -0800)]
[3.13] gh-129539: Include sysexits.h before checking EX_OK (#129590)
Previously, the macro would be redefined when the header was included.
Adam Turner [Sun, 2 Feb 2025 16:24:48 +0000 (16:24 +0000)]
[3.13] GH-121970: Extract ``misc_news`` into a new extension (GH-129577) (#129586)
(cherry picked from commit
ae4788809d674f8e27faef2678953be8cf67d4a3 )
Miss Islington (bot) [Sun, 2 Feb 2025 16:12:12 +0000 (17:12 +0100)]
[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
4e38eeafe2ff3bfc686514731d6281fed34a435e )
Co-authored-by: Vojtěch Boček <vbocek@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Sun, 2 Feb 2025 08:12:51 +0000 (09:12 +0100)]
[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
d89a5f6a6e65511a5f6e0618c4c30a7aa5aba56a )
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Sun, 2 Feb 2025 05:11:30 +0000 (06:11 +0100)]
[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
e1006ce1ded1b18972888ef057718dba6f2c7edd )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Sat, 1 Feb 2025 16:57:58 +0000 (17:57 +0100)]
[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>
Miss Islington (bot) [Fri, 31 Jan 2025 15:02:44 +0000 (16:02 +0100)]
[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
fad36bf38248130bc48b81a5e7c31a7649a6456e )
Co-authored-by: Valery Fedorenko <federicovalenso@gmail.com>
Victor Stinner [Thu, 30 Jan 2025 19:29:27 +0000 (20:29 +0100)]
[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
4ca9fc08f89bf7172d41e523d9e520eb1729ee8c )
Irit Katriel [Thu, 30 Jan 2025 12:20:13 +0000 (12:20 +0000)]
[3.13] gh-128799: Add frame of except* to traceback when wrapping a naked exception (#128971) (#129299)
Miss Islington (bot) [Thu, 30 Jan 2025 10:22:05 +0000 (11:22 +0100)]
[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
652f66ac386dad5992c6f7c494871907272503f8 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Miss Islington (bot) [Thu, 30 Jan 2025 09:33:30 +0000 (10:33 +0100)]
[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
bcb25d60b1baf9348e73cbd2359342cea6009c36 )
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Thu, 30 Jan 2025 08:54:15 +0000 (09:54 +0100)]
[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
71aecc284efdf997939568a4167dbffe1a65b9bf )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Miss Islington (bot) [Wed, 29 Jan 2025 21:23:10 +0000 (22:23 +0100)]
[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
a1a4e9f39ad86359e148fd193089b3b2a354f71d )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Wed, 29 Jan 2025 16:55:24 +0000 (17:55 +0100)]
[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
49f24650e4541456872490ec2b59d6d186204891 )
Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
Miss Islington (bot) [Wed, 29 Jan 2025 13:40:04 +0000 (14:40 +0100)]
[3.13] CI: Change job name to 'build arm64' on Windows (GH-129434) (#129439)
Miss Islington (bot) [Wed, 29 Jan 2025 11:39:16 +0000 (12:39 +0100)]
[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
97b0ef05d987ebef354512b516a246feb411e815 )
Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com>
Miss Islington (bot) [Tue, 28 Jan 2025 18:48:51 +0000 (19:48 +0100)]
[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
7dd0a7e52ee832559b89d5ccba732c8e91260df8 )
Co-authored-by: Samuel GIFFARD <samuel@giffard.co>
Miss Islington (bot) [Tue, 28 Jan 2025 12:00:54 +0000 (13:00 +0100)]
[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
4d0d24f6e3dff2864007c3cfd1cf7d49c6ee5317 )
Co-authored-by: Yury Manushkin <manushkin@gmail.com>
Miss Islington (bot) [Tue, 28 Jan 2025 00:19:06 +0000 (01:19 +0100)]
[3.13] gh-85046: Document errno constants (GH-126420) (#129383)
(cherry picked from commit
1c3bb200da77f9df30af4717988dad17db086d1a )
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
Miss Islington (bot) [Mon, 27 Jan 2025 22:22:56 +0000 (23:22 +0100)]
[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
b4d0d7de0f6d938128bf525e119c18af5632b804 )
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Miss Islington (bot) [Mon, 27 Jan 2025 22:05:59 +0000 (23:05 +0100)]
[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
735f25c5e3a0f74438c86468ec4dfbe219d93c91 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Mon, 27 Jan 2025 17:41:59 +0000 (18:41 +0100)]
[3.13] gh-129346: Handle allocation errors for SQLite aggregate context (GH-129347) (#129372)
(cherry picked from commit
379ab856f59423c570333403a7d5d72f3ea82d52 )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Miss Islington (bot) [Mon, 27 Jan 2025 16:27:11 +0000 (17:27 +0100)]
[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>
Miss Islington (bot) [Mon, 27 Jan 2025 14:48:05 +0000 (15:48 +0100)]
[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
9546fe2ef2db921709f3cb355b33bba977658672 )
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Russell Keith-Magee [Mon, 27 Jan 2025 07:07:40 +0000 (15:07 +0800)]
[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
a49225cc66680129f129d1fcf6e20afb37a1a877 )
Co-authored-by: Zanie Blue <contact@zanie.dev>
Miss Islington (bot) [Sun, 26 Jan 2025 17:04:09 +0000 (18:04 +0100)]
[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
b543b32eff78ce214e68e8c5fc15a8c843fa8dec )
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Miss Islington (bot) [Sun, 26 Jan 2025 14:51:49 +0000 (15:51 +0100)]
[3.13] gh-126022: Remove zope.org from the permitted linkcheck redirects (GH-129308) (#129317)
Co-authored-by: partev <petrosyan@gmail.com>
Terry Jan Reedy [Sun, 26 Jan 2025 09:42:08 +0000 (04:42 -0500)]
[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 )
Miss Islington (bot) [Sun, 26 Jan 2025 03:49:23 +0000 (04:49 +0100)]
[3.13] GH-121970: Remove pyspecific ``PyDecoratorMixin`` patches (GH-129306) (#129309)
GH-121970: Remove pyspecific ``PyDecoratorMixin`` patches (GH-129306)
(cherry picked from commit
0ef8d470b79889de065e94cecd0ee01e45037d3a )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Hugo van Kemenade [Sat, 25 Jan 2025 13:37:14 +0000 (15:37 +0200)]
[3.13] gh-126022: make license.rst consistent with LICENSE (GH-128516) (#129290)
Co-authored-by: partev <petrosyan@gmail.com>
Miss Islington (bot) [Sat, 25 Jan 2025 09:45:22 +0000 (10:45 +0100)]
[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
cc4f0a27704ba1401bd66931f5234be9c6b92ba5 )
Co-authored-by: sobolevn <mail@sobolevn.me>
Miss Islington (bot) [Sat, 25 Jan 2025 09:12:32 +0000 (10:12 +0100)]
[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
a58083811a51764c47fbb7cbd67e87e1124d53e8 )
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Miss Islington (bot) [Sat, 25 Jan 2025 03:55:36 +0000 (04:55 +0100)]
[3.13] GH-125722: Remove Sphinx patches (GH-129277) (#129278)
GH-125722: Remove Sphinx patches (GH-129277)
(cherry picked from commit
d40692db06cdae89447c26b6c1b5d2a682c0974f )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Fri, 24 Jan 2025 17:00:54 +0000 (18:00 +0100)]
[3.13] Improve tests for _colorize.can_colorize() (GH-129234) (GH-129265)
(cherry picked from commit
7907203bc07387ff2d8e2bcc15d7b8dd3a1ce687 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Victor Stinner [Fri, 24 Jan 2025 13:54:02 +0000 (14:54 +0100)]
[3.13] gh-128679: Clear the ref tracer in _PyTraceMalloc_Stop() (#129258)
_PyTraceMalloc_Stop() now calls PyRefTracer_SetTracer(NULL, NULL).
Miss Islington (bot) [Thu, 23 Jan 2025 21:17:32 +0000 (22:17 +0100)]
[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
a1284e97979ff73ad72ad06c796b904137950576 )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Thu, 23 Jan 2025 21:17:11 +0000 (22:17 +0100)]
[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
f18b2264929c56360c868d7ad77508035d751352 )
Co-authored-by: Michael Kashirin <88917554+mkashirin@users.noreply.github.com>
Miss Islington (bot) [Thu, 23 Jan 2025 21:16:02 +0000 (22:16 +0100)]
[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
ec91e1c2762412f1408b0dfb5d281873b852affe )
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Thu, 23 Jan 2025 21:15:27 +0000 (22:15 +0100)]
[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
29caec62ee0650493c83c778ee2ea50b0501bc41 )
Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Thu, 23 Jan 2025 17:55:28 +0000 (18:55 +0100)]
[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
0b15d9c0d2d30c7d3f17ebb90dd822ef32f977cc )
Co-authored-by: Andy Fiddaman <andy@omnios.org>
Victor Stinner [Thu, 23 Jan 2025 12:59:19 +0000 (13:59 +0100)]
[3.13] gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191) (#129217)
gh-129185: Fix PyTraceMalloc_Untrack() at Python exit (#129191)
Support calling PyTraceMalloc_Track() and PyTraceMalloc_Untrack()
during late Python finalization.
* Call _PyTraceMalloc_Fini() later in Python finalization.
* Test also PyTraceMalloc_Untrack() without the GIL
* PyTraceMalloc_Untrack() now gets the GIL.
* Test also PyTraceMalloc_Untrack() in test_tracemalloc_track_race().
(cherry picked from commit
46c7e13c055c218e18b0424efc60965e6a5fe6ea )
Miss Islington (bot) [Wed, 22 Jan 2025 21:45:08 +0000 (22:45 +0100)]
[3.13] Add colour to GitHub Actions output (GH-129196) (#129198)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Hugo van Kemenade [Wed, 22 Jan 2025 19:09:51 +0000 (21:09 +0200)]
[3.13] gh-127873: Only check `sys.flags.ignore_environment` for `PYTHON*` env vars (GH-127877) (#129138)
Miss Islington (bot) [Wed, 22 Jan 2025 17:19:07 +0000 (18:19 +0100)]
[3.13] gh-124363: Treat debug expressions in f-string as raw strings (GH-128399) (#129187)
gh-124363: Treat debug expressions in f-string as raw strings (GH-128399)
(cherry picked from commit
60a3a0dd6fe140fdc87f6e769ee5bb17d92efe4e )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Miss Islington (bot) [Wed, 22 Jan 2025 16:38:13 +0000 (17:38 +0100)]
[3.13] gh-128636: Fix crash in PyREPL when `os.environ` is overwritten with an invalid value (GH-128653) (#129186)
gh-128636: Fix crash in PyREPL when `os.environ` is overwritten with an invalid value (GH-128653)
(cherry picked from commit
ba9a4b621577b92f36d88388cc9f791c2dc7d7ba )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Wed, 22 Jan 2025 13:13:08 +0000 (14:13 +0100)]
[3.13] gh-128770: fix ResourceWarning in test_pyrepl (GH-128906) (#129179)
Miss Islington (bot) [Wed, 22 Jan 2025 13:12:39 +0000 (14:12 +0100)]
[3.13] gh-128894: Fix `TracebackException._format_syntax_error` on custom `SyntaxError` metadata (GH-128946) (#129178)
Miss Islington (bot) [Wed, 22 Jan 2025 00:50:22 +0000 (01:50 +0100)]
[3.13] gh-129093: Fix f-string debug text sometimes getting cut off when expression contains `!` (GH-129159) (#129163)
gh-129093: Fix f-string debug text sometimes getting cut off when expression contains `!` (GH-129159)
(cherry picked from commit
767cf708449fbf13826d379ecef64af97d779510 )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Tue, 21 Jan 2025 22:15:57 +0000 (23:15 +0100)]
[3.13] gh-123024: Correctly prepare/restore around help and show-history commands (GH-124485) (#129155)
gh-123024: Correctly prepare/restore around help and show-history commands (GH-124485)
(cherry picked from commit
5a9afe23620aadea30013076d64686be8bf66f7e )
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Tue, 21 Jan 2025 21:04:55 +0000 (22:04 +0100)]
[3.13] gh-125553: Fix backslash continuation in `untokenize` (GH-126010) (#129153)
gh-125553: Fix backslash continuation in `untokenize` (GH-126010)
(cherry picked from commit
7ad793e5dbdf07e51a71b70d20f3e6e3ab60244d )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Tue, 21 Jan 2025 21:04:41 +0000 (22:04 +0100)]
[3.13] gh-126332: Fix pyrepl crash for double ctrl-z in line overflow (GH-126650) (#129154)
gh-126332: Fix pyrepl crash for double ctrl-z in line overflow (GH-126650)
(cherry picked from commit
d147e5e52cdb90496ae5fe85b3263cdfa9407a28 )
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Diego Russo [Tue, 21 Jan 2025 20:40:59 +0000 (20:40 +0000)]
[3.13] Move to public Linux arm64 hosted runners (#129146)
Miss Islington (bot) [Tue, 21 Jan 2025 20:12:43 +0000 (21:12 +0100)]
[3.13] gh-122845: fix parameter_list_starargs in function definition pseudo-grammar (GH-122847) (#129150)
gh-122845: fix parameter_list_starargs in function definition pseudo-grammar (GH-122847)
Thanks to Artur Chakhvadze for bugfix.
(cherry picked from commit
610584639003317193cdcfe38bbdc8268b612828 )
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Hugo van Kemenade [Tue, 21 Jan 2025 16:14:24 +0000 (18:14 +0200)]
[3.13] gh-128595: Default to stdout isatty for colour detection instead of stderr (GH-128498) (#129057)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Fix `test__colorize` unexpected keyword argument 'file' on buildbots (#129070)
Miss Islington (bot) [Tue, 21 Jan 2025 10:47:55 +0000 (11:47 +0100)]
[3.13] gh-118915: C API: Document compiler flag macros (GH-129028) (GH-129086)
(cherry picked from commit
6e02096e2f9a18671d608f79dd61c5757deca4e8 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Tue, 21 Jan 2025 09:40:31 +0000 (10:40 +0100)]
[3.13] Docs: fix typo in `Doc/howto/mro.rst` (GH-129095) (GH-129122)
(cherry picked from commit
da310d209a6af45e5e1ea48a873f1d14be471a09 )
Co-authored-by: smelnikov <13030121+smelnikov@users.noreply.github.com>
Miss Islington (bot) [Mon, 20 Jan 2025 23:58:41 +0000 (00:58 +0100)]
[3.13] GH-121970: Extract ``changes`` into a new extension (GH-129105) (#129109)
GH-121970: Extract ``changes`` into a new extension (GH-129105)
(cherry picked from commit
e54ac3b69edacf4149988150591226df1397d127 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Mon, 20 Jan 2025 21:05:52 +0000 (22:05 +0100)]
[3.13] gh-111178: fix UBSan failures in `Modules/_multiprocessing/semaphore.c` (GH-129084) (#129100)
gh-111178: fix UBSan failures in `Modules/_multiprocessing/semaphore.c` (GH-129084)
fix UBSan failures for `SemLockObject`
(cherry picked from commit
5ed5572cac7ef204767ddf8e8888e15672ba558e )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Mon, 20 Jan 2025 19:13:12 +0000 (20:13 +0100)]
[3.13] doc: fix venv creating for the local Python using uv (GH-129094) (#129096)
Co-authored-by: Filipe Laíns 🇵🇸 <lains@riseup.net>
Miss Islington (bot) [Mon, 20 Jan 2025 18:28:52 +0000 (19:28 +0100)]
[3.13] GH-128131: Completely support random read access of uncompressed unencrypted files in ZipFile (GH-128143) (#129091)
GH-128131: Completely support random read access of uncompressed unencrypted files in ZipFile (GH-128143)
(cherry picked from commit
dda02eb7be62bf0af850a7521c77c90ea997df6c )
Co-authored-by: 5ec1cff <56485584+5ec1cff@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Mon, 20 Jan 2025 17:36:50 +0000 (18:36 +0100)]
[3.13] gh-128588: gh-128550: remove eager tasks optimization that missed and introduced incorrect cancellations (GH-129063) (#129089)
gh-128588: gh-128550: remove eager tasks optimization that missed and introduced incorrect cancellations (GH-129063)
(cherry picked from commit
ed6934e71e55d398df8263f4697f58e4a3815f69 )
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Miss Islington (bot) [Mon, 20 Jan 2025 16:04:53 +0000 (17:04 +0100)]
[3.13] Docs C API: Clarify what happens when null bytes are passed to `PyUnicode_AsUTF8` (GH-127458) (#129080)
Docs C API: Clarify what happens when null bytes are passed to `PyUnicode_AsUTF8` (GH-127458)
(cherry picked from commit
e792f4bc2e712bb6e2143599d2b88dd339de83e6 )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan U. <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 20 Jan 2025 15:51:52 +0000 (16:51 +0100)]
[3.13] gh-129044: Update glossary entry for 'loader' to reflect current import system (GH-129073) (#129077)
gh-129044: Update glossary entry for 'loader' to reflect current import system (GH-129073)
(cherry picked from commit
e1fa2fcc7c1bf5291a7f71300b7828b49be9ab72 )
Co-authored-by: nikalinov <92603661+nikalinov@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Mon, 20 Jan 2025 13:54:48 +0000 (14:54 +0100)]
[3.13] gh-128978: Fix a `NameError` in `sysconfig.expand_makefile_vars` (GH-128979) (#129065)
gh-128978: Fix a `NameError` in `sysconfig.expand_makefile_vars` (GH-128979)
This fixes a regression introduced by
4a53a397c311567f05553bc25a28aebaba4f6f65 .
(cherry picked from commit
df66ff14b49f4388625212f6bc86b754cb51d4eb )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Mon, 20 Jan 2025 10:37:21 +0000 (11:37 +0100)]
[3.13] Fix a typo in `syslog`'s error message (GH-129029) (#129049)
Fix a typo in `syslog`'s error message (GH-129029)
(cherry picked from commit
9b1c1817af30e609b7cbfacbe5b1e73e21dc9e37 )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Serhiy Storchaka [Mon, 20 Jan 2025 09:19:00 +0000 (11:19 +0200)]
[3.13] gh-71339: Add additional assertion methods in test.support (GH-128707) (GH-128815)
Add a mix-in class ExtraAssertions containing the following methods:
* assertHasAttr() and assertNotHasAttr()
* assertIsSubclass() and assertNotIsSubclass()
* assertStartsWith() and assertNotStartsWith()
* assertEndsWith() and assertNotEndsWith()
(cherry picked from commit
06cad77a5b345adde88609be9c3c470c5cd9f417 )
Miss Islington (bot) [Mon, 20 Jan 2025 07:17:29 +0000 (08:17 +0100)]
[3.13] GH-125722: Use long options for Sphinx (GH-129039) (#129041)
GH-125722: Use long options for Sphinx (GH-129039)
(cherry picked from commit
4967fa6a9c0db7ea3ade905d724a04688cfc7a5e )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Mon, 20 Jan 2025 00:52:00 +0000 (01:52 +0100)]
[3.13] GH-125722: Increase minimum supported Sphinx to 8.1.3 (GH-128922) (#129037)
(cherry picked from commit
d46b577ec026c2e700a9f920f81cfbf698e53eb6 )
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Miss Islington (bot) [Mon, 20 Jan 2025 00:11:27 +0000 (01:11 +0100)]
[3.13] gh-129020: Remove ambiguous sentence from `tokenize.untokenize` docs (GH-129021) (#129035)
gh-129020: Remove ambiguous sentence from `tokenize.untokenize` docs (GH-129021)
(cherry picked from commit
bca35f0e782848ae2acdcfbfb000cd4a2af49fbd )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Miss Islington (bot) [Sun, 19 Jan 2025 21:06:28 +0000 (22:06 +0100)]
[3.13] gh-80222: Fix email address header folding with long quoted-string (GH-122753) (#129007)
gh-80222: Fix email address header folding with long quoted-string (GH-122753)
Email generators using email.policy.default could incorrectly omit the
quote ('"') characters from a quoted-string during header refolding,
leading to invalid address headers and enabling header spoofing. This
change restores the quote characters on a bare-quoted-string as the
header is refolded, and escapes backslash and quote chars in the string.
(cherry picked from commit
5aaf41685834901e4ed0a40f4c055b92991a0bb5 )
Co-authored-by: Mike Edmunds <medmunds@gmail.com>
Victor Stinner [Sat, 18 Jan 2025 23:39:07 +0000 (00:39 +0100)]
[3.13] gh-128679: Fix tracemalloc.stop() race conditions (#128897)
tracemalloc_alloc(), tracemalloc_realloc(), PyTraceMalloc_Track(),
PyTraceMalloc_Untrack() and _PyTraceMalloc_TraceRef() now check
tracemalloc_config.tracing after calling TABLES_LOCK().
_PyTraceMalloc_Stop() now protects more code with TABLES_LOCK(),
especially setting tracemalloc_config.tracing to 1.
Add a test using PyTraceMalloc_Track() to test tracemalloc.stop()
race condition.
Call _PyTraceMalloc_Init() at Python startup.
Tian Gao [Sat, 18 Jan 2025 22:21:23 +0000 (17:21 -0500)]
[3.13] gh-128991: Release the enter frame reference within bdb callba… (#129002)
[3.13] gh-128991: Release the enter frame reference within bdb callback (GH-128992)
* Release the enter frame reference within bdb callback
* 📜🤖 Added by blurb_it.
---------
(cherry picked from commit
61b35f74aa4a6ac606635e245147ff3658628d99 )
Miss Islington (bot) [Sat, 18 Jan 2025 20:58:20 +0000 (21:58 +0100)]
[3.13] gh-128998: Fix indentation of numbered list and literal block (GH-128999) (#129000)
gh-128998: Fix indentation of numbered list and literal block (GH-128999)
(cherry picked from commit
e8092e5cdcd6707ac0b16d8fb37fa080a88bcc97 )
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Peter Bierma [Sat, 18 Jan 2025 20:52:07 +0000 (15:52 -0500)]
[3.13] Pre-commit: Drop specific language version and bump hooks (GH-128801) (#128994)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Miss Islington (bot) [Sat, 18 Jan 2025 18:40:30 +0000 (19:40 +0100)]
[3.13] gh-121542: Document trailing newline behavior in `set_content()` (GH-121543) (#128995)
gh-121542: Document trailing newline behavior in `set_content()` (GH-121543)
(cherry picked from commit
fba475ae6f932d0aaee6832b4102b2d4c50df70f )
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Yizheng Meng <dev@rapidcow.org>
Ed Nutting [Sat, 18 Jan 2025 17:00:46 +0000 (17:00 +0000)]
[3.13] gh-127599: Fix _Py_RefcntAdd missing calls to _Py_INCREF_STAT_INC/_Py_INCREF_IMMORTAL_STAT_INC (GH-127717) (#128713)
Previously, `_Py_RefcntAdd` hasn't called
`_Py_INCREF_STAT_INC/_Py_INCREF_IMMORTAL_STAT_INC` which is incorrect.
Now it has been fixed.
(cherry picked from commit
ab05beb8cea62636bd86f6f7cf1a82d7efca7162 )
Victor Stinner [Sat, 18 Jan 2025 14:49:55 +0000 (15:49 +0100)]
[3.13] gh-111495: Add more tests on PyEval C APIs (#122789) (#128987)
* gh-111495: Add more tests on PyEval C APIs (#122789)
* Add Lib/test/test_capi/test_eval.py
* Add Modules/_testlimitedcapi/eval.c
(cherry picked from commit
bf8b3746398ea756c97e3cf263d63ca3ce3a544e )
* gh-111495: Fix refleaks in test_capi.test_eval tests (#122851)
(cherry picked from commit
b4a316087c32d83e375087fd35fc511bc430ee8b )
Miss Islington (bot) [Sat, 18 Jan 2025 11:08:42 +0000 (12:08 +0100)]
[3.13] gh-125997: suggest efficient alternatives for `time.sleep(0)` (GH-128752) (#128984)
gh-125997: suggest efficient alternatives for `time.sleep(0)` (GH-128752)
(cherry picked from commit
f4afaa6f1190fbbea3e27c590096951d8ffdfb71 )
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Miss Islington (bot) [Sat, 18 Jan 2025 10:17:42 +0000 (11:17 +0100)]
[3.13] gh-128961: Fix exhausted array iterator crash in __setstate__() (GH-128962) (#128976)
(cherry picked from commit
4dade055f4e18a7e91bc70293abb4db745ad16ca )
Co-authored-by: Tomasz Pytel <tompytel@gmail.com>
Miss Islington (bot) [Sat, 18 Jan 2025 03:45:42 +0000 (04:45 +0100)]
[3.13] gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933) (#128969)
gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets (GH-128933)
* gh-128916: Do not set `SO_REUSEPORT` on non-`AF_INET*` sockets
Do not attempt to set ``SO_REUSEPORT`` on sockets of address familifies other
than ``AF_INET`` and ``AF_INET6``, as it is meaningless with these address
families, and the call with fail with Linux kernel 6.12.9 and newer.
* Apply suggestions from code review
---------
(cherry picked from commit
3829104ab412a47bf3f36b8c133c886d2cc9a6d4 )
Co-authored-by: Michał Górny <mgorny@gentoo.org>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Miss Islington (bot) [Sat, 18 Jan 2025 00:52:10 +0000 (01:52 +0100)]
[3.13] Fix definition of a `generator iterator` in `glossary.rst` (GH-128952) (#128967)
Fix definition of a `generator iterator` in `glossary.rst` (GH-128952)
Fix possible typo/grammar in glossary.rst
As discussed in https://discuss.python.org/t/typo-in-glossary-entry-for-generator-iterator/77163
(cherry picked from commit
8174770d311ba09c07a47cc3ae90a1db2e7d7708 )
Co-authored-by: Daniel F Moisset <dfmoisset@gmail.com>
Victor Stinner [Fri, 17 Jan 2025 21:44:51 +0000 (22:44 +0100)]
[3.13] gh-128911: Add tests on the PyImport C API (#128915) (#128960)
gh-128911: Add tests on the PyImport C API (#128915)
* Add Modules/_testlimitedcapi/import.c
* Add Lib/test/test_capi/test_import.py
* Remove _testcapi.check_pyimport_addmodule(): tests already covered
by newly added tests.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
d95ba9fa1110534b7247fa2ff12b90e930c93256 )
Miss Islington (bot) [Fri, 17 Jan 2025 17:49:15 +0000 (18:49 +0100)]
[3.13] gh-58956: Fix a frame refleak in bdb (GH-128190) (#128947)
* gh-58956: Fix a frame refleak in bdb (GH-128190)
(cherry picked from commit
767c89ba7c5a70626df6e75eb56b546bf911b997 )
Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Miss Islington (bot) [Fri, 17 Jan 2025 16:04:00 +0000 (17:04 +0100)]
[3.13] gh-128017: Make a note that sys variables are read-only (GH-128887) (#128908)
Co-authored-by: Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) <thatiparthysreenivas@gmail.com>
Miss Islington (bot) [Fri, 17 Jan 2025 12:55:07 +0000 (13:55 +0100)]
[3.13] gh-58689: Fix os.kill() error handling on Windows (GH-128932) (#128937)
gh-58689: Fix os.kill() error handling on Windows (GH-128932)
(cherry picked from commit
939df0f9f6a76e0916b3ba53841e1413ab90952e )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 16 Jan 2025 08:57:14 +0000 (09:57 +0100)]
[3.13] gh-128816: Fix warnings in test_doctest (GH-128817) (GH-128870)
* Fix a deprecation warning for using importlib.resources.abc.ResourceReader.
* Fix an import warning when importing readline (if it has not yet been imported).
(cherry picked from commit
599be687ec7327c30c6469cf743aa4ee9e82232d )
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Miss Islington (bot) [Wed, 15 Jan 2025 20:53:17 +0000 (21:53 +0100)]
[3.13] gh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoader` (GH-128601) (GH-128895)
gh-97850: Suggest `TraversableResources` as the alternative for `ResourceLoader` (GH-128601)
Suggest TraversableResources as the alternative for ResourceLoader.
Previously, ResourceReader was the suggested alternative, but it
is itself deprecated in favour of TraversableResources.
(cherry picked from commit
256d6d2131541b3ff8f06f42c8157f808fde464c )
Co-authored-by: Tomas R <tomas.roun8@gmail.com>