]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
6 months agoGH-128520: pathlib ABCs: raise text encoding warnings at correct stack level (#133051)
Barney Gale [Mon, 28 Apr 2025 18:04:20 +0000 (19:04 +0100)] 
GH-128520: pathlib ABCs: raise text encoding warnings at correct stack level (#133051)

Ensure that warnings about unspecified text encodings are emitted from
`ReadablePath.read_text()`, `WritablePath.write_text()` and `magic_open()`
with the correct stack level set.

6 months agogh-132775: Cleanup Related to crossinterp.c Before Further Changes (gh-132974)
Eric Snow [Mon, 28 Apr 2025 17:55:15 +0000 (11:55 -0600)] 
gh-132775: Cleanup Related to crossinterp.c Before Further Changes (gh-132974)

This change consists of adding tests and moving code around, with some renaming thrown in.

6 months agogh-133054: Skip `test_pyrepl` tests when `cannot use pyrepl` is reported (#133055)
sobolevn [Mon, 28 Apr 2025 16:09:28 +0000 (19:09 +0300)] 
gh-133054: Skip `test_pyrepl` tests when `cannot use pyrepl` is reported (#133055)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
6 months agogh-132952: Speed up startup by importing _io instead of io (#132957)
Jelle Zijlstra [Mon, 28 Apr 2025 15:38:56 +0000 (08:38 -0700)] 
gh-132952: Speed up startup by importing _io instead of io (#132957)

6 months agotyping, annotationlib: clean tests (#133087)
Jelle Zijlstra [Mon, 28 Apr 2025 15:38:11 +0000 (08:38 -0700)] 
typing, annotationlib: clean tests (#133087)

- Add @cpython_only decorator to lazy import tests
- Rename reference to SOURCE format
- Always two newlines between test case classes
- Merge two classes of ForwardRef tests
- Use get_annotations instead of annotationlib.get_annotations
- Format test_annotationlib with Black (not expecting that we'll keep this up
  but it's close to Black-formatted right now)

6 months agogh-129965: Add more missing MIME types (#132845)
Hugo van Kemenade [Mon, 28 Apr 2025 15:30:35 +0000 (18:30 +0300)] 
gh-129965: Add more missing MIME types (#132845)

6 months agogh-132915: Try to detect a buffer overflow in fcntl() and ioctl() (GH-132919)
Serhiy Storchaka [Mon, 28 Apr 2025 14:56:10 +0000 (17:56 +0300)] 
gh-132915: Try to detect a buffer overflow in fcntl() and ioctl() (GH-132919)

SystemError is raised when buffer overflow is detected.
The stack and memory can already be corrupted, so treat this error as fatal.

6 months agogh-132726: Change the heading of `sysconfig` CLI section (#133035)
Semyon Moroz [Mon, 28 Apr 2025 14:44:49 +0000 (18:44 +0400)] 
gh-132726: Change the heading of `sysconfig` CLI section (#133035)

6 months agogh-75223: Deprecate undotted extensions in `mimetypes.MimeTypes.add_type` (#128638)
Hugo van Kemenade [Mon, 28 Apr 2025 14:23:57 +0000 (17:23 +0300)] 
gh-75223: Deprecate undotted extensions in `mimetypes.MimeTypes.add_type` (#128638)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Daniel Watkins <daniel@daniel-watkins.co.uk>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
6 months agogh-132983: Convert compression._common to a package (#133086)
Victor Stinner [Mon, 28 Apr 2025 14:13:06 +0000 (16:13 +0200)] 
gh-132983: Convert compression._common to a package (#133086)

Add an "__init__.py" file. Fix test_tools.test_freeze.

6 months agogh-133073: avoid `NULL + 0` arithmetic in `list_extend_*` functions (#133074)
Bénédikt Tran [Mon, 28 Apr 2025 13:59:09 +0000 (15:59 +0200)] 
gh-133073: avoid `NULL + 0` arithmetic in `list_extend_*` functions (#133074)

6 months agogh-87135: Raise PythonFinalizationError when joining a blocked daemon thread (gh...
Petr Viktorin [Mon, 28 Apr 2025 13:48:48 +0000 (15:48 +0200)] 
gh-87135: Raise PythonFinalizationError when joining a blocked daemon thread (gh-130402)

If `Py_IsFinalizing()` is true, non-daemon threads (other than the current one)
are done, and daemon threads are prevented from running, so they
cannot finalize themselves and become done. Joining them (without timeout)
would block forever.

Raise PythonFinalizationError instead of hanging.

Raise even when a timeout is given, for consistency with trying to join your own thread.

See gh-123940 for a use case: calling `join()` from `__del__`. This is
ill-advised, but an exception should at least make it easier to diagnose.

6 months agoFixed a typo in the `PCbuild/readme.txt` about PGO clang-cl (#133083)
Wulian233 [Mon, 28 Apr 2025 13:39:16 +0000 (21:39 +0800)] 
Fixed a typo in the `PCbuild/readme.txt` about PGO clang-cl (#133083)

Fixed a typo in the readme.txt section about PGO clang-cl

6 months agogh-130317: Fix PyFloat_Pack/Unpack[24] for NaN's with payload (#130452)
Sergey B Kirpichev [Mon, 28 Apr 2025 13:23:26 +0000 (16:23 +0300)] 
gh-130317: Fix PyFloat_Pack/Unpack[24] for NaN's with payload (#130452)

Co-authored-by: Victor Stinner <vstinner@python.org>
6 months agogh-130907: Treat all module-level annotations as conditional (#131550)
Jelle Zijlstra [Mon, 28 Apr 2025 13:10:28 +0000 (06:10 -0700)] 
gh-130907: Treat all module-level annotations as conditional (#131550)

6 months agogh-53032: support IEEE 754 contexts in the decimal module (#122003)
Sergey B Kirpichev [Mon, 28 Apr 2025 13:05:56 +0000 (16:05 +0300)] 
gh-53032: support IEEE 754 contexts in the decimal module (#122003)

This was in C version from beginning, but available only
on conditional compilation (EXTRA_FUNCTIONALITY).  Current
patch adds function to create IEEE contexts to the
pure-python module as well.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
6 months agogh-132930: Implement PEP 773 (GH-132931)
Steve Dower [Mon, 28 Apr 2025 12:57:47 +0000 (13:57 +0100)] 
gh-132930: Implement PEP 773 (GH-132931)

This change to the core CPython repo:
* Adds PyManager support to PC/layout
* Adds a warning message to the legacy py.exe if subcommands are invoked
* Add deprecation message to traditional installer
* Updates using/windows docs

6 months agoGH-114911: use time.perf_counter in Stopwatch (GH-131469)
Chris Eibl [Mon, 28 Apr 2025 11:55:08 +0000 (13:55 +0200)] 
GH-114911: use time.perf_counter in Stopwatch (GH-131469)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
6 months agogh-131423: update note in `Tools/ssl/make_ssl_data.py` (#133077)
Bénédikt Tran [Mon, 28 Apr 2025 11:11:46 +0000 (13:11 +0200)] 
gh-131423: update note in `Tools/ssl/make_ssl_data.py` (#133077)

6 months agogh-111178: fix incorrect function signatures for Windows builds (#133072)
Bénédikt Tran [Mon, 28 Apr 2025 11:05:39 +0000 (13:05 +0200)] 
gh-111178: fix incorrect function signatures for Windows builds (#133072)

6 months agogh-133033: Add docs for `TypeIgnore` (#133034)
Yuki Kobayashi [Mon, 28 Apr 2025 10:49:07 +0000 (19:49 +0900)] 
gh-133033: Add docs for `TypeIgnore` (#133034)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
6 months agogh-127604: ensure `-ldl` is passed only once to the linker (#133071)
Bénédikt Tran [Mon, 28 Apr 2025 09:55:02 +0000 (11:55 +0200)] 
gh-127604: ensure `-ldl` is passed only once to the linker (#133071)

6 months agogh-132987: Support __index__() for unsigned integers in Argument Clinic (GH-133011)
Serhiy Storchaka [Mon, 28 Apr 2025 08:02:18 +0000 (11:02 +0300)] 
gh-132987: Support __index__() for unsigned integers in Argument Clinic (GH-133011)

6 months agogh-132742: Improve tests for fcntl.ioctl() (GH-132791)
Serhiy Storchaka [Mon, 28 Apr 2025 07:42:40 +0000 (10:42 +0300)] 
gh-132742: Improve tests for fcntl.ioctl() (GH-132791)

* Use better tests for integer argument.
* Add also parallel tests for tcflush() and tcflow().

6 months agogh-132983: Install compression package contents (#133063)
Emma Smith [Mon, 28 Apr 2025 06:44:20 +0000 (23:44 -0700)] 
gh-132983: Install compression package contents (#133063)

Include compression package contents as part of installs.

6 months agogh-133061: do not mention `UINT32_MAX` in HMAC user-facing messages (#133062)
Bénédikt Tran [Sun, 27 Apr 2025 23:14:12 +0000 (01:14 +0200)] 
gh-133061: do not mention `UINT32_MAX` in HMAC user-facing messages (#133062)

6 months agoDocs: fix a couple typos in `Doc/` (GH-132927)
Yongzi Li [Sun, 27 Apr 2025 22:56:58 +0000 (06:56 +0800)] 
Docs: fix a couple typos in `Doc/` (GH-132927)

fix minor typos

6 months agogh-127604: ensure `-ldl` is passed to the linker when `dladdr1` is found (#133040)
Bénédikt Tran [Sun, 27 Apr 2025 22:28:42 +0000 (00:28 +0200)] 
gh-127604: ensure `-ldl` is passed to the linker when `dladdr1` is found (#133040)

6 months agogh-132993: expose `HASHLIB_GIL_MINSIZE` to private extension modules (#132999)
Bénédikt Tran [Sun, 27 Apr 2025 22:20:15 +0000 (00:20 +0200)] 
gh-132993: expose `HASHLIB_GIL_MINSIZE` to private extension modules (#132999)

6 months agogh-133005: Support `tarfile.open(mode="w|xz", preset=...)` (GH-133007)
Michał Górny [Sun, 27 Apr 2025 22:19:59 +0000 (00:19 +0200)] 
gh-133005: Support `tarfile.open(mode="w|xz", preset=...)` (GH-133007)

* gh-133005: Support `tarfile.open(mode="w|xz", preset=...)`

Support passing the `preset` option to `tarfile.open` when the file
is open with `mode="w|xz"`.  This aligns the behavior with `"w:xz"`
mode.

* Also raise an error for `compresslevel` or `preset` with wrong mode

Raise an error if `compresslevel` or `preset` argument is specified
for stream mode with incorrect compression. This should reduce the risk
of mistakes and align the stream modes with regular modes, that raise
an implicit TypeError on unsupported arguments.

* Apply suggestions from code review

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
6 months agoSilence system utils tests in emscripten python.sh (#133044)
Lukas [Sun, 27 Apr 2025 22:13:02 +0000 (00:13 +0200)] 
Silence system utils tests in emscripten python.sh (#133044)

Ensure that checks for system functions don't leak onto stdout on failure.

6 months agogh-132026: Ensure _MIPS_SIM has defined _ABI identifiers for comparison (GH-132027)
Valters Jansons [Sun, 27 Apr 2025 21:56:00 +0000 (00:56 +0300)] 
gh-132026: Ensure _MIPS_SIM has defined _ABI identifiers for comparison (GH-132027)

When built on a MIPS architecture, `_MIPS_SIM` is used to determine
architecture specifics. The value is expected to match either
`_ABIO32`, `_ABIN32` or `_ABI64`.

In `gcc` config/mips/mips.h these values are defined as compiler
`builtin_define` inside of a switch/case. That means, mips64el and
mips64 architectures know about `_ABI64` but don't know about `_ABIO32`
and `_ABIN32`. In turn, when CPython tries to use them in comparison,
they may be undefined identifiers.

In default compiler behavior, the undefined identifier will be
evaluated as zero, and it will not match `_MIPS_SIM`. However, the
issues pop up when `-Wundef` (or, even worse, `-Werror=undef`) compiler
flag is enabled. Then suddenly it's visible as a warning or error.

6 months agogh-132983: Introduce `compression` package and move `_compression` module (GH-133018)
Emma Smith [Sun, 27 Apr 2025 21:41:30 +0000 (14:41 -0700)] 
gh-132983: Introduce `compression` package and move `_compression` module (GH-133018)

* Introduces `compression` package for https://peps.python.org/pep-0784/

This commit introduces the `compression` package, specified in PEP 784
to re-export the `lzma`, `bz2`, `gzip`, and `zlib` modules. Introduction
of `compression.zstd` will be completed in a future commit once the
`_zstd` module is merged.

This commit also moves the `_compression` private module to
`compression._common._streams`.

* Re-exports existing module docstrings.

6 months agogh-133046: Reformat the ``ast`` module docstring (GH-133050)
Hunter Hogan [Sun, 27 Apr 2025 21:35:56 +0000 (16:35 -0500)] 
gh-133046: Reformat the ``ast`` module docstring (GH-133050)

* Fix formatting in module docstring for `ast` https://github.com/python/cpython/issues/133046
* #133046 ast docstring: remove header, dedent, 80-char width.
* Keep existing wrapping

---------

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
6 months agogh-115032: Deprecate support for custom logging handlers with 'strm' argument. (GH...
Mariusz Felisiak [Sun, 27 Apr 2025 21:18:14 +0000 (23:18 +0200)] 
gh-115032: Deprecate support for custom logging handlers with 'strm' argument. (GH-115314)

6 months ago[tests] fix test_fcntl issue when run in a ChromeOS linux runtime (GH-133053)
Gregory P. Smith [Sun, 27 Apr 2025 20:28:23 +0000 (13:28 -0700)] 
[tests] fix test_fcntl issue when run in a ChromeOS linux runtime (GH-133053)

* [tests] test_fcntl fails when run in a ChromeOS linux runtime container.

It doesn't appear to support F_NOTIFY? Detect the lack of that and skip the test.

6 months agogh-127495: Append to history file after every statement in PyREPL (GH-132294)
Sergey B Kirpichev [Sun, 27 Apr 2025 13:32:37 +0000 (16:32 +0300)] 
gh-127495: Append to history file after every statement in PyREPL (GH-132294)

6 months agogh-131798: JIT - Use `sym_new_type` instead of `sym_new_not_null` for _BUILD_STRING...
Nadeshiko Manju [Sun, 27 Apr 2025 12:30:28 +0000 (20:30 +0800)] 
gh-131798: JIT - Use `sym_new_type` instead of `sym_new_not_null` for _BUILD_STRING, _BUILD_SET (GH-132564)

Signed-off-by: Manjusaka <me@manjusaka.me>
6 months agogh-128438: Use `EnvironmentVarGuard` in `test_zoneinfo.py` (#131870)
Wulian233 [Sun, 27 Apr 2025 11:29:37 +0000 (19:29 +0800)] 
gh-128438: Use `EnvironmentVarGuard` in `test_zoneinfo.py` (#131870)

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.