]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Sat, 7 Jun 2025 18:56:38 +0000 (20:56 +0200)]
[3.14] gh-134876: Add fallback for when process_vm_readv fails with ENOSYS (GH-134878) (#135240)
gh-134876: Add fallback for when process_vm_readv fails with ENOSYS (GH-134878)
(cherry picked from commit
ac9c3431cc5916a795c42b3e2b965233ceffe6f0 )
Co-authored-by: Daniel Golding <goldingd89@gmail.com>
Miss Islington (bot) [Fri, 6 Jun 2025 18:13:30 +0000 (20:13 +0200)]
[3.14] gh-134155: fix AttributeError in email._header_value_parser.get_address (GH-134194) (#135191)
gh-134155: fix AttributeError in email._header_value_parser.get_address (GH-134194)
Append the defect to defects instead of to the parse tree.
(cherry picked from commit
d9cad074d52fe31327429fd81e4d2eeea3dbe35b )
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 6 Jun 2025 15:57:37 +0000 (17:57 +0200)]
[3.14] Docs: Update `PyExc_*` tables in the c-api documentation (GH-131640) (GH-135220)
Docs: Update `PyExc_*` tables in the c-api documentation (GH-131640)
Add `PyExc_BaseExceptionGroup` and `PyExc_EncodingWarning`
(cherry picked from commit
f00512db20561370faad437853f6ecee0eec4856 )
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
Miss Islington (bot) [Fri, 6 Jun 2025 15:08:45 +0000 (17:08 +0200)]
[3.14] gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174) (GH-135213)
gh-134160: Use PyModuleDef.m_free in the example module xxlimited (GH-135174)
(cherry picked from commit
1adca08d658ee2d520f3193960eaf3ae2ead1cef )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Miss Islington (bot) [Fri, 6 Jun 2025 14:58:48 +0000 (16:58 +0200)]
[3.14] gh-57089: Note _layout_ in the bitfield docs (GH-134148) (GH-135216)
(cherry picked from commit
b22b964a5c245e13ae0439c5efbb8984acf607ab )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Meador Inge <meadori@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Miss Islington (bot) [Fri, 6 Jun 2025 13:22:50 +0000 (15:22 +0200)]
[3.14] feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (GH-135181) (#135212)
feat(docs): type fix - apply pep8 by using docstring instead of comment in the doc. (GH-135181)
Giving the right example incitates the tutorial readers to do the same in the future.
(cherry picked from commit
343182853f19a42c0ba8980d3104076a8c7bcfe7 )
Co-authored-by: Jean-Louis GUENEGO <jlguenego@gmail.com>
Serhiy Storchaka [Fri, 6 Jun 2025 13:03:28 +0000 (16:03 +0300)]
[3.14] gh-135120: Add test.support.subTests() (GH-135121) (GH-135208)
(cherry picked from commit
6ef06fad84244261c695ec337c7d2734277054db )
Miss Islington (bot) [Fri, 6 Jun 2025 12:38:59 +0000 (14:38 +0200)]
[3.14] gh-134993: Add os.lstat() to os.supports_dir_fd (GH-135188) (#135205)
gh-134993: Add os.lstat() to os.supports_dir_fd (GH-135188)
(cherry picked from commit
e004cf8fd5c006a7a1c60807a03066f4c43452e5 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Fri, 6 Jun 2025 12:30:33 +0000 (14:30 +0200)]
[3.14] Fix versionadded directive rendering in c-api/arg.rst (GH-135199) (#135207)
Fix versionadded directive rendering in c-api/arg.rst (GH-135199)
(cherry picked from commit
39859fcac5c8335ca9c1bddc5945a7d3e934aebc )
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Petr Viktorin [Fri, 6 Jun 2025 11:55:26 +0000 (13:55 +0200)]
[3.14] gh-128605: Revert "Add branch protections for x86_64 in asm_tr…ampoline.S (#128606) (#135077)" (GH-135175)
This reverts commit
899cca6dbf76bf3e06a99f60a5f996ad6ba0761f ,
which broke buildbots.
Miss Islington (bot) [Fri, 6 Jun 2025 01:09:08 +0000 (03:09 +0200)]
[3.14] gh-135155: Added dependencies required for compiling the _zstd module (GH-135156) (#135197)
gh-135155: Added dependencies required for compiling the _zstd module (GH-135156)
(cherry picked from commit
a7d41e8aab5211f4ed7f636c41d63adcab0affba )
Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
mpage [Thu, 5 Jun 2025 20:06:51 +0000 (13:06 -0700)]
[3.14] gh-134889: Fix handling of a few opcodes when optimizing `LOAD_FAST` (#134958) (#135187)
We were incorrectly handling a few opcodes that leave their operands on the stack. Treat all of these conservatively; assume that they always leave operands on the stack.
(cherry picked from commit
6b77af257c25d31f1f137e477cb23e63692ddf29 )
Miss Islington (bot) [Thu, 5 Jun 2025 17:41:51 +0000 (19:41 +0200)]
[3.14] gh-135166: Fix exception type expected by test.test_zstd (GH-135167)
gh-135166: Fix exception type expected by test.test_zstd (GH-135167)
(cherry picked from commit
1b55e12766d007aea9fcd0966e29ce220b67d28e )
Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
Miss Islington (bot) [Thu, 5 Jun 2025 14:51:11 +0000 (16:51 +0200)]
[3.14] gh-134938: Add set_pledged_input_size() to ZstdCompressor (GH-135010) (GH-135173)
(cherry picked from commit
4b44b3409ac026e7f13054a3daa18ab7ee14d85c )
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Miss Islington (bot) [Thu, 5 Jun 2025 14:38:09 +0000 (16:38 +0200)]
[3.14] gh-131884: Fix incorrect formatting in json.dumps() when using indent and skipkeys=True (GH-132200) (GH-135060)
(cherry picked from commit
ec12559ebafca01ded22c9013de64abe535c838d )
Co-authored-by: Roei Ben Artzi <155478676+roeibenartzi@users.noreply.github.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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>
Ł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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 )
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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>
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>
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>
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 )
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>
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>
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>
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>
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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 )
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>
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>
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>
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>
Chris Eibl [Tue, 27 May 2025 19:08:41 +0000 (21:08 +0200)]
[3.14] gh-134774: Remove additional Py_DEBUG definition (GH-134791)
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>
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>
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 )
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>
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>
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)
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>
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>
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>
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>
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>
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).
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>
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>
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
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>