Commit graph

127200 commits

Author SHA1 Message Date
Miss Islington (bot)
e379a71811
[3.14] gh-91048: Fix error path result in _remote_debugging_module (GH-134347) (#134399) 2025-05-21 00:20:53 +00:00
Miss Islington (bot)
81c348b6da
GH-130727: Avoid race condition in _wmimodule by copying shared data (GH-134313)
(cherry picked from commit e4fbfb1288)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-05-20 21:47:12 +00:00
Miss Islington (bot)
69710b7087
[3.14] gh-134215: PyREPL: Do not show underscored modules by default during autocompletion (gh-134267) (gh-134388)
(cherry picked from commit a3a3cf6d15)

Co-authored-by: Kevin Hernández <kevin.hernandez@unet.edu.ve>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-20 23:12:02 +02:00
Miss Islington (bot)
04829d4d87
[3.14] gh-134209: use heap-allocated memory in _curses.window.{instr,getstr} (GH-134283) (#134391)
gh-134209: use heap-allocated memory in `_curses.window.{instr,getstr}` (GH-134283)

* made curses buffer heap allocated instead of stack
* change docs to explicitly mention the max buffer size
* changing GetStr() function to behave similarly too
* Update Doc/library/curses.rst
* Update instr with proper return error handling
* Update Modules/_cursesmodule.c
* change to strlen and better memory safety
* change from const int to Py_ssize_t
* add mem allocation guard
* update versionchanged to mention it was an increase.
* explicitly use versionchanged 3.14 as that is its own branch now.

TESTED: `python -m test -u curses test_curses`

---------
(cherry picked from commit aadda87b3d)

Co-authored-by: tigerding <43339228+zydtiger@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-20 14:01:45 -07:00
Miss Islington (bot)
379805d03c
[3.14] gh-128066: Properly handle history file writes for RO fs on PyREPL (gh-134380) (gh-134385)
(cherry picked from commit c91ad5da9d)

Co-authored-by: Chris Patti <feoh@feoh.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-20 22:15:23 +02:00
Miss Islington (bot)
899ce7d390
[3.14] gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372) (#134374)
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:03 -07:00
Miss Islington (bot)
6f1f871483
[3.14] gh-127146: xfail more Emscripten stack overflows (GH-134358) (#134382)
Adds some additional test xfails for Emscripten stack overflows. Also corrects a test skip for test_io.
(cherry picked from commit 91e6a58e2d)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-05-20 19:07:08 +00:00
Miss Islington (bot)
a2950d50cc
[3.14] gh-131357: Add tests for zero-sized bytes objects in test_bytes.py (GH-134234) (#134378)
gh-131357: Add tests for zero-sized bytes objects in test_bytes.py (GH-134234)
(cherry picked from commit 306f9e04e5)

Co-authored-by: abstractedfox <coldcaption@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-05-20 18:59:00 +00:00
Miss Islington (bot)
2d90cc8b35
[3.14] gh-106213: Shorten Emscripten wasm-gc trampoline by a little (GH-133984) (#134376)
Using the if instruction results in slightly shorter trampoline code.
(cherry picked from commit 3b7888bf3d)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2025-05-20 18:49:29 +00:00
Miss Islington (bot)
efdaae5b35
[3.14] gh-86802: Fix asyncio memory leak; shielded task exceptions log once through the exception handler (gh-134331) (gh-134343)
(cherry picked from commit f695eca60c)

Co-authored-by: Christian Harries <68507104+ChristianHrs@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-20 19:43:09 +02:00
Miss Islington (bot)
6ce2045139
[3.14] GH-133779: Fix finding pyconfig.h on Windows JIT builds (GH-134359)
(cherry picked from commit 7ad90463df)
2025-05-20 13:22:24 -04:00
Miss Islington (bot)
6074e1e6c4
[3.14] gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962) (GH-134344)
gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962)

  * Add "cyclic isolate" to the glossary.
  * Add a new "Object Life Cycle" page.
  * Improve docs for related API, with special focus on cross-references and warnings
(cherry picked from commit 3246ea514d)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-20 19:11:01 +02:00
Miss Islington (bot)
6d4b56d2f3
[3.14] gh-127945: Update What's New in Python 3.14 for free-threaded ctypes (GH-134332) (#134364)
gh-127945: Update What's New in Python 3.14 for free-threaded ctypes (GH-134332)
(cherry picked from commit b430e92dd8)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-20 17:02:55 +00:00
Miss Islington (bot)
402d983f27
[3.14] gh-128002: add what's new docs for asyncio (GH-134324) (#134362)
gh-128002: add what's new docs for `asyncio` (GH-134324)
(cherry picked from commit 0584533dc7)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-20 16:47:42 +00:00
Miss Islington (bot)
8e8d5c91cd
[3.14] gh-132542: Set native thread ID after fork (GH-132701) (GH-134356)
(cherry picked from commit 6b73502313)

Co-authored-by: Noam Cohen <noam@noam.me>
2025-05-20 16:46:52 +00:00
Miss Islington (bot)
dc5866ab25
[3.14] gh-129748: Update mimalloc to use atomic store for mi_block_set_nextx (GH-134238) (gh-134352)
gh-129748: Update mimalloc to use atomic store for mi_block_set_nextx (GH-134238)
(cherry picked from commit 317c496223)

Co-authored-by: Donghee Na <donghee.na@python.org>
2025-05-20 16:25:04 +00:00
Miss Islington (bot)
ff0facd332
[3.14] gh-101100: Fix Sphinx warnings in library/decimal.rst (GH-134303) (#134338)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-20 14:52:11 +00:00
Miss Islington (bot)
b9a7e79ee1
[3.14] gh-128307: Update what's new in 3.13 and 3.14 with create_task changes of asyncio (GH-134304) (#134319)
gh-128307: Update what's new in 3.13 and 3.14 with create_task changes of asyncio  (GH-134304)
(cherry picked from commit 28625d4f95)

Co-authored-by: Guido van Rossum <guido@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-20 14:15:18 +00:00
Miss Islington (bot)
2dedf5eb45
[3.14] gh-62824: Add alias for iso-8859-8-i which is the same as iso-8859-8 (gh-134306) (gh-134330)
(cherry picked from commit 5ab66a882d)

Co-authored-by: Bas Bloemsaat <bas@bloemsaat.com>
Co-authored-by: David Goncalves <davegoncalves@gmail.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2025-05-20 16:05:16 +02:00
Miss Islington (bot)
7e67b36d97
[3.14] gh-117596: Add more tests for os.path with invalid paths (GH-134189) (GH-134265)
(cherry picked from commit 871d269875)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-20 12:55:21 +00:00
Miss Islington (bot)
a3fa72578a
[3.14] gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069) (GH-134328)
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)

(cherry picked from commit a31bbc951a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-05-20 12:15:34 +00:00
Miss Islington (bot)
c23bdc2ece
[3.14] gh-133890: Handle UnicodeEncodeError in tarfile (GH-134147) (GH-134195)
UnicodeEncodeError is now handled the same way as OSError during
TarFile member extraction.
(cherry picked from commit 9983c7d441)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-20 10:13:40 +00:00
Miss Islington (bot)
9c73a4de0c
[3.14] gh-133940: test_strftime incorrectly calculates expected week (GH-134281) (#134301)
gh-133940: test_strftime incorrectly calculates expected week (GH-134281)

Let the system determine the correct tm_wday and tm_isdst.
(cherry picked from commit e3dda8f818)

Co-authored-by: Gustaf <79180496+GGyll@users.noreply.github.com>
2025-05-20 10:11:39 +00:00
Miss Islington (bot)
ccaf865364
[3.14] gh-131505: Move len boundary assertions before using len. (GH-131536) (GH-134239)
gh-131505: Move len boundary assertions before using len. (GH-131536)

Move len boundary assertions before using len.
(cherry picked from commit c45e661226)

Co-authored-by: naya451 <41294408+naya451@users.noreply.github.com>
2025-05-20 09:57:39 +00:00
Miss Islington (bot)
9be3413b60
[3.14] Clean up test_posixpath (GH-134315) (GH-134316)
* Ensure that created files and dirs are always removed after test.
  Now addCleanup() does not conflict with tearDown().
* Use os_helper.unlink() and os_helper.rmdir().
* Import TESTFN from os_helper.
(cherry picked from commit e29171bf8a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-20 08:18:13 +00:00
Miss Islington (bot)
90aa13ae47
[3.14] gh-133374: fix test_python_legacy_windows_stdio (GH-134080) (GH-134314)
(cherry picked from commit 652d6938ef)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2025-05-20 06:53:44 +00:00
Miss Islington (bot)
07a2033fcf
[3.14] gh-132983: Call Py_XDECREF rather than PyObject_GC_Del in failed __new__ (GH-133962) (#134305)
gh-132983: Call Py_XDECREF rather than PyObject_GC_Del in failed __new__ (GH-133962)

Call Py_XDECREF rather than PyObject_GC_Del in failed __new__

This will call tp_dealloc and clear all members.
(cherry picked from commit e575190abb)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-05-20 02:58:51 +00:00
Miss Islington (bot)
4effd060fc
[3.14] gh-132983: Convert zstd `__new__` methods to Argument Clinic (GH-133860) (#133915)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-20 03:25:24 +01:00
Miss Islington (bot)
e20f05f53f
[3.14] gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288) (#134298)
gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288)

Explain history of de-facto standard and how to pick between the two Base-85 encoding functions in the base-64 module.

---------
(cherry picked from commit 66aaad6103)

Co-authored-by: Alek Binion <aleksander.binion@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2025-05-20 00:05:26 +00:00
Miss Islington (bot)
7cbc3ea8fb
[3.14] gh-134235: Import Autocomplete for Builtin Modules (GH-134277) (#134285)
gh-134235: Import Autocomplete for Builtin Modules (GH-134277)

* added enhancement auto completing import with sys builtins

---------
(cherry picked from commit 8421b03b16)

Co-authored-by: Tom Wang <85062819+tommix626@users.noreply.github.com>
Co-authored-by: Hunter <hyoung3@gmail.com>
2025-05-19 21:46:50 +00:00
Steve Dower
7686c752b3
[3.14] gh-133779: Revert Windows generation of pyconfig.h and go back to a static header. (GH-133966)
Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds.
This was usually the case already, but this change guarantees it in all circumstances.
2025-05-19 21:24:53 +01:00
Miss Islington (bot)
89b744a772
[3.14] gh-125225: Fix column misalignment in help('topics') output (gh-125226) (gh-134225)
The 'help("topics")' output was misaligned due to "ASSIGNMENTEXPRESSIONS"
exceeding the implicit maximum default column width of 19 characters.

Reduced the number of columns from 4 to 3 in the listtopics()
function to allow more space for longer topic names.
(cherry picked from commit b22460c44d)

Co-authored-by: Étienne Pelletier <EtiennePelletier@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-19 17:22:14 +02:00
Miss Islington (bot)
c869898f39
[3.14] gh-128045: Mark unknown opcodes as deopting to themselves (GH-128044) (#134228)
* gh-128045: Mark unknown opcodes as deopting to themselves (GH-128044)
2025-05-19 11:09:15 -04:00
Miss Islington (bot)
7d995ea9fd
[3.14] gh-134214: Fix test case in pyrepl (gh-134223) (gh-134229)
(cherry picked from commit faebf87b37)

Co-authored-by: Jessica Temporal <jtemporal@users.noreply.github.com>
2025-05-19 14:51:46 +00:00
Miss Islington (bot)
a3c3d6f0ef
[3.14] gh-134158: Fix PyREPL coloring of double braces in f/t-strings (gh-134159) (#134227)
Co-authored-by: Loïc Simon <loic.pano@gmail.com>
Co-authored-by: Loïc Simon <loic.simon@napta.io>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-19 17:39:05 +03:00
Miss Islington (bot)
182464eb9e
[3.14] gh-134097: Print number of refs & blocks after each statement in new REPL (gh-134136) (gh-134220)
(cherry picked from commit c31547a591)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-19 16:13:44 +02:00
Miss Islington (bot)
e3cc4008c4
[3.14] gh-122055: Clarify documentation for empty matches in RE (GH-133169) (GH-134217)
(cherry picked from commit 44b73d3cd4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-19 16:49:46 +03:00
Miss Islington (bot)
d9c08c57e9
[3.14] gh-133999: Fix except parsing regression in 3.14 (GH-134035) (#134206)
gh-133999: Fix `except` parsing regression in 3.14 (GH-134035)
(cherry picked from commit 84914ad0e5)

Co-authored-by: sobolevn <mail@sobolevn.me>
2025-05-19 14:26:27 +03:00
Miss Islington (bot)
9136ccfffe
[3.14] gh-76023: Make os.path.realpath to ignore WinError 1005 in non-strict mode (GH-128328) (GH-134203)
(cherry picked from commit d55e11b804)

Co-authored-by: BecoKo <koev_v@yahoo.com>
2025-05-19 09:59:58 +00:00
Stan Ulbrych
91d71ac1bd
[3.14] gh-134060: Don't create a certain symlink in venv if platform does not support it (GH-134061) 2025-05-18 22:33:14 +03:00
Miss Islington (bot)
70735878ab
[3.14] gh-133889: Only show the path of the URL in the SimpleHTTPRequestHandler page (GH-134135) (GH-134190)
The query and fragment are ambiguous and not used.
(cherry picked from commit 5cbc8c632e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-18 22:16:37 +03:00
Miss Islington (bot)
76957eb8cc
[3.14] document Py_VISIT as a macro in the docs (GH-133688) (#134186)
document `Py_VISIT` as a macro in the docs (GH-133688)
(cherry picked from commit bb32f3c698)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2025-05-18 16:34:19 +00:00
Miss Islington (bot)
11650c354f
[3.14] fix indent in controlflow.rst docs (GH-134008) (#134184)
fix indent in `controlflow.rst` docs (GH-134008)
(cherry picked from commit 4ce91871a9)

Co-authored-by: Yongzi Li <1538321957@qq.com>
2025-05-18 16:29:03 +00:00
Miss Islington (bot)
bb5f92adcf
[3.14] gh-134144: Fix use-after-free in zapthreads() (GH-134145) (#134182)
gh-134144: Fix use-after-free in zapthreads() (GH-134145)
(cherry picked from commit f2de1e6861)

Co-authored-by: b-pass <b-pass@users.noreply.github.com>
2025-05-18 15:29:19 +00:00
Miss Islington (bot)
8d51ed6b05
[3.14] gh-134100: Fix use-after-free in PyImport_ImportModuleLevelObject (GH-134117) (#134171)
gh-134100: Fix use-after-free in `PyImport_ImportModuleLevelObject` (GH-134117)
(cherry picked from commit 4e9005d32f)

Co-authored-by: Nico-Posada <102486290+Nico-Posada@users.noreply.github.com>
2025-05-18 20:38:40 +05:30
Miss Islington (bot)
bf39decabd
[3.14] gh-134150: Clarify distinction between JSON and Python objects (GH-134154) (#134166)
gh-134150: Clarify distinction between JSON and Python objects (GH-134154)

* gh-134150: Clarify distinction between JSON objects and Python objects in json module docs

* Revert change to JSON introduction

* Clarify occurrences of "object literal" as JSON
(cherry picked from commit fa4e088668)

Co-authored-by: Micha Albert <micha@2231puppy.tech>
2025-05-18 01:54:00 +00:00
Miss Islington (bot)
eaee2ae033
[3.14] gh-134064: Fix sys.remote_exec() error checking (GH-134067) (#134162)
gh-134064: Fix sys.remote_exec() error checking (GH-134067)
(cherry picked from commit 009e7b3698)

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-05-17 22:50:00 +00:00
Miss Islington (bot)
1ba5e65b76
[3.14] gh-134119: Fix crash from calling next() on exhausted template iterator (GH-134120) (#134153)
gh-134119: Fix crash from calling next() on exhausted template iterator (GH-134120)
(cherry picked from commit fc7f4c3666)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-17 19:48:54 +00:00
Miss Islington (bot)
cca18fcbe8
[3.14] gh-88275: Add missing __init__ method to match example (GH-120281) (#134142)
gh-88275: Add missing `__init__` method to `match` example (GH-120281)
(cherry picked from commit 7a9d46295a)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
2025-05-17 13:17:23 +00:00
Miss Islington (bot)
b43e1d0b48
[3.14] Docs: fix spelling of "test case" in unittest documentation (GH-134137) (#134138)
Docs: fix spelling of "test case" in `unittest` documentation (GH-134137)
(cherry picked from commit b41d79c776)

Co-authored-by: Clifford Gama <53076065+cliff688@users.noreply.github.com>
2025-05-17 14:03:33 +02:00