]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 months ago[3.14] gh-134989: Fix Py_RETURN_NONE in the limited C API (GH-135165) (#135178)
Miss Islington (bot) [Thu, 5 Jun 2025 13:35:54 +0000 (15:35 +0200)] 
[3.14] gh-134989: Fix Py_RETURN_NONE in the limited C API (GH-135165) (#135178)

gh-134989: Fix Py_RETURN_NONE in the limited C API (GH-135165)

Fix Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE macros in the
limited C API 3.11 and older:
Don't treat Py_None, Py_True and Py_False as immortal.
(cherry picked from commit 9258f3da9175134d03f2c8c7c7eed223802ad945)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 months ago[3.14] gh-135124: Change stdout errors in regrtest worker process (GH-135138) (#135168)
Miss Islington (bot) [Thu, 5 Jun 2025 09:42:38 +0000 (11:42 +0200)] 
[3.14] gh-135124: Change stdout errors in regrtest worker process (GH-135138) (#135168)

gh-135124: Change stdout errors in regrtest worker process (GH-135138)

Set sys.stdout encoder error handler to backslashreplace in regrtest
workers to avoid UnicodeEncodeError when printing a traceback
or any other non-encodable character.

Move the code from the Regrtest class to setup_process().

Call setup_process() earlier, before displaying regrtest headers.
(cherry picked from commit 3d396ab7591d544ac8bc1fb49615b4e867ca1c83)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 months ago[3.14] gh-131531: android.py enhancements to support cibuildwheel (GH-132870) (#135158)
Miss Islington (bot) [Thu, 5 Jun 2025 06:24:52 +0000 (08:24 +0200)] 
[3.14] gh-131531: android.py enhancements to support cibuildwheel (GH-132870) (#135158)

Modifies the environment handling and execution arguments of the Android management
script to support the compilation of third-party binaries, and the use of the testbed to
invoke third-party test code.
(cherry picked from commit 2e1544fd2b0cd46ba93fc51e3cdd47f4781d7499)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
5 months ago[3.14] gh-135144: Add `_remote_debugging` to the MSI (legacy) Windows installers...
Miss Islington (bot) [Wed, 4 Jun 2025 20:08:52 +0000 (22:08 +0200)] 
[3.14] gh-135144: Add `_remote_debugging` to the MSI (legacy) Windows installers. (GH-135145) (#135150)

(cherry picked from commit e598eecf4c97509acef517e94053e45db51636fb)

Co-authored-by: T. Wouters <thomas@python.org>
5 months ago[3.14] gh-129876: Update IDLE News3.txt to May 2025 (GH-135139) (#135140)
Miss Islington (bot) [Wed, 4 Jun 2025 15:52:53 +0000 (17:52 +0200)] 
[3.14] gh-129876: Update IDLE News3.txt to May 2025 (GH-135139) (#135140)

gh-129876: Update IDLE News3.txt to May 2025 (GH-135139)
(cherry picked from commit 0df15d0d4d55dcf7b7a7f4b2985bf84fd092d257)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
5 months ago[3.14] gh-134989: Implement PyObject_DelAttr() as a macro in the limited C API (GH...
Miss Islington (bot) [Wed, 4 Jun 2025 13:33:20 +0000 (15:33 +0200)] 
[3.14] gh-134989: Implement PyObject_DelAttr() as a macro in the limited C API (GH-135021) (#135133)

gh-134989: Implement PyObject_DelAttr() as a macro in the limited C API (GH-135021)
(cherry picked from commit c21113072cd1f0da83729f99d3576647db85d816)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 months ago[3.14] gh-126483: disable warnings filters mutation in concurrent test (GH-132694...
Miss Islington (bot) [Wed, 4 Jun 2025 13:25:47 +0000 (15:25 +0200)] 
[3.14] gh-126483: disable warnings filters mutation in concurrent test (GH-132694) (GH-135131)

The `test_ssl_in_multiple_threads` test failed because `test_check_hostname_idn()`
modified the global warnings filters via `warnings_helper.check_no_resource_warning()`.
Only check for warnings when the context aware warnings feature is enabled, which makes
the warnings filter context-local and thread-safe.
(cherry picked from commit 40c8be0008ecadb5d0dc9a017434b1133a3a6e06)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
5 months ago[3.14] gh-135074: Fix exception messages in test.support module (GH-135076) (GH-135129)
Miss Islington (bot) [Wed, 4 Jun 2025 13:25:15 +0000 (15:25 +0200)] 
[3.14] gh-135074: Fix exception messages in test.support module (GH-135076) (GH-135129)

(cherry picked from commit bc00ce941e03347dade3faa8822f19836b5bbfe4)

Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
5 months ago[3.14] gh-135108: Fix utmp.h inclusion in posixmodule.c on NetBSD (GH-135109) (GH...
Miss Islington (bot) [Wed, 4 Jun 2025 13:16:39 +0000 (15:16 +0200)] 
[3.14] gh-135108: Fix utmp.h inclusion in posixmodule.c on NetBSD (GH-135109) (GH-135127)

(cherry picked from commit 5b3865418ceb1448bfbf15cddf52c900cd5882a3)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
5 months ago[3.14] gh-135099: Only wait on `_PyOS_SigintEvent()` in main thread (GH-135100) ...
Miss Islington (bot) [Wed, 4 Jun 2025 12:44:35 +0000 (14:44 +0200)] 
[3.14] gh-135099: Only wait on `_PyOS_SigintEvent()` in main thread (GH-135100) (GH-135116)

On Windows, the `_PyOS_SigintEvent()` event handle is used to interrupt
the main thread when Ctrl-C is pressed. Previously, we also waited on
the event from other threads, but ignored the result. However, this can
race with interpreter shutdown because the main thread closes the handle
in `_PySignal_Fini` and threads may still be running and using mutexes
during interpreter shtudown.

Only use `_PyOS_SigintEvent()` in the main thread in parking_lot.c, like
we do in other places in the CPython codebase.
(cherry picked from commit cc581f32bf5f15e9f2f89b830ec64ea25684d0cd)

Co-authored-by: Sam Gross <colesbury@gmail.com>
5 months ago[3.14] Use a more clear example for the PEP 758 what's new section (GH-135118) (...
Miss Islington (bot) [Wed, 4 Jun 2025 09:28:59 +0000 (11:28 +0200)] 
[3.14] Use a more clear example for the PEP 758 what's new section (GH-135118) (#135119)

Use a more clear example for the PEP 758 what's new section (GH-135118)
(cherry picked from commit 1f515104441898111c20aca5a7bbda1d11b15d36)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
5 months ago[3.14] gh-135101: When choosing the default simulator device, don't use `simctl ...
Miss Islington (bot) [Wed, 4 Jun 2025 00:57:45 +0000 (02:57 +0200)] 
[3.14] gh-135101: When choosing the default simulator device, don't use `simctl --set testing` (GH-135102) (#135113)

On a fresh Xcode install (including some CI provider configurations), there is
no pre-existing testing set that can be used to identify simulator models. Use
the default device set to detect available models instead. Live testing
simulators are still created in the testing set.
(cherry picked from commit dba9de731b231ca0c079205f496d1e3d178b4fd3)

Co-authored-by: Joe Rickerby <joerick@mac.com>
5 months ago[3.14] gh-127081: use `getlogin_r` if available (gh-132751) (gh-135097)
Miss Islington (bot) [Tue, 3 Jun 2025 18:41:47 +0000 (20:41 +0200)] 
[3.14] gh-127081: use `getlogin_r` if available (gh-132751) (gh-135097)

The `getlogin` function is not thread-safe: replace with `getlogin_r` where
available.
(cherry picked from commit 1ffe913c2017b44804aca18befd45689df06c069)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
5 months ago[3.14] gh-134248 test_getallocatedblocks pre-check to ignore immortalized strings...
Miss Islington (bot) [Tue, 3 Jun 2025 16:26:32 +0000 (18:26 +0200)] 
[3.14] gh-134248 test_getallocatedblocks pre-check to ignore immortalized strings (GH-134871) (#135095)

gh-134248 test_getallocatedblocks pre-check to ignore immortalized strings (GH-134871)

When sanity checking against gettotalrefcount(), we exclude the blocks for
immortalized strings since their references are not tracked/reported. This
now matches refleak.py's book-keeping using the same functions.
(cherry picked from commit 54ca55978e305ebb099d1b49633211597625bd52)

Co-authored-by: tpburns <trevorpburns@gmail.com>
5 months ago[3.14] gh-128605: Add branch protections for x86_64 in asm_trampoline.S (#128606...
stratakis [Tue, 3 Jun 2025 13:31:06 +0000 (15:31 +0200)] 
[3.14] gh-128605: Add branch protections for x86_64 in asm_trampoline.S (#128606) (#135077)

Apply Intel Control-flow Technology for x86-64 on asm_trampoline.S.

Required for mitigation against return-oriented programming (ROP)
and Call or Jump Oriented Programming (COP/JOP) attacks.

Manual application is required for the assembly files.

See also: https://sourceware.org/annobin/annobin.html/Test-cf-protection.html

5 months ago[3.14] gh-135028: Increase parser MAXSTACK for nested parenthesis (GH-135031) (#135059)
Miss Islington (bot) [Tue, 3 Jun 2025 12:23:06 +0000 (14:23 +0200)] 
[3.14] gh-135028: Increase parser MAXSTACK for nested parenthesis (GH-135031) (#135059)

gh-135028: Increase parser MAXSTACK for nested parenthesis (GH-135031)
(cherry picked from commit 6e80f11eb5eba360334b4ace105eb7d73394baf7)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 months ago[3.14] gh-135034: Normalize link targets in tarfile, add `os.path.realpath(strict...
Łukasz Langa [Tue, 3 Jun 2025 12:05:00 +0000 (14:05 +0200)] 
[3.14] gh-135034: Normalize link targets in tarfile, add `os.path.realpath(strict='allow_missing')` (gh-135037) (gh-135065)

Addresses CVEs 2024-12718, 2025-4138, 2025-4330, and 2025-4517.

(cherry picked from commit 3612d8f51741b11f36f8fb0494d79086bac9390a)

Signed-off-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] gh-134875: Fix mimallc build error for the old compilers (gh-134994) (gh-135053)
Miss Islington (bot) [Tue, 3 Jun 2025 08:03:36 +0000 (10:03 +0200)] 
[3.14] gh-134875: Fix mimallc build error for the old compilers (gh-134994) (gh-135053)

gh-134875: Fix mimallc build error for the old compilers (gh-134994)
(cherry picked from commit b525e31b7fc50e7a498f8b9b16437cb7b9656f6f)

Co-authored-by: Donghee Na <donghee.na@python.org>
5 months ago[3.14] gh-134830: Fix reference in `Doc/extending/windows.rst` (GH-134831) (GH-135058)
Miss Islington (bot) [Tue, 3 Jun 2025 06:33:04 +0000 (08:33 +0200)] 
[3.14] gh-134830: Fix reference in `Doc/extending/windows.rst` (GH-134831) (GH-135058)

(cherry picked from commit 0ac9e17fb47075c9446b99da4dffe4cad993b97a)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
5 months ago[3.14] gh-132813: Improve error messages for incorrect types and values of csv.Dialog...
Miss Islington (bot) [Mon, 2 Jun 2025 21:01:18 +0000 (23:01 +0200)] 
[3.14] gh-132813: Improve error messages for incorrect types and values of csv.Dialog attributes (GH-133241) (GH-135050)

Make them similar to PyArg_Parse error messages, mention None as
a possible value, show a wrong type and the string length.
(cherry picked from commit df98a47a61a274eb7427c6201ddabec9ffd30b0a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] gh-133454: Mark test_queue tests with many threads as bigmem (gh-134575) ...
Miss Islington (bot) [Mon, 2 Jun 2025 20:50:43 +0000 (22:50 +0200)] 
[3.14] gh-133454: Mark test_queue tests with many threads as bigmem (gh-134575) (GH-135046)

50 producer and 50 consumer threads need more than 5GB of memory.
(cherry picked from commit 7a79f52d83c22f5a9787e590f267325c1175d389)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] gh-74232: Add a note about roundtrip of non-float numerics in CSV (GH-134963...
Miss Islington (bot) [Mon, 2 Jun 2025 20:43:45 +0000 (22:43 +0200)] 
[3.14] gh-74232: Add a note about roundtrip of non-float numerics in CSV (GH-134963) (GH-135048)

(cherry picked from commit e814f43f2c655b931af8ee9e1c128bd1027549fb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] gh-134908: Protect `textiowrapper_iternext` with critical section (gh-134910...
Miss Islington (bot) [Mon, 2 Jun 2025 19:16:54 +0000 (21:16 +0200)] 
[3.14] gh-134908: Protect `textiowrapper_iternext` with critical section (gh-134910) (gh-135039)

The `textiowrapper_iternext` function called `_textiowrapper_writeflush`, but did not
use a critical section, making it racy in free-threaded builds.
(cherry picked from commit 44fb7c361cb24dcf9989a7a1cfee4f6aad5c81aa)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
5 months ago[3.14] Remove newline in Doc/c-api/lifecycle.rst for gettext builder (GH-135013)...
Miss Islington (bot) [Mon, 2 Jun 2025 18:19:54 +0000 (20:19 +0200)] 
[3.14] Remove newline in Doc/c-api/lifecycle.rst for gettext builder (GH-135013) (GH-135038)

(cherry picked from commit c7051a366996dd2213decb8677c52d1eda0fde6a)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
5 months ago[3.14] gh-130999: Avoid exiting the new REPL when there are non-string candidates...
Miss Islington (bot) [Mon, 2 Jun 2025 14:58:03 +0000 (16:58 +0200)] 
[3.14] gh-130999: Avoid exiting the new REPL when there are non-string candidates for suggestions (gh-131001) (gh-135019)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
5 months ago[3.14] gh-122153: indicate that Windows does not support `socket.{send,recv}_fds...
Bénédikt Tran [Mon, 2 Jun 2025 10:44:30 +0000 (12:44 +0200)] 
[3.14] gh-122153: indicate that Windows does not support `socket.{send,recv}_fds` (GH-134960) (#135018)

This amends commit e3b6ff19aaa318a813130ba9ad2ab0a332f27feb.
(cherry picked from commit 128195e12eb6d5b9542558453df7045dd7aa1e15)

Co-authored-by: GalaxySnail <me@glxys.nl>
5 months ago[3.14] gh-134449: fix grammar for `precision_with_grouping` in format description...
Miss Islington (bot) [Mon, 2 Jun 2025 09:51:45 +0000 (11:51 +0200)] 
[3.14] gh-134449: fix grammar for `precision_with_grouping` in format description (GH-134608) (#135015)

gh-134449: fix grammar for `precision_with_grouping` in format description (GH-134608)

This amends commit f39a07be47cd9219eaf0e538ae32ad8239c88e66.
(cherry picked from commit 7828d52680907d1661ff6993e540f7026461c390)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
5 months ago[3.14] gh-132983: Minor fixes and clean up for the _zstd module (GH-134930) (GH-134998)
Miss Islington (bot) [Sun, 1 Jun 2025 08:46:51 +0000 (10:46 +0200)] 
[3.14] gh-132983: Minor fixes and clean up for the _zstd module (GH-134930) (GH-134998)

(cherry picked from commit b5952371668089299bc8472c1adb9f8a0e69b4a2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] gh-134696: align OpenSSL and HACL*-based hash functions constructors AC signat...
Bénédikt Tran [Sun, 1 Jun 2025 08:26:56 +0000 (10:26 +0200)] 
[3.14] gh-134696: align OpenSSL and HACL*-based hash functions constructors AC signatures (GH-134713) (#134961)

OpenSSL and HACL*-based hash functions constructors now support both `data` and `string` parameters.
Previously these constructor functions inconsistently supported sometimes `data` and sometimes `string`,
while the documentation expected `data` to be given in all cases.

(cherry picked from commit c6e63d9d351f6d952000ec3bf84b3a7607989f92)
(cherry picked from commit 379d0bc95646dfe923e7ea05fb7f1befbd85572d)

5 months ago[3.14] gh-133503: clarify `compileall -s/-p` docs (GH-134756) (#134997)
Miss Islington (bot) [Sun, 1 Jun 2025 08:24:41 +0000 (10:24 +0200)] 
[3.14] gh-133503: clarify `compileall -s/-p` docs (GH-134756) (#134997)

gh-133503: clarify `compileall -s/-p` docs (GH-134756)
(cherry picked from commit fe6f8a3619242b287a793a5b5d8645f402482c71)

Co-authored-by: Rihaan Meher <meherrihaan@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 months ago[3.14] gh-134970: Fix exception message in argparse module (GH-134971) (GH-134991)
Miss Islington (bot) [Sun, 1 Jun 2025 06:21:34 +0000 (08:21 +0200)] 
[3.14] gh-134970: Fix exception message in argparse module (GH-134971) (GH-134991)

Fix the "unknown action" exception in argparse.ArgumentParser.add_argument_group()
to correctly replace the action class.
(cherry picked from commit 965c48056633d3f4b41520c8cd07f0275f00fb4c)

Co-authored-by: Michał Górny <mgorny@gentoo.org>
5 months ago[3.14] gh-133489: Remove size restrictions on getrandbits() and randbytes() (GH-13365...
Miss Islington (bot) [Sun, 1 Jun 2025 03:02:38 +0000 (05:02 +0200)] 
[3.14] gh-133489: Remove size restrictions on getrandbits() and randbytes() (GH-133658) (#134964)

gh-133489: Remove size restrictions on getrandbits() and randbytes() (GH-133658)

random.getrandbits() can now generate more that 2**31 bits.
random.randbytes() can now generate more that 256 MiB.
(cherry picked from commit 68784fed78aa297f0de0d038742495709185bef5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] gh-133891: Add missing error check to `SET_COUNT` macro in `_testinternalcapi...
Miss Islington (bot) [Sat, 31 May 2025 21:57:52 +0000 (23:57 +0200)] 
[3.14] gh-133891: Add missing error check to `SET_COUNT` macro in `_testinternalcapi.c` (GH-133892) (#134988)

gh-133891: Add missing error check to `SET_COUNT` macro in `_testinternalcapi.c` (GH-133892)
(cherry picked from commit cebae977a63f32c3c03d14c040df3cea55b8f585)

Co-authored-by: sobolevn <mail@sobolevn.me>
5 months ago[3.14] gh-134835: Remove outdated list from `howto/urllib2.rst` (GH-134844) (#134984)
Miss Islington (bot) [Sat, 31 May 2025 17:55:48 +0000 (19:55 +0200)] 
[3.14] gh-134835: Remove outdated list from `howto/urllib2.rst` (GH-134844) (#134984)

gh-134835: Remove outdated list from `howto/urllib2.rst` (GH-134844)

:teapot:
(cherry picked from commit 3704171415c1ea6ebbeb2f992758b6565f42e378)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
5 months ago[3.14] gh-134160: Improve multi-phase init note on isolation & subinterpreters (GH...
Miss Islington (bot) [Sat, 31 May 2025 17:41:07 +0000 (19:41 +0200)] 
[3.14] gh-134160: Improve multi-phase init note on isolation & subinterpreters (GH-134775) (#134932)

gh-134160: Improve multi-phase init note on isolation & subinterpreters (GH-134775)

(cherry picked from commit eb145fabbdd755f803296beba2d235fc32efe592)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
5 months ago[3.14] gh-134954: Hard-cap max file descriptors in subprocess test fd_status (GH...
Miss Islington (bot) [Sat, 31 May 2025 14:55:03 +0000 (16:55 +0200)] 
[3.14] gh-134954: Hard-cap max file descriptors in subprocess test fd_status (GH-134955) (#134980)

gh-134954: Hard-cap max file descriptors in subprocess test fd_status (GH-134955)

* Hard-cap max file descriptors in subprocess test fd_status

On some systems, `SC_OPEN_MAX` may return a very large value (i.e. 10**30), leading to the subprocess test timing out (or run forever).
Prevent this situation by applying a hard cap on how many file descriptors are checked.

* Fix typo in usage docstring

s/fd_stats/fd_status/
(cherry picked from commit f58873e4b2b7aad8e3a08a6188c6eb08d0a3001b)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
5 months ago[3.14] Improve format of `InternalDocs/exception_handling.md` (GH-134969) (#134975)
Miss Islington (bot) [Sat, 31 May 2025 12:02:20 +0000 (14:02 +0200)] 
[3.14] Improve format of `InternalDocs/exception_handling.md` (GH-134969) (#134975)

Improve format of `InternalDocs/exception_handling.md` (GH-134969)
(cherry picked from commit 5507eff19c757a908a2ff29dfe423e35595fda00)

Co-authored-by: sobolevn <mail@sobolevn.me>
5 months ago[3.14] gh-134918: Fix and improve doctest's documentation (GH-134919) (GH-134966)
Miss Islington (bot) [Sat, 31 May 2025 09:09:00 +0000 (11:09 +0200)] 
[3.14] gh-134918: Fix and improve doctest's documentation (GH-134919) (GH-134966)

(cherry picked from commit 3c66e5976669a599adfb260514c03815b1a9e4e9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] GH-106235: Clarify `parse_known_args` documentation by removing "remaining...
Miss Islington (bot) [Fri, 30 May 2025 20:24:08 +0000 (22:24 +0200)] 
[3.14] GH-106235: Clarify `parse_known_args` documentation by removing "remaining" (GH-126921) (#134913)

GH-106235: Clarify `parse_known_args` documentation by removing "remaining" (GH-126921)
(cherry picked from commit a4251411a97304ab001721c6231d86ddf4eac3f0)

Co-authored-by: Savannah Bailey <savannahostrowski@gmail.com>
5 months agogh-134923: Use /GENPROFILE and /USEPROFILE for Windows PGO builds (GH-134924)
Miss Islington (bot) [Fri, 30 May 2025 19:04:47 +0000 (21:04 +0200)] 
gh-134923: Use /GENPROFILE and /USEPROFILE for Windows PGO builds (GH-134924)

(cherry picked from commit 8865b4f95b32097099d252111669b88ec7c1eb7f)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 months ago[3.14] gh-132775: Expand the Capability of Interpreter.call() (gh-134933)
Miss Islington (bot) [Fri, 30 May 2025 18:28:35 +0000 (20:28 +0200)] 
[3.14] gh-132775: Expand the Capability of Interpreter.call() (gh-134933)

It now supports most callables, full args, and return values.

(cherry picked from commit 52deabe, AKA gh-133484)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
5 months ago[3.14] .gitignore personal Claude Code configs (GH-134942) (#134944)
Gregory P. Smith [Fri, 30 May 2025 18:26:24 +0000 (11:26 -0700)] 
[3.14] .gitignore personal Claude Code configs (GH-134942) (#134944)

.gitignore personal Claude Code configs (GH-134942)

https://docs.anthropic.com/en/docs/claude-code/memory

backports 98a5b830d2463351800f4d76edba1a306a3e0ec9

5 months ago[3.14] gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-13492...
Miss Islington (bot) [Fri, 30 May 2025 16:30:13 +0000 (18:30 +0200)] 
[3.14] gh-134733: Fix documentation for the show_empty option of ast.dump() (GH-134925) (GH-134940)

Optional None values are always omitted.
(cherry picked from commit 1a89991d2362867a9127e151376135615bc92a4c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] gh-134718: Fix ast.dump() for empty non-default values (GH-134926) (GH-134931)
Miss Islington (bot) [Fri, 30 May 2025 15:24:59 +0000 (17:24 +0200)] 
[3.14] gh-134718: Fix ast.dump() for empty non-default values (GH-134926) (GH-134931)

(cherry picked from commit cc344e8dd0a6fdc83a032c229f9b3cf53f76a887)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] gh-134885: zstd: Use Py_XSETREF (GH-134886) (GH-134922)
Miss Islington (bot) [Fri, 30 May 2025 10:50:42 +0000 (12:50 +0200)] 
[3.14] gh-134885: zstd: Use Py_XSETREF (GH-134886) (GH-134922)

(cherry picked from commit 45c6c48afc13f9897010e32171a3e02d0624258c)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
5 months ago[3.14] gh-134857: Improve error report for doctests run with unittest (GH-134858...
Miss Islington (bot) [Fri, 30 May 2025 10:44:40 +0000 (12:44 +0200)] 
[3.14] gh-134857: Improve error report for doctests run with unittest (GH-134858) (GH-134903)

Remove doctest module frames from tracebacks and redundant newline
character from a failure message.
(cherry picked from commit cb8a72b301f47e76d93a7fe5b259e9a5758792e1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months agoDoc: remove unnecessary section header (GH-134917)
Miss Islington (bot) [Fri, 30 May 2025 09:13:36 +0000 (11:13 +0200)] 
Doc: remove unnecessary section header (GH-134917)

(cherry picked from commit b367e27af9b52528e395f95b277ec7b69e98e287)

5 months ago[3.14] gh-134768: Fix definition of `mt_continue_should_break()` (GH-134769) (#134916)
Miss Islington (bot) [Fri, 30 May 2025 05:08:43 +0000 (07:08 +0200)] 
[3.14] gh-134768: Fix definition of `mt_continue_should_break()` (GH-134769) (#134916)

gh-134768: Fix definition of `mt_continue_should_break()` (GH-134769)

In 121ed71f4e395948d313249b2ad33e1e21581f8a, mt_continue_should_break
was changed to be guarded by `Py_DEBUG`, but it's used in `compress_mt_continue_lock_held`
with just `assert`, so it needs to be available when `NDEBUG` is undefined
too.

`Py_DEBUG` implies `NDEBUG` is undefined, so we can check just that.
(cherry picked from commit 2f2bee21118adce653ee5bc4eb31d30327465966)

Fixes: 121ed71f4e395948d313249b2ad33e1e21581f8a
Co-authored-by: Sam James <sam@gentoo.org>
5 months ago[3.14] gh-134906: Document CompressionParameter.content_size_flag (GH-134907) (#134915)
Miss Islington (bot) [Fri, 30 May 2025 04:43:33 +0000 (06:43 +0200)] 
[3.14] gh-134906: Document CompressionParameter.content_size_flag (GH-134907) (#134915)

gh-134906: Document CompressionParameter.content_size_flag (GH-134907)

* Document CompressionParameter.content_size_flag
(cherry picked from commit 5f60d0fcccbf6676f5bc924f05452bd5321446f0)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
5 months ago[3.14] ast docs: Fix description of ast.Constant (GH-134741) (#134911)
Miss Islington (bot) [Fri, 30 May 2025 04:17:18 +0000 (06:17 +0200)] 
[3.14] ast docs: Fix description of ast.Constant (GH-134741) (#134911)

Contrary to the current docs, ast.Constant will never hold containers
such as frozenset or tuple; the Python parser only emits it for simple
literals.

For precision, add the exact list of types that may be contained in an
ast.Constant.
(cherry picked from commit 381020d41fb1f8b33421f01c609ba0d0edb99764)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
5 months ago[3.14] gh-132775: Fix _PyFunctIon_VerifyStateless() (gh-134901)
Miss Islington (bot) [Thu, 29 May 2025 20:55:42 +0000 (22:55 +0200)] 
[3.14] gh-132775: Fix _PyFunctIon_VerifyStateless() (gh-134901)

gh-132775: Fix _PyFunctIon_VerifyStateless() ()

The problem we're fixing here is that we were using PyDict_Size() on "defaults",
which it is actually a tuple.  We're also adding some explicit type checks.

This is a follow-up to gh-133221/gh-133528.

(cherry picked from commit dafd14146f7, AKA gh-134900)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
5 months ago[3.14] GH-133912: Fix `PyObject_GenericSetDict` to handle inline values (GH-134725...
Miss Islington (bot) [Thu, 29 May 2025 18:19:58 +0000 (20:19 +0200)] 
[3.14] GH-133912: Fix `PyObject_GenericSetDict` to handle inline values (GH-134725) (#134859)

5 months ago[3.14] gh-133260: Remove claim that PyUnicode_InternFromString immortalizes (GH-13421...
Miss Islington (bot) [Thu, 29 May 2025 13:43:27 +0000 (15:43 +0200)] 
[3.14] gh-133260: Remove claim that PyUnicode_InternFromString immortalizes (GH-134213) (GH-134883)

(cherry picked from commit 4109a9c6b33faa0032ffc95d96cd0db482af3ce2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
5 months ago[3.14] gh-69011: clarify & deduplicate `ctypes.create_*_buffer` docs (GH-132858)...
Miss Islington (bot) [Thu, 29 May 2025 13:23:19 +0000 (15:23 +0200)] 
[3.14] gh-69011: clarify & deduplicate `ctypes.create_*_buffer` docs (GH-132858) (GH-134881)

This adds a warning about the possibly-missing NUL terminator, but in a way
that doesn't make it sound like a bug/wart.
(cherry picked from commit b783e1791b2076ef560104f8207156d75859c0a6)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
5 months ago[3.14] gh-134262: Add retries to generate_sbom.py (GH-134460)
Miss Islington (bot) [Wed, 28 May 2025 23:52:31 +0000 (01:52 +0200)] 
[3.14] gh-134262: Add retries to generate_sbom.py (GH-134460)

(cherry picked from commit 0c5a8b0b55238a45b9073d06a10c3a59568cdf3c)

Includes fix for off-by-one error from GH-134867
(cherry-picked from commit e64395e8eb8d3a9e35e3e534e87d427ff27ab0a5)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
5 months ago[3.14] gh-134262: Add retries to downloads in PCbuild\get_external.py (GH-134865)
Miss Islington (bot) [Wed, 28 May 2025 23:47:26 +0000 (01:47 +0200)] 
[3.14] gh-134262: Add retries to downloads in PCbuild\get_external.py (GH-134865)

(cherry picked from commit e9d845b41dca9ad84b76ef777d05e647a4b4d8cd)

Includes fix for off-by-one error from GH-134867
(cherry-picked from commit e64395e8eb8d3a9e35e3e534e87d427ff27ab0a5)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
5 months ago[3.14] gh-108885: Imporove tests for doctest (GH-134832) (GH-134855)
Miss Islington (bot) [Wed, 28 May 2025 17:41:07 +0000 (19:41 +0200)] 
[3.14] gh-108885: Imporove tests for doctest (GH-134832) (GH-134855)

Test the error and failure report in more detail.
(cherry picked from commit f6324bc7eedc615c3c961fe368a8c56697d42936)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] GH-134848: Use a set to store ``AuditEvents.sources`` (GH-134849) (#134853)
Miss Islington (bot) [Wed, 28 May 2025 16:37:57 +0000 (18:37 +0200)] 
[3.14] GH-134848: Use a set to store ``AuditEvents.sources`` (GH-134849) (#134853)

GH-134848: Use a set to store ``AuditEvents.sources`` (GH-134849)
(cherry picked from commit b265a7ddeb12b2040d80b471d447ce4c3ff4bb95)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
5 months ago[3.14] gh-132983: Convert dict_content to take Py_buffer in ``ZstdDict()`` (GH-133924...
Miss Islington (bot) [Wed, 28 May 2025 16:25:35 +0000 (18:25 +0200)] 
[3.14] gh-132983: Convert dict_content to take Py_buffer in ``ZstdDict()`` (GH-133924) (#134723)

gh-132983: Convert dict_content to take Py_buffer in ``ZstdDict()`` (GH-133924)
(cherry picked from commit f2ce4bbdfdfa2b658fbeef66f414be2ecf7981dd)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
5 months ago[3.14] gh-132983: Split ``_zstd_set_c_parameters`` (GH-133921) (#134838)
Miss Islington (bot) [Wed, 28 May 2025 16:25:06 +0000 (18:25 +0200)] 
[3.14] gh-132983: Split ``_zstd_set_c_parameters`` (GH-133921) (#134838)

gh-132983: Split ``_zstd_set_c_parameters`` (GH-133921)
(cherry picked from commit 11f7a939debd7731d1cb79ed84a473fa87c279c8)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
5 months ago[3.14] gh-133711: Fix test_readline.test_nonascii() for UTF-8 Mode (GH-134841) (...
Miss Islington (bot) [Wed, 28 May 2025 16:10:37 +0000 (18:10 +0200)] 
[3.14] gh-133711: Fix test_readline.test_nonascii() for UTF-8 Mode (GH-134841) (#134851)

gh-133711: Fix test_readline.test_nonascii() for UTF-8 Mode (GH-134841)

Skip the test if the Python UTF-8 Mode is enabled and the LC_CTYPE
encoding is not UTF-8.
(cherry picked from commit 4635115c3f1495fa20e553937df37861fffa7054)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 months ago[3.14] gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address (GH...
Miss Islington (bot) [Wed, 28 May 2025 15:50:40 +0000 (17:50 +0200)] 
[3.14] gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address (GH-134836) (#134845)

gh-128840: Fix parsing long IPv6 addresses with embedded IPv4 address (GH-134836)
(cherry picked from commit d83576bf48d07d5e29d5d171c4e25afb048622aa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 months ago[3.14] gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839) (#134842)
Miss Islington (bot) [Wed, 28 May 2025 15:48:03 +0000 (17:48 +0200)] 
[3.14] gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839) (#134842)

gh-133711: Fix test_regrtest for PYTHONUTF8=1 (GH-134839)

Use "backslashreplace" error handler to decode stdout and stderr.
Example:

    vstinner@WIN C:\victor\python\main\build\test_python_worker_8360\x91>
    "C:\victor\python\main\PCbuild\amd64\python_d.exe"  -m test
    --fast-ci --slow-ci --testdir
    C:\Users\vstinner\AppData\Local\Temp\tmp0t59e8da
    test_regrtest_noop1 test_regrtest_noop2 test_regrtest_noop3
    test_regrtest_noop4

Notice the "\x91" byte at the end of the first line: it's the
non-ASCII U+00E6 character encoded to the OEM cp437 code page.
(cherry picked from commit 91618278e7cd1ffc222efa03bb5334bd5a13dc5b)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 months ago[3.14] gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-13481...
Miss Islington (bot) [Wed, 28 May 2025 12:32:59 +0000 (14:32 +0200)] 
[3.14] gh-134817: Document [Timed]RotatingFileHandler shouldRollover method (GH-134818) (GH-134823)

(cherry picked from commit 7be5916f6dc3db95744b5fec945327d82cce0183)

5 months ago[3.14] gh-134160: Block multiple module initialization (GH-134773) (#134827)
Miss Islington (bot) [Wed, 28 May 2025 07:58:49 +0000 (09:58 +0200)] 
[3.14] gh-134160: Block multiple module initialization (GH-134773) (#134827)

gh-134160: Block multiple module initialization (GH-134773)
(cherry picked from commit 469a56470b1d8df03862d8ceb73aebca14772dcf)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
5 months ago[3.14] Update outdated statement from `math` about C standard (GH-134621) (#134825)
Miss Islington (bot) [Wed, 28 May 2025 07:36:40 +0000 (09:36 +0200)] 
[3.14] Update outdated statement from `math` about C standard (GH-134621) (#134825)

Update outdated statement from `math` about C standard (GH-134621)
(cherry picked from commit 21672b694bd1786bad6eb71a9eff89291a91554b)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
5 months ago[3.14] Fix typing.TYPE_CHECKING docs to reflect PEP 649. (GH-134813) (#134822)
Miss Islington (bot) [Wed, 28 May 2025 06:15:17 +0000 (08:15 +0200)] 
[3.14] Fix typing.TYPE_CHECKING docs to reflect PEP 649. (GH-134813) (#134822)

Fix typing.TYPE_CHECKING docs to reflect PEP 649. (GH-134813)

typing.TYPE_CHECKING should no longer steer users towards
manual or automatic stringization (and PEP 563); PEP 649
makes all that unnecessary.
(cherry picked from commit d7256ae4d781932b3b43b162e8425abdb134afa6)

Co-authored-by: larryhastings <larry@hastings.org>
5 months ago[3.14] gh-134679: Fix assertion failure in QSBR (gh-134811) (gh-134814)
Miss Islington (bot) [Tue, 27 May 2025 20:46:02 +0000 (22:46 +0200)] 
[3.14] gh-134679: Fix assertion failure in QSBR (gh-134811) (gh-134814)

This is the same underlying bug as gh-130519. The destructor may call
arbitrary code, changing the `tstate->qsbr pointer` and invalidating the
old `struct _qsbr_thread_state`.
(cherry picked from commit a4d37f88b66bc9a66b2ab277aa66a2a6b20821fa)

Co-authored-by: Sam Gross <colesbury@gmail.com>
5 months ago[3.14] gh-134774: Remove additional Py_DEBUG definition (GH-134791)
Chris Eibl [Tue, 27 May 2025 19:08:41 +0000 (21:08 +0200)] 
[3.14] gh-134774: Remove additional Py_DEBUG definition (GH-134791)

5 months ago[3.14] gh-134789: Document del s[i] operation for mutable sequences (GH-134804) ...
Miss Islington (bot) [Tue, 27 May 2025 18:53:52 +0000 (20:53 +0200)] 
[3.14] gh-134789: Document del s[i] operation for mutable sequences (GH-134804) (#134808)

gh-134789: Document del s[i] operation for mutable sequences (GH-134804)

[main] Update stdtypes.rst

- Added explicit mention of `del s[i]` (item deletion by index) to the Mutable Sequence Types section.
- Clarified that this operation removes the item at the specified index from the sequence.
- Addresses issue GH-134789.
(cherry picked from commit 967f361993c9c97eb3ff3076a409b78ea32938df)

Co-authored-by: Rishabh Singh <67859818+rishabh11336@users.noreply.github.com>
5 months ago[3.14] gh-132917: fix data race on `last_mem` in free-threading gc (GH-134692) ...
Miss Islington (bot) [Tue, 27 May 2025 18:00:19 +0000 (20:00 +0200)] 
[3.14] gh-132917: fix data race on `last_mem` in free-threading gc  (GH-134692) (#134802)

gh-132917: fix data race on `last_mem` in free-threading gc  (GH-134692)
(cherry picked from commit ac539e7e0d1622c61988f30c91acfd4c06521ced)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
5 months ago[3.14] gh-134744: Fix fcntl error handling (#134748) (#134795)
Victor Stinner [Tue, 27 May 2025 16:13:20 +0000 (18:13 +0200)] 
[3.14] gh-134744: Fix fcntl error handling (#134748) (#134795)

gh-134744: Fix fcntl error handling (#134748)

Fix also reference leak on buffer overflow.

(cherry picked from commit 9300a596d37d058e6e58d00a2ad70617c863a3de)

5 months ago[3.14] gh-132775: Always Set __builtins__ In _PyFunction_FromXIData() (gh-134794)
Miss Islington (bot) [Tue, 27 May 2025 16:07:44 +0000 (18:07 +0200)] 
[3.14] gh-132775: Always Set __builtins__ In _PyFunction_FromXIData() (gh-134794)

This is a small follow-up to gh-133481.  There's a corner case
in the behavior of PyImport_ImportModuleAttrString(), where
it expects __builtins__ to be set if __globals__ is set.

(cherry picked from commit 9b5e80000, AKA gh-134758)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
5 months ago[3.14] gh-133678: Document C API third party tools (GH-134526) (#134793)
Miss Islington (bot) [Tue, 27 May 2025 15:45:08 +0000 (17:45 +0200)] 
[3.14] gh-133678: Document C API third party tools (GH-134526) (#134793)

gh-133678: Document C API third party tools (GH-134526)
(cherry picked from commit c3c88064f5905889057dcdfaaaa4a48f8e2d53d4)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Steve Dower <steve.dower@python.org>
5 months ago[3.14] GH-128161: Remove redundant GET_ITER from list comprehension code (GH-134778)
Mark Shannon [Tue, 27 May 2025 11:29:48 +0000 (12:29 +0100)] 
[3.14] GH-128161: Remove redundant GET_ITER from list comprehension code (GH-134778)

5 months ago[3.14] gh-62824: Adjust test_alias_modules_exist test to use imports instead of file...
Miss Islington (bot) [Tue, 27 May 2025 09:28:30 +0000 (11:28 +0200)] 
[3.14] gh-62824: Adjust test_alias_modules_exist test to use imports instead of file checks (GH-134777) (GH-134781)

gh-62824: Adjust test_alias_modules_exist test to use imports instead of file checks (GH-134777)
(cherry picked from commit 8704d6b39139d2b1c3dd871590188fb7deb8aaad)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
5 months ago[3.14] gh-134210: handle signals in `_curses.window.getch` (GH-134326) (#134783)
Miss Islington (bot) [Tue, 27 May 2025 09:16:50 +0000 (11:16 +0200)] 
[3.14] gh-134210: handle signals in `_curses.window.getch` (GH-134326) (#134783)

gh-134210: handle signals in `_curses.window.getch` (GH-134326)
(cherry picked from commit 51762b6cadb8f316dd783716bc5c168c2e2d07f0)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 months ago[3.14] gh-134752: Improve speed of test_tokenize.StringPrefixTest.test_prefixes....
Miss Islington (bot) [Tue, 27 May 2025 09:16:23 +0000 (11:16 +0200)] 
[3.14] gh-134752: Improve speed of test_tokenize.StringPrefixTest.test_prefixes. (GH-134766) (#134782)

gh-134752: Improve speed of test_tokenize.StringPrefixTest.test_prefixes. (GH-134766)
(cherry picked from commit 579686d9fb1bccc74c694d569f0a8bf28d9ca85a)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
5 months ago[3.14] gh-134664: document `cleanup_socket` parameter in `asyncio.start_unix_server...
Miss Islington (bot) [Tue, 27 May 2025 08:34:43 +0000 (10:34 +0200)] 
[3.14] gh-134664: document `cleanup_socket` parameter in `asyncio.start_unix_server` (GH-134750) (#134779)

gh-134664: document `cleanup_socket` parameter in `asyncio.start_unix_server` (GH-134750)
(cherry picked from commit 92ea1eb38ff97ac046a0031d505c30a51f58a43f)

Co-authored-by: Shamil <ashm.tech@proton.me>
5 months ago[3.14] gh-134160: Use multi-phase init in documentation examples (GH-134296) (#134753)
Miss Islington (bot) [Mon, 26 May 2025 21:50:18 +0000 (23:50 +0200)] 
[3.14] gh-134160: Use multi-phase init in documentation examples (GH-134296) (#134753)

gh-134160: Use multi-phase init in documentation examples (GH-134296)
(cherry picked from commit 96905bdd273d2e5724d2c1b6b0f95ecb0daeaabe)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
5 months ago[3.14] gh-132775: Unrevert "Use _PyCode GetScriptXIData()" (gh-134736)
Eric Snow [Mon, 26 May 2025 19:41:14 +0000 (13:41 -0600)] 
[3.14] gh-132775: Unrevert "Use _PyCode GetScriptXIData()" (gh-134736)

This reverts commit 7476f90af2cf9207c792c0dc3ee9a5ca7b4fabfa, AKA gh-134600.

This effectively unreverts commit bbf8048c0f9c (gh-134515).

5 months ago[3.14] gh-134675: Add t-string prefixes to tokenizer module, lexical analysis doc...
Miss Islington (bot) [Mon, 26 May 2025 19:24:24 +0000 (21:24 +0200)] 
[3.14] gh-134675: Add t-string prefixes to tokenizer module, lexical analysis doc, and add a test to make sure we catch this error in the future. (GH-134734) (#134739)

gh-134675: Add t-string prefixes to tokenizer module, lexical analysis doc, and add a test to make sure we catch this error in the future. (GH-134734)

* Add t-string prefixes to _all_string_prefixes, and add a test to make sure we catch this error in the future.

* Update lexical analysis docs for t-string prefixes.
(cherry picked from commit 08c78e02fab4a1c9c075637422d621f9c740959a)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
5 months ago[3.14] gh-134557: Suppress immortalization in _PyCode_GetScriptXIData under free...
Miss Islington (bot) [Mon, 26 May 2025 19:14:58 +0000 (21:14 +0200)] 
[3.14] gh-134557: Suppress immortalization in _PyCode_GetScriptXIData under free-threading (gh134738)

Disable immortalization around Py_CompileString*().

The same approach as 332356b that fixed the refleaks in compile() and eval().

E: 09e72cf can pass test_capi, test_sys and test__interpchannels with this patch for me.

(cherry picked from commit c60f39ada625562bff26400f304690c19fe9f504, AKA gh-134686)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
5 months agoMerge branch '3.14' of https://github.com/python/cpython into 3.14
Hugo van Kemenade [Mon, 26 May 2025 18:51:15 +0000 (21:51 +0300)] 
Merge branch '3.14' of https://github.com/python/cpython into 3.14

5 months ago[3.14] gh-134637: Fix performance regression in calling `ctypes` function pointer...
Miss Islington (bot) [Mon, 26 May 2025 18:51:13 +0000 (20:51 +0200)] 
[3.14] gh-134637: Fix performance regression in calling `ctypes` function pointer in `free threading`. (GH-134702) (#134742)

gh-134637: Fix performance regression in calling `ctypes` function pointer in `free threading`. (GH-134702)

Fix performance regression in calling `ctypes` function pointer in `free threading`.
(cherry picked from commit 3c0525126ef95efe2f578e93db09f3282e3ca08f)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
5 months agoPost 3.14.0b2
Hugo van Kemenade [Mon, 26 May 2025 18:50:01 +0000 (21:50 +0300)] 
Post 3.14.0b2

5 months ago[3.14] Add CODEOWNERS and YAML to end-of-file-fixer and trailing-whitespace (GH-13473...
Miss Islington (bot) [Mon, 26 May 2025 18:08:37 +0000 (20:08 +0200)] 
[3.14] Add CODEOWNERS and YAML to end-of-file-fixer and trailing-whitespace (GH-134730) (#134737)

5 months ago[3.14] gh-119180: Updates to PEP 649/749 docs (GH-134640) (#134731)
Miss Islington (bot) [Mon, 26 May 2025 15:40:43 +0000 (17:40 +0200)] 
[3.14] gh-119180: Updates to PEP 649/749 docs (GH-134640) (#134731)

gh-119180: Updates to PEP 649/749 docs (GH-134640)

- Mention (again) that `type.__annotations__` is unsafe. It is now safe
  when using only classes defined under PEP 649 semantics, but not with
  classes defined using `from __future__ import annotations`.
- Mention that annotations on instances no longer work. There was already
  an issue about this.
- Mention the general changes in the "Porting to Python 3.14" section.
- `annotationlib` was proposed by PEP-749, not PEP-649.
(cherry picked from commit 7291eaba8b20b19e7971d43d88286d5820e5eb56)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
5 months ago[3.14] gh-134693: Fix `[-Wmaybe-uninitialized]` warning in `_remote_debugging_module...
Miss Islington (bot) [Mon, 26 May 2025 15:32:52 +0000 (17:32 +0200)] 
[3.14] gh-134693: Fix `[-Wmaybe-uninitialized]` warning in `_remote_debugging_module.c` (GH-134694) (#134726)

gh-134693: Fix `[-Wmaybe-uninitialized]` warning in `_remote_debugging_module.c` (GH-134694)
(cherry picked from commit 806107d7a2fa9baa76d4025f46fab2c8725963f4)

Co-authored-by: sobolevn <mail@sobolevn.me>
5 months ago[3.14] gh-91048: Add better error messages for remote debugging for CI builds (GH...
Miss Islington (bot) [Mon, 26 May 2025 15:04:36 +0000 (17:04 +0200)] 
[3.14] gh-91048: Add better error messages for remote debugging for CI builds (GH-134682) (#134719)

5 months ago[3.14] Add CODEOWNERS for remote debugging (GH-134720) (#134721)
Miss Islington (bot) [Mon, 26 May 2025 14:46:51 +0000 (16:46 +0200)] 
[3.14] Add CODEOWNERS for remote debugging (GH-134720) (#134721)

5 months agoPython 3.14.0b2 v3.14.0b2
Hugo van Kemenade [Mon, 26 May 2025 13:26:37 +0000 (16:26 +0300)] 
Python 3.14.0b2

5 months ago[3.14] gh-91048: Correct Apple platform includes for iOS. (GH-134712) (#134714)
Miss Islington (bot) [Mon, 26 May 2025 13:10:37 +0000 (15:10 +0200)] 
[3.14] gh-91048: Correct Apple platform includes for iOS. (GH-134712) (#134714)

Correct Apple platform includes for iOS.
(cherry picked from commit 965662ee4a986605b60da470d9e7c1e9a6f922b3)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
5 months ago[3.14] gh-132710: add missing NEWS entry for GH-134697 (GH-134705) (#134707)
Miss Islington (bot) [Mon, 26 May 2025 10:46:29 +0000 (12:46 +0200)] 
[3.14] gh-132710: add missing NEWS entry for GH-134697 (GH-134705) (#134707)

gh-132710: add missing NEWS entry for GH-134697 (GH-134705)
(cherry picked from commit 9eb84d83e00070cec3cfe78f1d0c7a7a0fbef30f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 months ago[3.14] gh-132710: only use stable `_uuid.generate_time_safe()` to deduce MAC address...
Bénédikt Tran [Mon, 26 May 2025 10:45:36 +0000 (12:45 +0200)] 
[3.14] gh-132710: only use stable `_uuid.generate_time_safe()` to deduce MAC address (GH-132901) (#134697)

(cherry picked from commit 3bffada46728e51f84c41ecbb0d3722595693e63)

5 months ago[3.14] gh-134559: Add versionadded for ``object.__replace__()`` (GH-134672) (#134699)
Miss Islington (bot) [Mon, 26 May 2025 10:29:51 +0000 (12:29 +0200)] 
[3.14] gh-134559: Add versionadded for ``object.__replace__()`` (GH-134672) (#134699)

gh-134559: Add versionadded for ``object.__replace__()`` (GH-134672)
(cherry picked from commit 71290a6fbe79cef3773a3af6fcf08d8bf15c8460)

Co-authored-by: tmlnv <108088921+tmlnv@users.noreply.github.com>
5 months ago[3.14] gh-134208: remove dead AC directives for `_curses.window.{chgat,getstr,instr...
Bénédikt Tran [Mon, 26 May 2025 10:09:02 +0000 (12:09 +0200)] 
[3.14] gh-134208: remove dead AC directives for `_curses.window.{chgat,getstr,instr}` (GH-134325) (#134701)

(cherry picked from commit 29e81159644cf78d958e30aaef208e22a04a8b25)

5 months ago[3.14] gh-132493: Remove __annotations__ usage in inspect._signature_is_functionlike...
Miss Islington (bot) [Mon, 26 May 2025 08:22:14 +0000 (10:22 +0200)] 
[3.14] gh-132493: Remove __annotations__ usage in inspect._signature_is_functionlike (GH-133415) (#133796)

gh-132493: Remove __annotations__ usage in inspect._signature_is_functionlike (GH-133415)

This check is potentially problematic because it could force evaluation of
annotations unnecessarily. This doesn't trigger for builtin objects (functions,
classes, or modules) with annotations, but it could trigger for third-party objects.

The check was not particularly useful anyway, because it succeeds if ``__annotations__``
is a dict or None, so the only thing this did was guard against objects that have an
``__annotations__`` attribute that is of some other type. That doesn't seem particularly
useful, so I just removed the check.
(cherry picked from commit cb6596c6aa30c8c3213c8746d5590e6e2757a6c1)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
5 months ago[3.14] gh-134152: Fix UnboundLocalError in email._header_value_parser _get_ptext_to_e...
Miss Islington (bot) [Mon, 26 May 2025 08:02:52 +0000 (10:02 +0200)] 
[3.14] gh-134152: Fix UnboundLocalError in email._header_value_parser _get_ptext_to_endchars (GH-134233) (#134678)

Co-authored-by: R. David Murray <rdmurray@bitdance.com>
5 months ago[3.14] gh-127833: lexical analysis: Improve section on Names (GH-131474) (#134423)
Miss Islington (bot) [Mon, 26 May 2025 08:00:17 +0000 (10:00 +0200)] 
[3.14] gh-127833: lexical analysis: Improve section on Names (GH-131474) (#134423)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>