]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
6 months agogh-91069: do not disable `sha3` in `test_hashlib` under UBSan (#133001)
Bénédikt Tran [Sun, 27 Apr 2025 09:51:00 +0000 (11:51 +0200)] 
gh-91069: do not disable `sha3` in `test_hashlib` under UBSan (#133001)

6 months agogh-124703: Set return code to 1 when aborting process from pdb (#133013)
Tian Gao [Sat, 26 Apr 2025 22:43:23 +0000 (15:43 -0700)] 
gh-124703: Set return code to 1 when aborting process from pdb (#133013)

6 months agogh-63882: Implement some `test_minidom` tests (#132879)
Stan Ulbrych [Sat, 26 Apr 2025 20:03:48 +0000 (21:03 +0100)] 
gh-63882: Implement some `test_minidom` tests (#132879)

Co-authored-by: Julian Gindi <julian@gindi.io>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
6 months agogh-133016: Fix a reference to removed `asyncio.futures.TimeoutError` (#133019)
John [Sat, 26 Apr 2025 18:57:08 +0000 (13:57 -0500)] 
gh-133016: Fix a reference to removed `asyncio.futures.TimeoutError` (#133019)

Just use the builtin `TimeoutError`, and remove the import of `futures`.

6 months agogh-131798: JIT: Propagate the result in `_BINARY_OP_SUBSCR_TUPLE_INT` (GH-133003)
Tomas R. [Sat, 26 Apr 2025 18:47:55 +0000 (20:47 +0200)] 
gh-131798: JIT: Propagate the result in `_BINARY_OP_SUBSCR_TUPLE_INT` (GH-133003)

6 months agogh-63882: Use `self.assert*` methods in `test_minidom` (#133000)
Stan Ulbrych [Sat, 26 Apr 2025 18:24:54 +0000 (19:24 +0100)] 
gh-63882: Use `self.assert*` methods in `test_minidom` (#133000)

6 months agogh-133006: Add subprocess check for remote pdb test (#133014)
Tian Gao [Sat, 26 Apr 2025 18:09:09 +0000 (11:09 -0700)] 
gh-133006: Add subprocess check for remote pdb test (#133014)

6 months agogh-132991: Add socket.IP_FREEBIND constant (GH-132998)
Alyssa Ross [Sat, 26 Apr 2025 17:54:12 +0000 (19:54 +0200)] 
gh-132991: Add socket.IP_FREEBIND constant (GH-132998)

6 months agogh-131298: update `Modules/Setup` after HACL* static linking changes (#133012)
Anthony Sottile [Sat, 26 Apr 2025 16:44:19 +0000 (12:44 -0400)] 
gh-131298: update `Modules/Setup` after HACL* static linking changes (#133012)

This was overlooked in 5f2ba152a0471f6f556ca2d9486e5ba486fcfbde.

6 months agogh-132987: Support __index__() for "k" and "K" formats in PyArg_Parse (GH-132988)
Serhiy Storchaka [Sat, 26 Apr 2025 14:14:18 +0000 (17:14 +0300)] 
gh-132987: Support __index__() for "k" and "K" formats in PyArg_Parse (GH-132988)

6 months agogh-132388: remove outdated TODO comment in `test_hmac.py` (#133008)
Bénédikt Tran [Sat, 26 Apr 2025 13:17:03 +0000 (15:17 +0200)] 
gh-132388: remove outdated TODO comment in `test_hmac.py` (#133008)

6 months agogh-91221: fix `test_curses.test_use_default_colors` for xterm-256color (#132990)
Bénédikt Tran [Sat, 26 Apr 2025 10:38:27 +0000 (12:38 +0200)] 
gh-91221: fix `test_curses.test_use_default_colors` for xterm-256color (#132990)

Terminals with `xterm-256color` Xterm support may use 15 (bright white) as their default foreground color.

6 months agogh-132781: fix refleaks in `crossinterp_exceptions.h` post gh-132782 (#132989)
Bénédikt Tran [Sat, 26 Apr 2025 10:14:14 +0000 (12:14 +0200)] 
gh-132781: fix refleaks in `crossinterp_exceptions.h` post gh-132782 (#132989)

6 months agogh-132781: Make NotShareableError a TypeError Subclass (gh-132973)
Eric Snow [Fri, 25 Apr 2025 21:10:43 +0000 (15:10 -0600)] 
gh-132781: Make NotShareableError a TypeError Subclass (gh-132973)

It was a subclass of ValueError. However, shareability is a feature of types, not values.

6 months agogh-132781: Cleanup Code Related to NotShareableError (gh-132782)
Eric Snow [Fri, 25 Apr 2025 20:43:38 +0000 (14:43 -0600)] 
gh-132781: Cleanup Code Related to NotShareableError (gh-132782)

The following are added to the internal C-API:

* _PyErr_FormatV()
* _PyErr_SetModuleNotFoundError()
* _PyXIData_GetNotShareableErrorType()
* _PyXIData_FormatNotShareableError()

We also drop _PyXIData_lookup_context_t and _PyXIData_GetLookupContext().

6 months agogh-131798: JIT: Narrow the return type of _CALL_LEN to int (#132940)
Diego Russo [Fri, 25 Apr 2025 18:57:42 +0000 (19:57 +0100)] 
gh-131798: JIT: Narrow the return type of _CALL_LEN to int (#132940)

Reduce unnecessary guards whenever `len()` is called and used
after.

Co-authored-by: Max Bernstein <tekknolagi@gmail.com>
6 months agogh-132950: Log is_remote_debug_enabled() in pythoninfo (#132965)
Victor Stinner [Fri, 25 Apr 2025 18:13:47 +0000 (20:13 +0200)] 
gh-132950: Log is_remote_debug_enabled() in pythoninfo (#132965)

 Log also the Py_REMOTE_DEBUG macro.

6 months agogh-91048: Prevent optimizing away the asyncio debug offsets structure on Windows...
Pablo Galindo Salgado [Fri, 25 Apr 2025 17:43:32 +0000 (18:43 +0100)] 
gh-91048: Prevent optimizing away the asyncio debug offsets structure on Windows (#132963)

To avoid having the debug sections being optimised away by the compiler
we use  __attribute__((used)) on gcc and clang but in Windows this is
not supported by the Microsoft compiler and there is no equivalent flag.
Unfortunately Windows offers almost no alternative other than exporting
the symbol in the dynamic table or using it somehow.

6 months agogh-132912: Use readline to synchronize between procs in remote pdb test (#132949)
Tian Gao [Fri, 25 Apr 2025 17:40:18 +0000 (10:40 -0700)] 
gh-132912: Use readline to synchronize between procs in remote pdb test (#132949)

6 months agogh-132950: Skip test_remote_pdb if remote exec is disabled (#132951)
Victor Stinner [Fri, 25 Apr 2025 17:28:25 +0000 (19:28 +0200)] 
gh-132950: Skip test_remote_pdb if remote exec is disabled (#132951)

6 months agogh-132776: Revert Moving memoryview XIData Code to memoryobject.c (gh-132960)
Eric Snow [Fri, 25 Apr 2025 16:43:50 +0000 (10:43 -0600)] 
gh-132776: Revert Moving memoryview XIData Code to memoryobject.c (gh-132960)

This is a partial revert of gh-132821.  It resolves the refleak introduced by that PR.

6 months agogh-132950: Check for Py_SUPPORTS_REMOTE_DEBUG in sys.is_remote_debug_enabled (#132959)
Pablo Galindo Salgado [Fri, 25 Apr 2025 16:38:48 +0000 (17:38 +0100)] 
gh-132950: Check for Py_SUPPORTS_REMOTE_DEBUG in sys.is_remote_debug_enabled (#132959)

6 months agogh-107954: Add audit event to PyConfig_Set() (#132958)
Victor Stinner [Fri, 25 Apr 2025 16:30:39 +0000 (18:30 +0200)] 
gh-107954: Add audit event to PyConfig_Set() (#132958)

6 months agogh-107954: Allow setting cpu_count in PyConfig_Set() (#132954)
Victor Stinner [Fri, 25 Apr 2025 16:29:55 +0000 (18:29 +0200)] 
gh-107954: Allow setting cpu_count in PyConfig_Set() (#132954)

* gh-107954: Allow setting cpu_count in PyConfig_Set()

* Update the doc

6 months agogh-91048: Fix _testexternalinspection.c on FreeBSD (#132945)
Victor Stinner [Fri, 25 Apr 2025 14:57:01 +0000 (16:57 +0200)] 
gh-91048: Fix _testexternalinspection.c on FreeBSD (#132945)

6 months agogh-132912: Use SHORT_TIMEOUT in test_remote_pdb (#132939)
Victor Stinner [Fri, 25 Apr 2025 14:00:26 +0000 (16:00 +0200)] 
gh-132912: Use SHORT_TIMEOUT in test_remote_pdb (#132939)

Replace hardcoded timeout of 5 seconds with SHORT_TIMEOUT.

6 months agogh-132912: Account for race in test_keyboard_interrupt in test_remote_pdb (#132929)
Pablo Galindo Salgado [Fri, 25 Apr 2025 13:46:44 +0000 (14:46 +0100)] 
gh-132912: Account for race in test_keyboard_interrupt in test_remote_pdb (#132929)

6 months agogh-132527: Added missing `w` typecode to array() error message (#132529)
Christian Veenhuis [Fri, 25 Apr 2025 13:31:05 +0000 (15:31 +0200)] 
gh-132527: Added missing `w` typecode to array() error message (#132529)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
6 months agogh-132912: Set 15 min timeout on GHA Hypothesis CI (#132914)
Victor Stinner [Fri, 25 Apr 2025 13:29:16 +0000 (15:29 +0200)] 
gh-132912: Set 15 min timeout on GHA Hypothesis CI (#132914)

6 months agogh-91048: Refactor _testexternalinspection and add Windows support (#132852)
Pablo Galindo Salgado [Fri, 25 Apr 2025 13:12:16 +0000 (14:12 +0100)] 
gh-91048: Refactor _testexternalinspection and add Windows support (#132852)

6 months agogh-132798: Schedule removal of `PyUnicode_AsDecoded/Encoded` functions for 3.15 ...
Stan Ulbrych [Fri, 25 Apr 2025 13:07:41 +0000 (14:07 +0100)] 
gh-132798: Schedule removal of `PyUnicode_AsDecoded/Encoded` functions for 3.15 (#132799)

Co-authored-by: Victor Stinner <vstinner@python.org>
6 months agogh-129027: Raise DeprecationWarning for sys._clear_type_cache (#129043)
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) [Fri, 25 Apr 2025 12:01:48 +0000 (17:31 +0530)] 
gh-129027: Raise DeprecationWarning for sys._clear_type_cache (#129043)

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>
6 months agogh-132912: Skip flaky test in test_remote_pdb (#132924)
Victor Stinner [Fri, 25 Apr 2025 11:46:43 +0000 (13:46 +0200)] 
gh-132912: Skip flaky test in test_remote_pdb (#132924)

6 months agogh-113539: Enable using ``$BROWSER`` to reorder default seach order in webbrowser...
Ronald Oussoren [Fri, 25 Apr 2025 11:36:18 +0000 (13:36 +0200)] 
gh-113539: Enable using ``$BROWSER`` to reorder default seach order in webbrowser.py (#113561)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
6 months agogh-132921: Fix setuptools._distutils.dep_util deprecation (#132923)
Victor Stinner [Fri, 25 Apr 2025 11:31:19 +0000 (13:31 +0200)] 
gh-132921: Fix setuptools._distutils.dep_util deprecation (#132923)

Replace setuptools._distutils.dep_util with setuptools.modified in
peg_generator compile_c_extension().

6 months agogh-132912: Kill the process on error in test_remote_pdb (#132920)
Victor Stinner [Fri, 25 Apr 2025 11:14:59 +0000 (13:14 +0200)] 
gh-132912: Kill the process on error in test_remote_pdb (#132920)

If a test fails (such as an assertion error), kill the child process.

6 months agogh-132909: handle overflow for `'K'` format in `do_mkvalue` (#132911)
Bénédikt Tran [Fri, 25 Apr 2025 11:02:57 +0000 (13:02 +0200)] 
gh-132909: handle overflow for `'K'` format in `do_mkvalue` (#132911)

6 months agogh-132415: Use shutil.which() in missing_compiler_executable() (#132906)
Victor Stinner [Fri, 25 Apr 2025 09:50:55 +0000 (11:50 +0200)] 
gh-132415: Use shutil.which() in missing_compiler_executable() (#132906)

Replace deprecated distutils.spawn.find_executable() with
shutil.which() in missing_compiler_executable() of test.support.

6 months agogh-131423: Update OpenSSL data to 3.4.1 on Linux (#131618)
Bénédikt Tran [Fri, 25 Apr 2025 08:26:58 +0000 (10:26 +0200)] 
gh-131423: Update OpenSSL data to 3.4.1 on Linux (#131618)

OpenSSL 3.4.1 mnemonics are not compatible with OpenSSL 3.4.0 ones since
they were renumbered [1, 2]. Consequently, `_ssl_data_34.h` is renamed to
`_ssl_data_340.h` and `_ssl_data_34.h` now contains OpenSSL 3.4.1 mnemonics.

We also refine the mnemonics that are selected, discarding those that are
mnemonic-like but should not be used as such. More precisely, we remove
the ERR_LIB_MASK and ERR_LIB_OFFSET entries from OpenSSL 1.1.1 data.

[1]: https://github.com/openssl/openssl/issues/26316
[2]: https://github.com/openssl/openssl/issues/26388

6 months agogh-127906: Add missing sys import to test_cppext (#132902)
Victor Stinner [Fri, 25 Apr 2025 08:19:26 +0000 (10:19 +0200)] 
gh-127906: Add missing sys import to test_cppext (#132902)

6 months agogh-131652: remove duplicated bits in `Lib/test/clinic.test.c` (#131653)
Bénédikt Tran [Fri, 25 Apr 2025 08:19:12 +0000 (10:19 +0200)] 
gh-131652: remove duplicated bits in `Lib/test/clinic.test.c` (#131653)

6 months agogh-132868: use `_Alignof()` C11 operator in the `struct` module (#132872)
Sergey B Kirpichev [Fri, 25 Apr 2025 07:57:22 +0000 (10:57 +0300)] 
gh-132868: use `_Alignof()` C11 operator in the `struct` module (#132872)

6 months agogh-127604: Only define dump_pointer() if CAN_C_BACKTRACE (#132897)
Victor Stinner [Fri, 25 Apr 2025 07:28:34 +0000 (09:28 +0200)] 
gh-127604: Only define dump_pointer() if CAN_C_BACKTRACE (#132897)

6 months agogh-132684: [Enum] only call _missing_ in __contains__ for Flags (GH-132790)
Ethan Furman [Fri, 25 Apr 2025 06:13:54 +0000 (23:13 -0700)] 
gh-132684: [Enum] only call _missing_ in __contains__ for Flags (GH-132790)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
6 months agogh-132893: More accurate CDF computation (gh-132895)
Raymond Hettinger [Fri, 25 Apr 2025 05:34:55 +0000 (00:34 -0500)] 
gh-132893: More accurate CDF computation (gh-132895)

6 months agogh-98347: Add links to python-isal in the documentation (#98637)
Ruben Vorderman [Fri, 25 Apr 2025 01:53:23 +0000 (03:53 +0200)] 
gh-98347: Add links to python-isal in the documentation (#98637)

Clearly note that this is primarily intended for users for who zlib/gzip is a bottleneck.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
6 months agogh-129858: Special syntax error for `elif` block after `else` (#129902)
Steele Farnsworth [Fri, 25 Apr 2025 01:25:48 +0000 (21:25 -0400)] 
gh-129858: Special syntax error for `elif` block after `else` (#129902)

6 months agogh-69605: Add module autocomplete to PyREPL (#129329)
Tomas R. [Fri, 25 Apr 2025 01:24:26 +0000 (03:24 +0200)] 
gh-69605: Add module autocomplete to PyREPL (#129329)

6 months agogh-131591: Implement PEP 768 support for FAT mac binaries and 32 bit binaries (#132892)
Pablo Galindo Salgado [Fri, 25 Apr 2025 00:58:19 +0000 (01:58 +0100)] 
gh-131591: Implement PEP 768 support for FAT mac binaries and 32 bit binaries (#132892)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
6 months agogh-131591: Allow pdb to attach to a running process (#132451)
Matt Wozniski [Fri, 25 Apr 2025 00:43:23 +0000 (20:43 -0400)] 
gh-131591: Allow pdb to attach to a running process (#132451)

Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
6 months agogh-131591: Reset RemoteDebuggerSuupport state after fork (#132793)
Nadeshiko Manju [Fri, 25 Apr 2025 00:40:01 +0000 (08:40 +0800)] 
gh-131591: Reset RemoteDebuggerSuupport state after fork (#132793)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
6 months agogh-132776: Cleanup for XIBufferViewType (gh-132821)
Eric Snow [Fri, 25 Apr 2025 00:25:29 +0000 (18:25 -0600)] 
gh-132776: Cleanup for XIBufferViewType (gh-132821)

* add notes
* rename XIBufferViewObject to xibufferview
* move memoryview XIData code to memoryobject.c

6 months agogh-132415: Update vendored setuptools in ``Lib/test/wheeldata`` (#132887)
Adam Turner [Thu, 24 Apr 2025 23:46:20 +0000 (00:46 +0100)] 
gh-132415: Update vendored setuptools in ``Lib/test/wheeldata`` (#132887)

6 months agoGH-131798: Split up and optimize CALL_TUPLE_1 in the JIT (GH-132851)
Tomas R. [Thu, 24 Apr 2025 22:55:03 +0000 (00:55 +0200)] 
GH-131798: Split up and optimize CALL_TUPLE_1 in the JIT (GH-132851)

6 months agoDifferentiate bitwise OR from the word "or" (#132890)
Brett Cannon [Thu, 24 Apr 2025 22:05:02 +0000 (15:05 -0700)] 
Differentiate bitwise OR from the word "or" (#132890)

6 months agogh-127385: Add F_DUPFD_QUERY to fcntl (GH-127386)
RUANG (James Roy) [Thu, 24 Apr 2025 21:06:42 +0000 (05:06 +0800)] 
gh-127385: Add F_DUPFD_QUERY to fcntl (GH-127386)

6 months agogh-93696: Fixed the breakpoint display error for frozen modules (#132862)
Tian Gao [Thu, 24 Apr 2025 20:07:27 +0000 (13:07 -0700)] 
gh-93696: Fixed the breakpoint display error for frozen modules (#132862)

6 months agoGH-131798: Split up and optimize CALL_STR_1 in the JIT (GH-132849)
Tomas R. [Thu, 24 Apr 2025 19:54:46 +0000 (21:54 +0200)] 
GH-131798: Split up and optimize CALL_STR_1 in the JIT (GH-132849)

6 months agogh-132737: Support profiling modules that require __main___ (#132738)
Aneesh Durg [Thu, 24 Apr 2025 18:41:01 +0000 (13:41 -0500)] 
gh-132737: Support profiling modules that require __main___ (#132738)

6 months agogh-132882: Fix copying of unions with members that do not support __or__ (#132883)
Jelle Zijlstra [Thu, 24 Apr 2025 16:49:09 +0000 (09:49 -0700)] 
gh-132882: Fix copying of unions with members that do not support __or__ (#132883)

6 months agogh-132742: Refactor fcntl.fcntl() and fcntl.ioctl() (GH-132768)
Serhiy Storchaka [Thu, 24 Apr 2025 16:17:11 +0000 (19:17 +0300)] 
gh-132742: Refactor fcntl.fcntl() and fcntl.ioctl()  (GH-132768)

* Support arbitrary bytes-like objects, not only bytes, in fcntl().
* The fcntl() buffer argument is now null-terminated.
* Automatically retry an ioctl() system calls failing with EINTR.
* Release the GIL for an ioctl() system call even for large bytes-like object.
* Do not silence arbitrary errors whet try to get a buffer.
* Optimize argument parsing, check the argument type before trying to get
  a buffer or convert it to integer.
* Fix some error messages.

6 months agoUse os.openpty() instead of pty.openpty() in test_ioctl (GH-132880)
Serhiy Storchaka [Thu, 24 Apr 2025 16:07:00 +0000 (19:07 +0300)] 
Use os.openpty() instead of pty.openpty() in test_ioctl (GH-132880)

pty.openpty() does not work on Android, and it is easier to check
availability of os.openpty.

6 months agogh-125206: don't use CMPLX in libffi complex configure test (#132865)
Sergey B Kirpichev [Thu, 24 Apr 2025 15:45:29 +0000 (18:45 +0300)] 
gh-125206: don't use CMPLX in libffi complex configure test (#132865)

See https://sourceware.org/bugzilla/show_bug.cgi?id=26287

This amends aac89b5.

6 months agogh-132162: Add tests for Py_UniversalNewlineFgets() (#132164)
alexey semenyuk [Thu, 24 Apr 2025 15:43:48 +0000 (20:43 +0500)] 
gh-132162: Add tests for Py_UniversalNewlineFgets() (#132164)

6 months agogh-118761: Optimise import time for ``shlex`` (#132036)
Adam Turner [Thu, 24 Apr 2025 15:10:46 +0000 (16:10 +0100)] 
gh-118761: Optimise import time for ``shlex`` (#132036)

6 months agoFix a grammar error in the `Py_ALWAYS_INLINE` doc (#129304)
Kuba_Z2 [Thu, 24 Apr 2025 14:20:48 +0000 (16:20 +0200)] 
Fix a grammar error in the `Py_ALWAYS_INLINE` doc (#129304)

6 months agogh-89157: Make C and Python implementation of `datetime.date.fromisoformat` consisten...
Stan Ulbrych [Thu, 24 Apr 2025 14:16:07 +0000 (15:16 +0100)] 
gh-89157: Make C and Python implementation of `datetime.date.fromisoformat` consistent (#131007)

6 months agogh-130195: Fix typo in warning message (#130254)
Stan Ulbrych [Thu, 24 Apr 2025 14:06:12 +0000 (15:06 +0100)] 
gh-130195: Fix typo in warning message (#130254)

Co-authored-by: Éric <merwok@netwok.org>
6 months agodoc: update co_flags reference (#132300)
Inada Naoki [Thu, 24 Apr 2025 14:05:56 +0000 (23:05 +0900)] 
doc: update co_flags reference (#132300)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
6 months agogh-128185: Align Decimal docs with spec (case irrelevant for nan/inf) (#128323)
Sergey B Kirpichev [Thu, 24 Apr 2025 14:02:49 +0000 (17:02 +0300)] 
gh-128185: Align Decimal docs with spec (case irrelevant for nan/inf) (#128323)

6 months agogh-122399: change webbrowser.rst to better describe the contents of controller object...
Jordi Burguet-Castell [Thu, 24 Apr 2025 13:56:52 +0000 (15:56 +0200)] 
gh-122399: change webbrowser.rst to better describe the contents of controller object (#122407)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
6 months agoFix typo in the garbage_collector.md file (#132803)
Nybblista [Thu, 24 Apr 2025 13:46:39 +0000 (16:46 +0300)] 
Fix typo in the garbage_collector.md file (#132803)

6 months agogh-121249: fix naming of struct tagPyCArgObject members (#132863)
Sergey B Kirpichev [Thu, 24 Apr 2025 09:50:47 +0000 (12:50 +0300)] 
gh-121249: fix naming of struct tagPyCArgObject members (#132863)

It seems, no code actually uses these names, only sizes of the unnamed
union members are important.  Though, I think it's good to be here
consistent wrt type codes ('g' for long double, etc).

This amends 85f89cb3e6.

6 months agogh-132859: Run debugger scripts in their own namespaces (#132860)
Matt Wozniski [Wed, 23 Apr 2025 23:40:24 +0000 (19:40 -0400)] 
gh-132859: Run debugger scripts in their own namespaces (#132860)

Run debugger scripts in their own namespaces

Previously scripts injected by `sys.remote_exec` were run with the
globals of the `__main__` module. Instead, run each injected script
with an empty set of globals. If someone really wants to use the
`__main__` module's namespace, they can always `import __main__`.

6 months agogh-127604: Replace dprintf() with _Py_write_noraise() (#132854)
Victor Stinner [Wed, 23 Apr 2025 20:02:25 +0000 (22:02 +0200)] 
gh-127604: Replace dprintf() with _Py_write_noraise() (#132854)

6 months agogh-131591: Check for remote debug in PyErr_CheckSignals (#132853)
Pablo Galindo Salgado [Wed, 23 Apr 2025 19:59:41 +0000 (20:59 +0100)] 
gh-131591: Check for remote debug in PyErr_CheckSignals (#132853)

For the same reasons as running the GC, this will allow sections that
run in native code for long periods without executing bytecode to also
run the remote debugger protocol without having to wait until bytecode
is executed

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
6 months agogh-83994, gh-132843: Fix and improve test_ioctl (GH-132848)
Serhiy Storchaka [Wed, 23 Apr 2025 18:45:55 +0000 (21:45 +0300)] 
gh-83994, gh-132843: Fix and improve test_ioctl (GH-132848)

* Skip test_ioctl_tcflush if termios.TCFLSH is not available.
* Do not skip ALL ioctl() tests when /dev/tty is not available.

6 months agogh-132719: Skip multiprocessing test if missing ctypes (#132846)
Victor Stinner [Wed, 23 Apr 2025 18:33:15 +0000 (20:33 +0200)] 
gh-132719: Skip multiprocessing test if missing ctypes (#132846)

Skip test_rlock_locked_2processes() if multiprocessing.sharedctypes
is missing (need ctypes).

6 months agogh-127604: Allow faulthandler to dumpC stack on MacOS (#132841)
Pablo Galindo Salgado [Wed, 23 Apr 2025 17:23:24 +0000 (18:23 +0100)] 
gh-127604: Allow faulthandler to dumpC stack on MacOS (#132841)

6 months agogh-91048: Add ability to list all pending asyncio tasks in a process remotely (#132807)
Łukasz Langa [Wed, 23 Apr 2025 17:22:29 +0000 (19:22 +0200)] 
gh-91048: Add ability to list all pending asyncio tasks in a process remotely (#132807)

6 months agogh-132825: Fix typo in dict_unhashable_type() name (#132847)
Victor Stinner [Wed, 23 Apr 2025 16:54:13 +0000 (18:54 +0200)] 
gh-132825: Fix typo in dict_unhashable_type() name (#132847)

6 months agogh-132825: Enhance unhashable error messages for dict and set (#132828)
Victor Stinner [Wed, 23 Apr 2025 15:10:09 +0000 (17:10 +0200)] 
gh-132825: Enhance unhashable error messages for dict and set (#132828)

6 months agogh-132719: Skip multiprocessing test if missing ctypes (#132842)
Victor Stinner [Wed, 23 Apr 2025 14:36:25 +0000 (16:36 +0200)] 
gh-132719: Skip multiprocessing test if missing ctypes (#132842)

Skip test_lock_locked_2processes() if multiprocessing.sharedctypes is
missing (need ctypes).

6 months agogh-127604: Fix refleak in faulthandler_dump_c_stack_py() (#132840)
Victor Stinner [Wed, 23 Apr 2025 14:29:31 +0000 (16:29 +0200)] 
gh-127604: Fix refleak in faulthandler_dump_c_stack_py() (#132840)

6 months agogh-132713: Fix typing.Union[index] race condition (#132802)
Victor Stinner [Wed, 23 Apr 2025 13:45:42 +0000 (15:45 +0200)] 
gh-132713: Fix typing.Union[index] race condition (#132802)

Add union_init_parameters() helper function. Use a critical section
to initialize the 'parameters' member.

6 months agogh-132449: Improve the algorithm to detect typos in keywords (#132837)
Pablo Galindo Salgado [Wed, 23 Apr 2025 13:45:18 +0000 (14:45 +0100)] 
gh-132449: Improve the algorithm to detect typos in keywords (#132837)

6 months agogh-121249: adjust formatting codes for complex types in struct/ctypes (#132827)
Sergey B Kirpichev [Wed, 23 Apr 2025 13:38:24 +0000 (16:38 +0300)] 
gh-121249: adjust formatting codes for complex types in struct/ctypes (#132827)

* F - for float _Complex
* D - for double _Complex
* G - for long double _Complex (not supported by the struct module)

6 months agogh-132449: Add whatsnew entry for typos in keywords (#132838)
Pablo Galindo Salgado [Wed, 23 Apr 2025 13:27:53 +0000 (14:27 +0100)] 
gh-132449: Add whatsnew entry for typos in keywords (#132838)

6 months agogh-132742: Update documentation for the fcntl module (GH-132765)
Serhiy Storchaka [Wed, 23 Apr 2025 11:27:21 +0000 (14:27 +0300)] 
gh-132742: Update documentation for the fcntl module (GH-132765)

6 months agogh-132734: Fix build on FreeBSD and old Linux (GH-132829)
Serhiy Storchaka [Wed, 23 Apr 2025 11:08:30 +0000 (14:08 +0300)] 
gh-132734: Fix build on FreeBSD and old Linux (GH-132829)

6 months agogh-132758: Fix tail call and pystats builds (GH-132759)
Ken Jin [Wed, 23 Apr 2025 10:17:35 +0000 (18:17 +0800)] 
gh-132758: Fix tail call and pystats builds (GH-132759)

6 months agogh-132713: Simplify list_repr_impl() (#132811)
Victor Stinner [Wed, 23 Apr 2025 06:59:30 +0000 (08:59 +0200)] 
gh-132713: Simplify list_repr_impl() (#132811)

6 months agogh-131913: multiprocessing: add interrupt for POSIX (GH-132453)
pulkin [Wed, 23 Apr 2025 06:55:24 +0000 (08:55 +0200)] 
gh-131913: multiprocessing: add interrupt for POSIX (GH-132453)

* multiprocessing: interrupt

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
6 months agogh-109981: Resolve situation on iOS regarding fd_count. (#132823)
John [Wed, 23 Apr 2025 03:22:57 +0000 (22:22 -0500)] 
gh-109981: Resolve situation on iOS regarding fd_count. (#132823)

Modifies the test helper that counts the list of open file descriptors to use
the optimised ``/dev/fd`` approach on all Apple platforms, not just macOS. This
avoids crashes caused by guarded file descriptors.

6 months agogh-132776: Minor Fixes for XIBufferViewType (gh-132779)
Eric Snow [Tue, 22 Apr 2025 23:37:20 +0000 (17:37 -0600)] 
gh-132776: Minor Fixes for XIBufferViewType (gh-132779)

This change covers the following:

* dealloc: no cleanup if no buffer set
* dealloc: handle already-destroyed interpreter correctly
* handle errors in _memoryview_from_xid() correctly
* clean up the buffer if the xidata is never used

6 months agogh-132713: Fix repr(list) race condition (#132801)
Victor Stinner [Tue, 22 Apr 2025 20:09:35 +0000 (22:09 +0200)] 
gh-132713: Fix repr(list) race condition (#132801)

Hold a strong reference to the item while calling repr(item).

6 months agoCODEOWNERS: add myself to unionobject.c (#132808)
Jelle Zijlstra [Tue, 22 Apr 2025 18:32:22 +0000 (11:32 -0700)] 
CODEOWNERS: add myself to unionobject.c (#132808)

6 months agoGH-131798: JIT: Split CALL_TYPE_1 into several uops (GH-132419)
Tomas R. [Tue, 22 Apr 2025 16:30:38 +0000 (18:30 +0200)] 
GH-131798: JIT: Split CALL_TYPE_1 into several uops (GH-132419)

6 months agoUpdate `pre-commit` repos (#132792)
sobolevn [Tue, 22 Apr 2025 15:32:19 +0000 (18:32 +0300)] 
Update `pre-commit` repos (#132792)

6 months agogh-132470: Prevent crash in ctypes.CField when `byte_size` is incorrect (#132475)
dura0ok [Tue, 22 Apr 2025 13:13:00 +0000 (20:13 +0700)] 
gh-132470: Prevent crash in ctypes.CField when `byte_size` is incorrect (#132475)

Fix: Prevent crash in ctypes.CField when byte_size does not match type size  (gh-132470)

When creating a ctypes.CField with an incorrect byte_size (e.g., using `byte_size=2` for `ctypes.c_byte`), the code would previously abort due to the failed assertion `byte_size == info->size`.

This commit replaces the assertion with a proper error handling mechanism that raises a `ValueError` when `byte_size` does not match the expected type size. This prevents the crash and provides a more informative error message to the us

Co-authored-by: sobolevn <mail@sobolevn.me>