]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Erlend E. Aasland [Mon, 27 Jan 2025 17:16:19 +0000 (18:16 +0100)]
gh-129346: Handle allocation errors for SQLite aggregate context (#129347)
Sam Gross [Mon, 27 Jan 2025 17:14:51 +0000 (12:14 -0500)]
gh-128954: Reorder _PyInterpreterFrame fields for reduced memory usage (#128958)
This reduces the size of _PyInterpreterFrame by 8 bytes on 64-bit
platforms using the free threading build due to alignment requirements.
This allows for slightly more recursive calls into the interpreter (from
C), but `test_call.test_super_deep` still crashes.
Victor Stinner [Mon, 27 Jan 2025 17:04:45 +0000 (18:04 +0100)]
gh-129205: Modernize test_eintr (#129316)
* Use f-string.
* Fix grammar: replace 'datas' with 'data' (and replace 'data' with
'item').
* Remove unused variables: 'pid' and 'old_mask'.
* Factorize test_read() and test_readinto() code.
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Mark Shannon [Mon, 27 Jan 2025 16:24:48 +0000 (16:24 +0000)]
GH-128914: Remove all but one conditional stack effects (GH-129226)
* Remove all 'if (0)' and 'if (1)' conditional stack effects
* Use array instead of conditional for BUILD_SLICE args
* Refactor LOAD_GLOBAL to use a common conditional uop
* Remove conditional stack effects from LOAD_ATTR specializations
* Replace conditional stack effects in LOAD_ATTR with a 0 or 1 sized array.
* Remove conditional stack effects from CALL_FUNCTION_EX
Nick Pope [Mon, 27 Jan 2025 16:17:17 +0000 (16:17 +0000)]
gh-128427: Add `uuid.NIL` and `uuid.MAX` (#128429)
Victor Stinner [Mon, 27 Jan 2025 15:06:07 +0000 (16:06 +0100)]
Cleanup What's New in Python 3.14 (C API changes) (#129341)
* Document PyDictObject.ma_version_tag removal.
* Add "Limited C API Changes" section.
* Move entries from New Features to Porting to Python 3.14.
* Include Pending removal documents at the right place.
Sergey Miryanov [Mon, 27 Jan 2025 14:36:09 +0000 (06:36 -0800)]
gh-119786: Fix small typo in AST to CFG to bytecode section in compiler.md (#129322)
Hugo van Kemenade [Mon, 27 Jan 2025 14:24:10 +0000 (16:24 +0200)]
gh-129061: Fix `FORCE_COLOR` and `NO_COLOR` when empty strings (#129140)
Bénédikt Tran [Mon, 27 Jan 2025 14:15:42 +0000 (15:15 +0100)]
gh-111178: fix UBSan failures in `Modules/_decimal` (GH-129074)
* Introduce & use cast macros
* fix UBSan failures for `PyDecContextObject`
* fix UBSan failures for `PyDecContextManagerObject`
* remove redundant casts for `PyDecObject`
Bénédikt Tran [Mon, 27 Jan 2025 14:07:39 +0000 (15:07 +0100)]
gh-111178: fix UBSan failures in `Python/traceback.c` (GH-128259)
Bénédikt Tran [Mon, 27 Jan 2025 14:06:10 +0000 (15:06 +0100)]
gh-111178: fix UBSan failures in `Modules/socketmodule.c` (GH-128249)
Bénédikt Tran [Mon, 27 Jan 2025 13:50:58 +0000 (14:50 +0100)]
gh-111178: fix UBSan failures in `Modules/{blake2,md5,sha1,sha2,sha3}module.c` (GH-128248)
- fix UBSan failures in `blake2module.c`
- fix UBSan failures in `md5module.c`
- fix UBSan failures in `sha1module.c`
- fix UBSan failures in `sha2module.c`
- fix UBSan failures in `sha3module.c`
Cosmetics:
- suppress unused return values
- remove redundant casts in constructors
- suppress unused parameters in `{md5,sha*,blake2}module.c`
Serhiy Storchaka [Mon, 27 Jan 2025 13:44:00 +0000 (15:44 +0200)]
gh-119511: Fix a potential denial of service in imaplib (#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.
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Peter Bierma [Mon, 27 Jan 2025 13:36:33 +0000 (08:36 -0500)]
gh-128509: Add `PyUnstable_IsImmortal` for finding immortal objects (GH-129182)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Victor Stinner [Mon, 27 Jan 2025 10:51:16 +0000 (11:51 +0100)]
gh-102471: Change PyLongWriter_Discard(NULL) to do nothing (#129339)
It's convenient to be able to call PyLongWriter_Discard(NULL) in
error handling code.
Victor Stinner [Mon, 27 Jan 2025 10:44:13 +0000 (11:44 +0100)]
gh-102471: Credit Sergey B Kirpichev for PEP 757 (#129338)
Ken Jin [Mon, 27 Jan 2025 10:30:20 +0000 (18:30 +0800)]
gh-128563: Move labels in ceval.c to bytecodes.c (GH-129112)
Tian Gao [Mon, 27 Jan 2025 03:29:16 +0000 (22:29 -0500)]
gh-124703: Do not raise an exception when quitting pdb (#124704)
Zanie Blue [Mon, 27 Jan 2025 02:53:24 +0000 (20:53 -0600)]
gh-129156: Fix variable quoting in `android-env.sh` script (#129321)
Adds quoting to `android-env.sh` to protect against spaces in paths.
Alex Willmer [Sun, 26 Jan 2025 19:00:28 +0000 (19:00 +0000)]
gh-115911: Ignore PermissionError during import from cwd (#116131)
Ignore PermissionError when checking cwd during import
On macOS `getcwd(3)` can return EACCES if a path component isn't readable,
resulting in PermissionError. `PathFinder.find_spec()` now catches these and
ignores them - the same treatment as a missing/deleted cwd.
Introduces `test.support.os_helper.save_mode(path, ...)`, a context manager
that restores the mode of a path on exit.
This is allows finer control of exception handling and robust environment
restoration across platforms in `FinderTests.test_permission_error_cwd()`.
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Brett Cannon <brett@python.org>
Andrey Efremov [Sun, 26 Jan 2025 18:33:07 +0000 (01:33 +0700)]
gh-127096: Do not recreate unnamed section on every read in ConfigParser (#127228)
* Do not recreate unnamed section on every read in ConfigParser
* Remove duplicate section creation code
donBarbos [Sun, 26 Jan 2025 16:57:32 +0000 (16:57 +0000)]
gh-126107: Remove copyright block from Modules/config.c.in (#126982)
chore: remove copyright block from config.c.in
Jason R. Coombs [Sun, 26 Jan 2025 16:23:54 +0000 (11:23 -0500)]
gh-123987: Fix NotADirectoryError in NamespaceReader when sentinel present (#124018)
Thomas Grainger [Sun, 26 Jan 2025 15:44:16 +0000 (15:44 +0000)]
gh-129195: use `future_add_to_awaited_by/future_discard_from_awaited_by` in `asyncio.staggered.staggered_race` (#129253)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
partev [Sun, 26 Jan 2025 14:46:00 +0000 (09:46 -0500)]
gh-126022: Remove zope.org from the permitted linkcheck redirects (#129308)
Cody Maloney [Sun, 26 Jan 2025 13:21:03 +0000 (05:21 -0800)]
gh-129205: Add os.readinto() API for reading data into a caller provided buffer (#129211)
Add a new OS API which will read data directly into a caller provided
writeable buffer protocol object.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Adam Turner [Sun, 26 Jan 2025 03:43:23 +0000 (03:43 +0000)]
GH-121970: Remove pyspecific ``PyDecoratorMixin`` patches (#129306)
Kumar Aditya [Sat, 25 Jan 2025 18:20:09 +0000 (23:50 +0530)]
gh-128421: make exception group methods thread safe (#129298)
Victor Stinner [Sat, 25 Jan 2025 17:19:48 +0000 (18:19 +0100)]
gh-129223: Raise KeyError in search_map_for_section() if not found (#129262)
Pablo Galindo Salgado [Sat, 25 Jan 2025 16:54:20 +0000 (16:54 +0000)]
gh-129271: Fix reference leak with unicode writer in fast path in the json module (#129272)
Hugo van Kemenade [Sat, 25 Jan 2025 13:36:58 +0000 (15:36 +0200)]
gh-126022: make license.rst consistent with LICENSE: fix underline (#129292)
Irit Katriel [Sat, 25 Jan 2025 13:00:23 +0000 (13:00 +0000)]
gh-128799: Add frame of except* to traceback when wrapping a naked exception (#128971)
Michael Droettboom [Sat, 25 Jan 2025 12:56:13 +0000 (07:56 -0500)]
gh-129244: Remove workaround for MSVC compiler crash (#129263)
* Remove compiler workaround
* Remote _Py_USING_PGO
partev [Sat, 25 Jan 2025 11:41:32 +0000 (06:41 -0500)]
gh-126022: make license.rst consistent with LICENSE (#128516)
Chris Eibl [Sat, 25 Jan 2025 10:33:26 +0000 (11:33 +0100)]
Remove unused DPRINTF in ceval.c (GH-129282)
remove unused DPRINTF in ceval.c
sobolevn [Sat, 25 Jan 2025 09:44:23 +0000 (12:44 +0300)]
Replace `strict_concatenate = True` with `extra_checks = True` (#126391)
Russell Keith-Magee [Sat, 25 Jan 2025 08:49:39 +0000 (16:49 +0800)]
gh-129248: Filter out the iOS log prefix from testbed runner output. (#129252)
Filter out the iOS log prefix from testbed runner output.
Adam Turner [Sat, 25 Jan 2025 03:47:55 +0000 (03:47 +0000)]
GH-125722: Remove Sphinx patches (#129277)
Bénédikt Tran [Sat, 25 Jan 2025 01:04:31 +0000 (02:04 +0100)]
gh-111178: fix UBSan failures in `Modules/cjkcodecs/multibytecodec.c` (gh-129090)
Giles Copp [Fri, 24 Jan 2025 22:31:52 +0000 (17:31 -0500)]
gh-112713 : Add support for 'partitioned' attribute in http.cookies (GH-112714)
* Add support for 'partitioned' attribute in http.cookies
Co-authored-by: Giles Copp <gilesc@dropbox.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
Pablo Galindo Salgado [Fri, 24 Jan 2025 20:36:32 +0000 (20:36 +0000)]
gh-129223: Do not allow the compiler to optimise away symbols for debug sections (#129225)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Kumar Aditya [Fri, 24 Jan 2025 17:40:24 +0000 (23:10 +0530)]
gh-128002: fix `test_all_tasks_different_thread` in asyncio (#129267)
Serhiy Storchaka [Fri, 24 Jan 2025 16:33:40 +0000 (18:33 +0200)]
Improve tests for _colorize.can_colorize() (#129234)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Kumar Aditya [Fri, 24 Jan 2025 15:42:56 +0000 (21:12 +0530)]
gh-128002: use `_PyObject_SetMaybeWeakref` when creating tasks in asyncio (#128885)
Victor Stinner [Fri, 24 Jan 2025 13:29:36 +0000 (14:29 +0100)]
gh-129185: Simplify PyTraceMalloc_Track() (#129256)
Since tracemalloc uses PyMutex, it becomes safe to use TABLES_LOCK()
even after _PyTraceMalloc_Fini(): remove the "pre-check" in
PyTraceMalloc_Track() and PyTraceMalloc_Untrack().
PyTraceMalloc_Untrack() no longer needs to acquire the GIL.
_PyTraceMalloc_Fini() can be called earlier during Python
finalization.
Sergey B Kirpichev [Fri, 24 Jan 2025 12:17:10 +0000 (15:17 +0300)]
gh-128863: Deprecate _PyLong_FromDigits() function (#127939)
Sergey B Kirpichev [Fri, 24 Jan 2025 11:05:52 +0000 (14:05 +0300)]
gh-127937: Convert decimal to use PEP 757 import API (#127925)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Fri, 24 Jan 2025 10:38:13 +0000 (11:38 +0100)]
gh-119182: Use public PyUnicodeWriter in _json.c (#129249)
Replace the private _PyUnicodeWriter API with the public
PyUnicodeWriter API.
Victor Stinner [Fri, 24 Jan 2025 10:25:24 +0000 (11:25 +0100)]
gh-129185: Use PyMutex in tracemalloc (#129246)
Bénédikt Tran [Fri, 24 Jan 2025 10:25:03 +0000 (11:25 +0100)]
gh-129173: Use `_PyUnicodeError_GetParams` in `PyCodec_IgnoreErrors` (#129174)
We also cleanup `PyCodec_StrictErrors` and the error message rendered
when an object of incorrect type is passed to codec error handlers.
Victor Stinner [Thu, 23 Jan 2025 23:31:49 +0000 (00:31 +0100)]
gh-119182: Use public PyUnicodeWriter in stringio.c (#129243)
Replace the private _PyUnicodeWriter API with the public
PyUnicodeWriter API.
Jeong, YunWon [Thu, 23 Jan 2025 21:20:40 +0000 (06:20 +0900)]
gh-109975: Add list of 3.13 removed library replacements (#127816)
Add list of 3.13 removed library replacements
Łukasz Langa [Thu, 23 Jan 2025 18:26:36 +0000 (19:26 +0100)]
gh-91048: Also clear and set ts->asyncio_running_task with eager tasks (#129197)
This was missing from gh-124640. It's already covered by the new
test_asyncio/test_free_threading.py in combination with the runtime
assertion in set_ts_asyncio_running_task.
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Terry Jan Reedy [Thu, 23 Jan 2025 18:25:14 +0000 (13:25 -0500)]
gh-71339: Use new assertion methods in test_idle (#129213)
Revise 10 tests in 7 files, with 1 test split into 2.
sobolevn [Thu, 23 Jan 2025 18:08:51 +0000 (21:08 +0300)]
gh-91048: Improve example in `asyncio-graph.rst` doc (#129224)
Andy Fiddaman [Thu, 23 Jan 2025 17:30:08 +0000 (17:30 +0000)]
gh-128330: Terminal control characters should be restored on repl exit (#128331)
Thomas Grainger [Thu, 23 Jan 2025 15:53:53 +0000 (15:53 +0000)]
gh-128479: fix asyncio staggered race leaking tasks, and logging unhandled exception.append exception (#128475)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Bénédikt Tran [Thu, 23 Jan 2025 15:06:16 +0000 (16:06 +0100)]
gh-126004: Remove redundant safeguards for codecs handlers tests (#127680)
We remove the safeguards that were added in `Lib/test/test_capi/test_codecs.py`
since they are now redundant (see
32e07fd377f81cbeb8c108fc791a3e7d631319b6
for additional context).
Indeed, the codecs handlers now correctly handle the `start` and `end` positions
of `UnicodeError` objects and thus should not crash.
Victor Stinner [Thu, 23 Jan 2025 14:50:04 +0000 (15:50 +0100)]
gh-128690: Update test_embed for getpath.py exec_prefix change (#129137)
Bénédikt Tran [Thu, 23 Jan 2025 14:49:36 +0000 (15:49 +0100)]
gh-118761: Improve import time for `pstats` and `zipfile` (#128981)
Importing `pstats` or `zipfile` is now roughly 20% faster.
This is achieved by removing type annotations depending on `typing`.
gh-129149: Add fast path in PYLONG_FROM_UINT macro for compact integers (#129168)
Add fast path in PyLong_From*() functions for compact integers.
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Sergey B Kirpichev [Thu, 23 Jan 2025 13:55:25 +0000 (16:55 +0300)]
gh-101410: support custom messages for domain errors in the math module (#124299)
This adds basic support to override default messages for domain errors
in the math_1() helper. The sqrt(), atanh(), log2(), log10() and log()
functions were modified as examples. New macro supports gradual
changing of error messages in other 1-arg functions.
Co-authored-by: CharlieZhao <zhaoyu_hit@qq.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Bénédikt Tran [Thu, 23 Jan 2025 13:28:33 +0000 (14:28 +0100)]
gh-126004: Fix positions handling in `codecs.backslashreplace_errors` (#127676)
This fixes how `PyCodec_BackslashReplaceErrors` handles the `start` and `end`
attributes of `UnicodeError` objects via the `_PyUnicodeError_GetParams` helper.
Sergey B Kirpichev [Thu, 23 Jan 2025 12:50:34 +0000 (15:50 +0300)]
gh-128863: Deprecate _PyLong_New() function (#129212)
Victor Stinner [Thu, 23 Jan 2025 12:49:35 +0000 (13:49 +0100)]
gh-129185: Remove internal TRACE_RAW_MALLOC macro (#129218)
Always build tracemalloc with PyMem_RawMalloc() hooks.
Victor Stinner [Thu, 23 Jan 2025 11:07:34 +0000 (12:07 +0100)]
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().
Bénédikt Tran [Thu, 23 Jan 2025 10:44:18 +0000 (11:44 +0100)]
gh-126004: Fix positions handling in `codecs.replace_errors` (#127674)
This fixes how `PyCodec_ReplaceErrors` handles the `start` and `end` attributes
of `UnicodeError` objects via the `_PyUnicodeError_GetParams` helper.
Bénédikt Tran [Thu, 23 Jan 2025 10:42:38 +0000 (11:42 +0100)]
gh-126004: Fix positions handling in `codecs.xmlcharrefreplace_errors` (#127675)
This fixes how `PyCodec_XMLCharRefReplaceErrors` handles the `start` and `end`
attributes of `UnicodeError` objects via the `_PyUnicodeError_GetParams` helper.
Sam Gross [Thu, 23 Jan 2025 09:26:25 +0000 (04:26 -0500)]
Revert "GH-128914: Remove conditional stack effects from `bytecodes.c` and the code generators (GH-128918)" (GH-129202)
The commit introduced a ~2.5-3% regression in the free threading build.
This reverts commit
ab61d3f4303d14a413bc9ae6557c730ffdf7579e .
Sergey B Kirpichev [Thu, 23 Jan 2025 02:54:23 +0000 (05:54 +0300)]
gh-127936, PEP 757: Convert marshal module to use import/export API for ints (#128530)
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Victor Stinner [Thu, 23 Jan 2025 02:11:53 +0000 (03:11 +0100)]
gh-128863: Deprecate _PyLong_Sign() function (#129176)
Replace _PyLong_Sign() with PyLong_GetSign().
Victor Stinner [Thu, 23 Jan 2025 00:57:37 +0000 (01:57 +0100)]
gh-119182: Use public PyUnicodeWriter in Python-ast.c (#129209)
Replace the private _PyUnicodeWriter API with the public
PyUnicodeWriter API.
Use PyUnicodeWriter_WriteRepr() in ast_repr_list().
Victor Stinner [Thu, 23 Jan 2025 00:44:43 +0000 (01:44 +0100)]
gh-119182: Use public PyUnicodeWriter in ast_unparse.c (#129208)
Replace the private _PyUnicodeWriter API with the public
PyUnicodeWriter API.
* Add append_char() function.
* Add APPEND_CHAR() and APPEND_CHAR_FINISH() macros.
* Replace APPEND_STR() and APPEND_STR_FINISH() of single character
with APPEND_CHAR() and APPEND_CHAR_FINISH().
Victor Stinner [Thu, 23 Jan 2025 00:18:26 +0000 (01:18 +0100)]
gh-119182: Use public PyUnicodeWriter in wrap_strftime() (#129206)
Replace the private _PyUnicodeWriter API with the public
PyUnicodeWriter API.
Victor Stinner [Thu, 23 Jan 2025 00:18:03 +0000 (01:18 +0100)]
gh-119182: Use public PyUnicodeWriter in time_strftime() (#129207)
Replace the private _PyUnicodeWriter API with the public
PyUnicodeWriter API.
Hood Chatham [Thu, 23 Jan 2025 00:02:04 +0000 (00:02 +0000)]
gh-128627: Emscripten: Fix address calculation for wasm-gc trampoline (#128782)
Modifies the memory calculation to divide the entire memory address by 4, not just the base address.
Hugo van Kemenade [Wed, 22 Jan 2025 21:22:21 +0000 (23:22 +0200)]
Add colour to GitHub Actions output (#129196)
Kirill Podoprigora [Wed, 22 Jan 2025 20:39:26 +0000 (22:39 +0200)]
gh-129192: Use `EnvironmentVarGuard` to restore environment variables (#129193)
Co-authored-by: Cody Maloney <cmaloney@theoreticalchaos.com>
Łukasz Langa [Wed, 22 Jan 2025 18:27:58 +0000 (19:27 +0100)]
GH-91048: Don't attempt to run on FreeBSD (#129189)
Yury Selivanov [Wed, 22 Jan 2025 16:25:29 +0000 (08:25 -0800)]
GH-91048: Add utils for capturing async call stack for asyncio programs and enable profiling (#124640)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
Co-authored-by: Jacob Coffee <jacob@z7x.org>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Pablo Galindo Salgado [Wed, 22 Jan 2025 16:24:54 +0000 (16:24 +0000)]
gh-124363: Treat debug expressions in f-string as raw strings (#128399)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Tomas R. [Wed, 22 Jan 2025 16:15:23 +0000 (17:15 +0100)]
gh-128636: Fix crash in PyREPL when `os.environ` is overwritten with an invalid value (#128653)
Łukasz Langa [Wed, 22 Jan 2025 13:52:45 +0000 (14:52 +0100)]
gh-129158: Fix unwanted trailing whitespace in test_asyncio.test_subprocess (#129181)
Mikhail Efimov [Wed, 22 Jan 2025 12:50:01 +0000 (15:50 +0300)]
gh-125723: Fix crash with f_locals when generator frame outlive their generator (#126956)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Thomas Grainger [Wed, 22 Jan 2025 12:48:33 +0000 (12:48 +0000)]
gh-128770: fix ResourceWarning in test_pyrepl (#128906)
sobolevn [Wed, 22 Jan 2025 12:47:03 +0000 (15:47 +0300)]
gh-128894: Fix `TracebackException._format_syntax_error` on custom `SyntaxError` metadata (#128946)
Pablo Galindo Salgado [Wed, 22 Jan 2025 12:25:42 +0000 (12:25 +0000)]
gh-129158: Ensure we restore unix_events.can_use_pidfd after SubprocessThreadedWatcherTests finishes (#129160)
Victor Stinner [Wed, 22 Jan 2025 11:04:19 +0000 (12:04 +0100)]
gh-128863: Deprecate private C API functions (#128864)
Deprecate private C API functions:
* _PyBytes_Join()
* _PyDict_GetItemStringWithError()
* _PyDict_Pop()
* _PyThreadState_UncheckedGet()
* _PyUnicode_AsString()
* _Py_HashPointer()
* _Py_fopen_obj()
Replace _Py_HashPointer() with Py_HashPointer().
Remove references to deprecated functions.
Mark Shannon [Wed, 22 Jan 2025 10:51:37 +0000 (10:51 +0000)]
GH-128682: Change a couple of functions to only steal references on success. (GH-129132)
Change PyTuple_FromStackRefSteal and PyList_FromStackRefSteal to only steal on success to avoid escaping
Petr Viktorin [Wed, 22 Jan 2025 09:59:20 +0000 (10:59 +0100)]
gh-61103: Add What's New entry for complex types in ctypes (GH-129129)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Joshua Root [Wed, 22 Jan 2025 09:25:30 +0000 (20:25 +1100)]
gh-128902: Fix check for fallthrough attribute support (#128903)
Clang versions prior to 10 (which corresponds to Apple Clang 12) do not
support the GCC extension syntax __attribute__((fallthrough)), but do
evaluate __has_attribute(fallthrough) to 1 because they support the
C++11 style syntax [[fallthrough]]. The only way to tell if the GCC
style syntax is supported is thus to check the clang version.
Ref: https://github.com/llvm/llvm-project/commit/
1e0affb6e564b7361b0aadb38805f26deff4ecfc
Ken Jin [Wed, 22 Jan 2025 01:22:25 +0000 (09:22 +0800)]
gh-128563: Move GO_TO_INSTRUCTION and PREDICT to cases generator (GH-129115)
Tomas R. [Wed, 22 Jan 2025 00:26:37 +0000 (01:26 +0100)]
gh-129093: Fix f-string debug text sometimes getting cut off when expression contains `!` (#129159)
Adam Turner [Tue, 21 Jan 2025 23:28:32 +0000 (23:28 +0000)]
GH-121970: Extract ``pydoc_topics`` into a new extension (#129116)
Daniel Hollas [Tue, 21 Jan 2025 21:06:13 +0000 (21:06 +0000)]
gh-118878: Pyrepl: show completions menu below the current line (#118939)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Lysandros Nikolaou [Tue, 21 Jan 2025 21:04:30 +0000 (22:04 +0100)]
gh-123024: Correctly prepare/restore around help and show-history commands (#124485)
Co-authored-by: Emily Morehouse <emily@cuttlesoft.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Pieter Eendebak [Tue, 21 Jan 2025 20:14:10 +0000 (21:14 +0100)]
gh-126332: Fix pyrepl crash for double ctrl-z in line overflow (#126650)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Michael Kashirin [Tue, 21 Jan 2025 20:05:19 +0000 (23:05 +0300)]
gh-126172: Fix a misleading statement in PYTHON_BASIC_REPL documentation (#127203)
Fix a misleading statement in PYTHON_BASIC_REPL documentation.
Sergey B Kirpichev [Tue, 21 Jan 2025 20:04:07 +0000 (23:04 +0300)]
gh-122845: fix parameter_list_starargs in function definition pseudo-grammar (#122847)
Thanks to Artur Chakhvadze for bugfix.
Tomas R. [Tue, 21 Jan 2025 19:58:44 +0000 (20:58 +0100)]
gh-125553: Fix backslash continuation in `untokenize` (#126010)