]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
6 months agogh-91555: disable logger while handling log record (GH-131812)
Duane Griffin [Thu, 8 May 2025 12:33:06 +0000 (00:33 +1200)] 
gh-91555: disable logger while handling log record (GH-131812)

Prevent the possibility of re-entrancy leading to deadlock or infinite recursion (caused by logging triggered by logging), by disabling logging while the logger is handling log messages.

6 months agoUpdate the PCbuild sub-projects list (GH-133397)
Adam Turner [Thu, 8 May 2025 11:31:24 +0000 (12:31 +0100)] 
Update the PCbuild sub-projects list (GH-133397)

6 months agogh-133597: Fix memory leak if error occurred in _sys_getwindowsversion_from_kernel32...
Sergey Miryanov [Thu, 8 May 2025 11:09:20 +0000 (04:09 -0700)] 
gh-133597: Fix memory leak if error occurred in _sys_getwindowsversion_from_kernel32 (GH-133598)

6 months agogh-127833: Add links to token types to the lexical analysis intro (#131468)
Petr Viktorin [Thu, 8 May 2025 09:38:29 +0000 (11:38 +0200)] 
gh-127833: Add links to token types to the lexical analysis intro (#131468)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
6 months agogh-133583: Add support for fixed size unsigned integers in argument parsing (GH-133584)
Serhiy Storchaka [Thu, 8 May 2025 09:27:50 +0000 (12:27 +0300)] 
gh-133583: Add support for fixed size unsigned integers in argument parsing (GH-133584)

* Add Argument Clinic converters: uint8, uint16, uint32, uint64.
* Add private C API: _PyLong_UInt8_Converter(),
  _PyLong_UInt16_Converter(), _PyLong_UInt32_Converter(),
  _PyLong_UInt64_Converter().

6 months agoDoc: Allow translating a code block in the tutorial (#131353)
Stan Ulbrych [Thu, 8 May 2025 09:22:04 +0000 (10:22 +0100)] 
Doc: Allow translating a code block in the tutorial (#131353)

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
6 months agogh-133639: Fix `test_auto_indent_default()` doesn't run `input_code` (#133640)
Tan Long [Thu, 8 May 2025 08:24:19 +0000 (16:24 +0800)] 
gh-133639: Fix `test_auto_indent_default()` doesn't run `input_code` (#133640)

6 months agogh-125028: Prohibit placeholders in partial keywords (GH-126062)
dgpb [Thu, 8 May 2025 07:53:53 +0000 (10:53 +0300)] 
gh-125028: Prohibit placeholders in partial keywords (GH-126062)

6 months agogh-133641: Doc: Add missing source link in ``concurrent.futures`` (#133642)
Jonas Obrist [Thu, 8 May 2025 07:21:51 +0000 (16:21 +0900)] 
gh-133641: Doc: Add missing source link in ``concurrent.futures`` (#133642)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
6 months agogh-133467: Add TSAN suppressions for races in typeobject (gh-133534)
Neil Schemenauer [Thu, 8 May 2025 04:46:23 +0000 (21:46 -0700)] 
gh-133467: Add TSAN suppressions for races in typeobject (gh-133534)

6 months agogh-133532: Run GC fast cycles test in subprocess. (gh-133533)
Neil Schemenauer [Thu, 8 May 2025 04:38:57 +0000 (21:38 -0700)] 
gh-133532: Run GC fast cycles test in subprocess. (gh-133533)

This makes the test more reliable since there are not extra objects on the heap leftover
from other tests.

6 months agogh-132917: Use /proc/self/status for mem usage info. (#133544)
Neil Schemenauer [Thu, 8 May 2025 04:32:23 +0000 (21:32 -0700)] 
gh-132917: Use /proc/self/status for mem usage info. (#133544)

On Linux, use /proc/self/status for mem usage info.  Using smaps_rollup is quite a lot slower and
we can get the similar info from /proc/self/status.

6 months agogh-133551: Skip annotationlib for now in ast roundtrip tests (#133634)
Jelle Zijlstra [Thu, 8 May 2025 02:35:44 +0000 (19:35 -0700)] 
gh-133551: Skip annotationlib for now in ast roundtrip tests (#133634)

6 months agogh-127833: lexical analysis: Add backticks to BOM example (#132407)
Stan Ulbrych [Thu, 8 May 2025 01:34:48 +0000 (02:34 +0100)] 
gh-127833: lexical analysis: Add backticks to BOM example (#132407)

6 months agogh-133555: Allow regenerating the parser with Python < 3.14 (#133557)
Alex Prengère [Thu, 8 May 2025 01:28:20 +0000 (03:28 +0200)] 
gh-133555: Allow regenerating the parser with Python < 3.14 (#133557)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
6 months agogh-133551: Support t-strings in annotationlib (#133553)
Jelle Zijlstra [Thu, 8 May 2025 01:10:35 +0000 (18:10 -0700)] 
gh-133551: Support t-strings in annotationlib (#133553)

I don't know why you'd use t-strings in annotations, but now if you do,
the STRING format will do a great job of recovering the source code.

6 months agogh-132983: Remove pyzstd in identifiers (#133535)
Rogdham [Thu, 8 May 2025 00:47:42 +0000 (02:47 +0200)] 
gh-132983: Remove pyzstd in identifiers (#133535)

6 months agogh-133530: Replace binary tree textual digram with image (gh-133591)
Stan Ulbrych [Thu, 8 May 2025 00:05:06 +0000 (01:05 +0100)] 
gh-133530: Replace binary tree textual digram with image (gh-133591)

Replace with image

6 months agogh-132775: Unrevert "Add _PyCode_VerifyStateless()" (gh-133528)
Eric Snow [Thu, 8 May 2025 00:00:33 +0000 (18:00 -0600)] 
gh-132775: Unrevert "Add _PyCode_VerifyStateless()" (gh-133528)

This reverts commit 3c73cf5 (gh-133497), which itself reverted
the original commit d270bb5 (gh-133221).

We reverted the original change due to failing android tests.
The checks in _PyCode_CheckNoInternalState() were too strict,
so we've relaxed them.

6 months agogh-133361: move the explanation of dict equal before its use (#133424)
Yongzi Li [Wed, 7 May 2025 22:04:49 +0000 (06:04 +0800)] 
gh-133361: move the explanation of dict equal before its use (#133424)

Also move up the explanation of insertion order preservation.  Both paragraphs seemed out of place down where they were.
---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 months agogh-133558: Skip test_pdb tests on FreeBSD (#133566)
Victor Stinner [Wed, 7 May 2025 20:59:29 +0000 (22:59 +0200)] 
gh-133558: Skip test_pdb tests on FreeBSD (#133566)

'\x08' is not interpreted as backspace on FreeBSD.

6 months agowasi: Update the location of the 'config.site' file in the build script (GH-133611)
Zachary Ware [Wed, 7 May 2025 20:48:41 +0000 (15:48 -0500)] 
wasi: Update the location of the 'config.site' file in the build script (GH-133611)

Also remove Tools/wasm from mypy CI workflow

6 months agoTest fixes for 3.15 (GH-133599)
Zachary Ware [Wed, 7 May 2025 19:50:39 +0000 (14:50 -0500)] 
Test fixes for 3.15 (GH-133599)

Followup to 942673ed194813015d98819cfae7eba78ba5e1f9 (GH-133588)

* Update configure for Python 3.15

* Update magic number for 3.15

* Remove deprecated 'check_home' argument from sysconfig.is_python_build

* Add warningignore entries for Modules/_sqlite/clinic/connection.c.h

* Work around c-analyzer complaints about _testclinic deprecation tests

---------

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
6 months agogh-133537: Avoid using console I/O in WinAPI partitions that don't support it (GH...
Max Bachmann [Wed, 7 May 2025 19:47:05 +0000 (21:47 +0200)] 
gh-133537: Avoid using console I/O in WinAPI partitions that don't support it (GH-133538)

6 months agogh-133517: Remove os.listdrive, os.listvolumes and os.listmounts in non-desktop Windo...
Max Bachmann [Wed, 7 May 2025 19:45:42 +0000 (21:45 +0200)] 
gh-133517: Remove os.listdrive, os.listvolumes and os.listmounts in non-desktop Windows builds (GH-133518)

6 months agoMerge branch 'main' of https://github.com/python/cpython
Brett Cannon [Wed, 7 May 2025 19:12:01 +0000 (12:12 -0700)] 
Merge branch 'main' of https://github.com/python/cpython

6 months agogh-133403: Type `Tools/build/update_file.py` and check it with `mypy` (#133404)
sobolevn [Wed, 7 May 2025 19:11:04 +0000 (22:11 +0300)] 
gh-133403: Type `Tools/build/update_file.py` and check it with `mypy` (#133404)

6 months agoGH-133600: Refactor `wasi.py` into `wasi/__main__.py`
Brett Cannon [Wed, 7 May 2025 19:10:53 +0000 (12:10 -0700)] 
GH-133600: Refactor `wasi.py` into `wasi/__main__.py`
Along the way, also move related files into their appropriate directories and update `.github/CODEOWNERS`.

6 months agogh-133575: eliminate legacy checks in `Lib/curses/__init__.py` (#133576)
Bénédikt Tran [Wed, 7 May 2025 18:28:32 +0000 (20:28 +0200)] 
gh-133575: eliminate legacy checks in `Lib/curses/__init__.py` (#133576)

6 months agogh-133516: Raise `ValueError` when constants `True`, `False` or `None` are used as...
TERESH1 [Wed, 7 May 2025 18:11:25 +0000 (21:11 +0300)] 
gh-133516: Raise `ValueError` when constants `True`, `False` or `None` are used as an identifier after NFKC normalization (#133523)

6 months agoFinishing touches to update `main` branch for 3.15 (#133588)
Hugo van Kemenade [Wed, 7 May 2025 17:46:41 +0000 (20:46 +0300)] 
Finishing touches to update `main` branch for 3.15 (#133588)

6 months agoMerge branch 'main' of https://github.com/python/cpython
Hugo van Kemenade [Wed, 7 May 2025 15:53:08 +0000 (18:53 +0300)] 
Merge branch 'main' of https://github.com/python/cpython

6 months agogh-131535: Fix stale example in html.parser docs, make examples doctests (GH-131551)
Brian Schubert [Wed, 7 May 2025 15:50:05 +0000 (11:50 -0400)] 
gh-131535: Fix stale example in html.parser docs, make examples doctests (GH-131551)

6 months agogh-69426: HTMLParser: only unescape properly terminated character entities in attribu...
Sascha Ißbrücker [Wed, 7 May 2025 15:49:49 +0000 (17:49 +0200)] 
gh-69426: HTMLParser: only unescape properly terminated character entities in attribute values (GH-95215)

According to the HTML5 spec, named character references in attribute values
should only be processed if they are not followed by an ASCII alphanumeric,
or an equals sign.

https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state

6 months agoPython 3.15.0a0
Hugo van Kemenade [Wed, 7 May 2025 15:47:42 +0000 (18:47 +0300)] 
Python 3.15.0a0

6 months agoPython 3.14.0b1 v3.14.0b1
Hugo van Kemenade [Tue, 6 May 2025 15:33:32 +0000 (18:33 +0300)] 
Python 3.14.0b1

6 months agoPython 3.14.0b1
Hugo van Kemenade [Tue, 6 May 2025 15:32:57 +0000 (18:32 +0300)] 
Python 3.14.0b1

6 months agogh-123299: Copyedit "What's New in Python 3.14" (#133452)
Hugo van Kemenade [Tue, 6 May 2025 12:05:20 +0000 (15:05 +0300)] 
gh-123299: Copyedit "What's New in Python 3.14" (#133452)

Co-authored-by: Daniel Hollas <danekhollas@gmail.com>
6 months agoGH-132983: Remove zstd version check in the header file (#133502)
Adam Turner [Tue, 6 May 2025 12:04:50 +0000 (13:04 +0100)] 
GH-132983: Remove zstd version check in the header file (#133502)

6 months agogh-77065: Add optional keyword-only argument `echo_char` for `getpass.getpass` (...
Semyon Moroz [Tue, 6 May 2025 11:56:20 +0000 (15:56 +0400)] 
gh-77065: Add optional keyword-only argument `echo_char` for `getpass.getpass` (#130496)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
6 months agogh-132917: Fix data race detected by tsan (#133508)
T. Wouters [Tue, 6 May 2025 11:23:10 +0000 (13:23 +0200)] 
gh-132917: Fix data race detected by tsan (#133508)

Fix data race detected by tsan
(https://github.com/python/cpython/actions/runs/14857021107/job/41712717208?pr=133502):
young.count can be modified by other threads even while the gcstate is
locked.

This is the simplest fix to (potentially) unblock beta 1, although this
particular code path seems like it could just be an atomic swap followed by
an atomic add, without having the lock at all.

6 months agoRevert "gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR...
Irit Katriel [Tue, 6 May 2025 10:12:26 +0000 (11:12 +0100)] 
Revert "gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, apply to arrays (#133396)" (#133498)

6 months agogh-132775: Revert "gh-132775: Add _PyCode_VerifyStateless() (gh-133221)" (#133497)
Petr Viktorin [Tue, 6 May 2025 10:09:41 +0000 (12:09 +0200)] 
gh-132775: Revert "gh-132775: Add _PyCode_VerifyStateless() (gh-133221)" (#133497)

6 months agogh-133490: Fix syntax highlighting for remote PDB (#133494)
Matt Wozniski [Tue, 6 May 2025 09:44:49 +0000 (05:44 -0400)] 
gh-133490: Fix syntax highlighting for remote PDB (#133494)

6 months agogh-132983: Add What's New entry for PEP 784 implementation (#133495)
Emma Smith [Tue, 6 May 2025 06:54:40 +0000 (23:54 -0700)] 
gh-132983: Add What's New entry for PEP 784 implementation (#133495)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
6 months agogh-81793: Replace skip decorators with specific helpers (GH-133493)
Zachary Ware [Tue, 6 May 2025 05:58:38 +0000 (00:58 -0500)] 
gh-81793: Replace skip decorators with specific helpers (GH-133493)

6 months agotyping: Modernize type annotations on IO classes (#133487)
Jelle Zijlstra [Tue, 6 May 2025 05:32:38 +0000 (22:32 -0700)] 
typing: Modernize type annotations on IO classes (#133487)

Remove unnecessary strings, use of Union[], use of List[], and reliance
on implicit Optional.

These type annotations are not actually used for anything but I feel
we should set a good example.

6 months agogh-133490: Add color support to remote PDB (#133491)
Matt Wozniski [Tue, 6 May 2025 05:28:16 +0000 (01:28 -0400)] 
gh-133490: Add color support to remote PDB (#133491)

6 months agoGH-113464: Add the JIT to What's New (GH-133486)
Brandt Bucher [Tue, 6 May 2025 03:06:41 +0000 (20:06 -0700)] 
GH-113464: Add the JIT to What's New (GH-133486)

6 months agogh-132493: Avoid eager evaluation of annotations in `@reprlib.recursive_repr()` ...
Jelle Zijlstra [Tue, 6 May 2025 02:20:11 +0000 (19:20 -0700)] 
gh-132493: Avoid eager evaluation of annotations in `@reprlib.recursive_repr()` (#133411)

6 months agogh-130117: Document why nested `Union`, `Literal`, and `Annotated` types referenced...
Valentin Berlier [Tue, 6 May 2025 02:05:16 +0000 (04:05 +0200)] 
gh-130117: Document why nested `Union`, `Literal`, and `Annotated` types referenced through a type alias are not flattened (#130119)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
6 months agoRemove duplicate includes: Include/internal/ (#132624)
Adam Turner [Tue, 6 May 2025 01:08:42 +0000 (02:08 +0100)] 
Remove duplicate includes: Include/internal/ (#132624)

6 months agogh-132983: Add the `compression.zstd` pacakge and tests (#133365)
Emma Smith [Tue, 6 May 2025 00:38:08 +0000 (17:38 -0700)] 
gh-132983: Add the `compression.zstd` pacakge and tests (#133365)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Rogdham <contact@rogdham.net>
6 months agoGH-132983: Use a standard autoconf version check for zstd (#133479)
Adam Turner [Tue, 6 May 2025 00:35:02 +0000 (01:35 +0100)] 
GH-132983: Use a standard autoconf version check for zstd (#133479)

6 months agogh-102567: Add -X importtime=2 for logging an importtime message for already-loaded...
Noah Kim [Tue, 6 May 2025 00:03:55 +0000 (20:03 -0400)] 
gh-102567: Add -X importtime=2 for logging an importtime message for already-loaded modules (#118655)

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
6 months agoGH-132983: Build ``_zstd`` on Windows (#133366)
Adam Turner [Mon, 5 May 2025 23:58:47 +0000 (00:58 +0100)] 
GH-132983: Build ``_zstd`` on Windows (#133366)

6 months agogh-132775: Add _PyCode_GetXIData() (gh-133475)
Eric Snow [Mon, 5 May 2025 23:46:03 +0000 (17:46 -0600)] 
gh-132775: Add _PyCode_GetXIData() (gh-133475)

6 months agogh-132775: Do Not Set __name__ to __main__ With _PyPickle_GetXIData() (gh-133472)
Eric Snow [Mon, 5 May 2025 23:25:26 +0000 (17:25 -0600)] 
gh-132775: Do Not Set __name__ to __main__ With _PyPickle_GetXIData() (gh-133472)

This is a follow-up to gh-133107.  I realized that we could end up with an
infinite recursion if we try to run a function from __main__ in a subinterpreter.

6 months agogh-91048: Add filename:line_no information to `asyncio pstree` (#133478)
Łukasz Langa [Mon, 5 May 2025 23:07:33 +0000 (01:07 +0200)] 
gh-91048: Add filename:line_no information to `asyncio pstree` (#133478)

6 months agogh-118761: Add test_lazy_import for more modules (#133057)
Daniel Hollas [Mon, 5 May 2025 22:46:05 +0000 (23:46 +0100)] 
gh-118761: Add test_lazy_import for more modules (#133057)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
6 months agoGH-133231: Add JIT utilities in sys._jit (GH-133233)
Brandt Bucher [Mon, 5 May 2025 22:25:22 +0000 (15:25 -0700)] 
GH-133231: Add JIT utilities in sys._jit (GH-133233)

6 months agogh-133469: Adds to advanced section on installing PyManager (GH-133471)
Steve Dower [Mon, 5 May 2025 22:23:08 +0000 (23:23 +0100)] 
gh-133469: Adds to advanced section on installing PyManager (GH-133471)

6 months agogh-132775: Add _PyCode_VerifyStateless() (gh-133221)
Eric Snow [Mon, 5 May 2025 21:48:58 +0000 (15:48 -0600)] 
gh-132775: Add _PyCode_VerifyStateless() (gh-133221)

"Stateless" code is a function or code object which does not rely on external state or internal state.
It may rely on arguments and builtins, but not globals or a closure. I've left a comment in
pycore_code.h that provides more detail.

We also add _PyFunction_VerifyStateless(). The new functions will be used in several later changes
that facilitate "sharing" functions and code objects between interpreters.

6 months agogh-133346: Make theming support in _colorize extensible (GH-133347)
Łukasz Langa [Mon, 5 May 2025 21:45:25 +0000 (23:45 +0200)] 
gh-133346: Make theming support in _colorize extensible (GH-133347)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
6 months agoGH-131798: Split CALL_LEN into several uops (GH-133180)
Diego Russo [Mon, 5 May 2025 21:31:48 +0000 (22:31 +0100)] 
GH-131798: Split CALL_LEN into several uops (GH-133180)

6 months agogh-132917: Use RSS + swap for estimate of process memory usage (gh-133464)
Neil Schemenauer [Mon, 5 May 2025 21:15:05 +0000 (14:15 -0700)] 
gh-132917: Use RSS + swap for estimate of process memory usage (gh-133464)

6 months agogh-132017: Handle SIGCONT in `pyrepl` (#132918)
Stan Ulbrych [Mon, 5 May 2025 20:37:01 +0000 (21:37 +0100)] 
gh-132017: Handle SIGCONT in `pyrepl` (#132918)

6 months agoGH-133261: Make sure trashcan pointers look mortal -- 32 bit (GH-133450)
Mark Shannon [Mon, 5 May 2025 19:51:32 +0000 (20:51 +0100)] 
GH-133261: Make sure trashcan pointers look mortal -- 32 bit (GH-133450)

Make sure trashcan pointer look mortal -- 32 bit

6 months agogh-132975: Improve Remote PDB interrupt handling (#133223)
Matt Wozniski [Mon, 5 May 2025 19:33:59 +0000 (15:33 -0400)] 
gh-132975: Improve Remote PDB interrupt handling (#133223)

6 months agogh-132775: Unrevert "Add _PyCode_GetVarCounts()" (gh-133265)
Eric Snow [Mon, 5 May 2025 19:24:29 +0000 (13:24 -0600)] 
gh-132775: Unrevert "Add _PyCode_GetVarCounts()" (gh-133265)

This reverts commit 811edcf (gh-133232), which itself reverted the original commit 811edcf (gh-133128).

We reverted the original change due to failing s390 builds (a big-endian architecture).
It ended up that I had not accommodated op caches.

6 months agogh-133140: Add `PyUnstable_Object_IsUniquelyReferenced` for free-threading (#133144)
Peter Bierma [Mon, 5 May 2025 19:01:20 +0000 (15:01 -0400)] 
gh-133140: Add `PyUnstable_Object_IsUniquelyReferenced` for free-threading (#133144)

6 months agogh-133349: Enable auto-indent for pdb's multi-line mode (#133350)
Tian Gao [Mon, 5 May 2025 17:48:09 +0000 (10:48 -0700)] 
gh-133349: Enable auto-indent for pdb's multi-line mode (#133350)

6 months agogh-130645: Add color to stdlib argparse CLIs (gh-133380)
Hugo van Kemenade [Mon, 5 May 2025 17:46:46 +0000 (20:46 +0300)] 
gh-130645: Add color to stdlib argparse CLIs (gh-133380)

6 months agogh-133367: Add missing options to `ast` CLI (#133369)
Semyon Moroz [Mon, 5 May 2025 17:17:43 +0000 (21:17 +0400)] 
gh-133367: Add missing options to `ast` CLI (#133369)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
6 months agogh-132917: Check resident set size (RSS) before GC trigger. (gh-133399)
Neil Schemenauer [Mon, 5 May 2025 17:17:05 +0000 (10:17 -0700)] 
gh-132917: Check resident set size (RSS) before GC trigger. (gh-133399)

For the free-threaded build, check the process resident set size (RSS)
increase before triggering a full automatic garbage collection.  If the RSS
has not increased 10% since the last collection then it is deferred.

6 months agoGH-123599: `url2pathname()`: don't call `gethostbyname()` by default (#132610)
Barney Gale [Mon, 5 May 2025 17:03:42 +0000 (18:03 +0100)] 
GH-123599: `url2pathname()`: don't call `gethostbyname()` by default (#132610)

Follow-up to 66cdb2bd8ab93a4691bead7f5d1e54e5ca6895b4.

Add *resolve_host* keyword-only argument to `url2pathname()`, defaulting to
false. When set to true, we call `socket.gethostbyname()` to resolve the
URL hostname.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
6 months agogh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, apply...
Irit Katriel [Mon, 5 May 2025 16:46:56 +0000 (17:46 +0100)] 
gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, apply to arrays (#133396)

6 months agoGH-132439: Fix REPL swallowing characters entered with AltGr on cmd.exe (GH-132440)
Chris Eibl [Mon, 5 May 2025 16:45:45 +0000 (18:45 +0200)] 
GH-132439: Fix REPL swallowing characters entered with AltGr on cmd.exe (GH-132440)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
6 months agogh-131296: Avoid posixmodule.c warning (GH-133142)
Wulian233 [Mon, 5 May 2025 16:45:15 +0000 (00:45 +0800)] 
gh-131296: Avoid posixmodule.c warning (GH-133142)

Clang-cl detects that on 32-bit builds the variable is always smaller than the value. But since the same code is used for other architectures, we can't just _fix_ it. This cast avoids the tautological-constant-out-of-range-compare warning.

6 months agogh-131878: Fix input of unicode characters with two or more code points in new pyrepl...
Sergey Miryanov [Mon, 5 May 2025 16:25:00 +0000 (09:25 -0700)] 
gh-131878: Fix input of unicode characters with two or more code points in new pyrepl on Windows (gh-131901)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
6 months agogh-132143: Fix the `AssertionError` in the test case `test.test_sys.TestRemoteExec...
littlebutt's workshop [Mon, 5 May 2025 16:08:49 +0000 (00:08 +0800)] 
gh-132143: Fix the `AssertionError` in the test case `test.test_sys.TestRemoteExec` (#132248)

6 months agogh-63882: Break down `and` tests in `test_minidom` (#133026)
Stan Ulbrych [Mon, 5 May 2025 16:07:24 +0000 (17:07 +0100)] 
gh-63882: Break down `and` tests in `test_minidom` (#133026)

6 months agogh-110067: Make max heap methods public and add missing ones (GH-130725)
Stan Ulbrych [Mon, 5 May 2025 15:52:49 +0000 (16:52 +0100)] 
gh-110067: Make max heap methods public and add missing ones (GH-130725)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
6 months agogh-82129: Improve annotations for make_dataclass() (#133406)
Jelle Zijlstra [Mon, 5 May 2025 15:21:32 +0000 (08:21 -0700)] 
gh-82129: Improve annotations for make_dataclass() (#133406)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Carl Meyer <carl@oddbird.net>
6 months agogh-119180: Make the FORWARDREF format work with more kinds of runtime errors (#133407)
Jelle Zijlstra [Mon, 5 May 2025 15:21:11 +0000 (08:21 -0700)] 
gh-119180: Make the FORWARDREF format work with more kinds of runtime errors (#133407)

6 months agoGH-133336: Remove reserved ``-J`` flag for Jython (#133444)
Adam Turner [Mon, 5 May 2025 15:09:19 +0000 (16:09 +0100)] 
GH-133336: Remove reserved ``-J`` flag for Jython (#133444)

6 months agoRevert "gh-124715: Fix method_dealloc(): use PyObject_GC_UnTrack() (#133199)" (#133434)
Victor Stinner [Mon, 5 May 2025 15:04:43 +0000 (17:04 +0200)] 
Revert "gh-124715: Fix method_dealloc(): use PyObject_GC_UnTrack() (#133199)" (#133434)

This reverts commit 662dd294563ce86980c640ad67e3d460a72c9cb9.

The root issue was fixed by the
commit f554237b8ef6c60df651ac17eb0ef0c095cef185.

6 months agogh-131878: Handle top level exceptions in new pyrepl and prevent of closing it (...
Sergey Miryanov [Mon, 5 May 2025 14:54:19 +0000 (07:54 -0700)] 
gh-131878: Handle top level exceptions in new pyrepl and prevent of closing it (#131910)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
6 months agogh-61103: drop unused Py_HAVE_C_COMPLEX define (GH-133435)
Sergey B Kirpichev [Mon, 5 May 2025 13:50:57 +0000 (16:50 +0300)] 
gh-61103: drop unused Py_HAVE_C_COMPLEX define (GH-133435)

Py_HAVE_C_COMPLEX was added in 3.14 so the removal doesn't need a deprecation
period even under a strict reading of PEP 387.

The Py_FFI_SUPPORT_C_COMPLEX check configure check implies support for
complex types in ctypes.

6 months agogh-131747: ctypes: Deprecate _pack_ implicitly setting _layout_ = 'ms' (GH-133205)
Petr Viktorin [Mon, 5 May 2025 13:32:06 +0000 (15:32 +0200)] 
gh-131747: ctypes: Deprecate _pack_ implicitly setting _layout_ = 'ms' (GH-133205)

On non-Windows, warn when _pack_ implicitly changes default _layout_
to 'ms'.

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
6 months agoGH-133261: Make sure that the GC doesn't untrack objects in trashcan (GH-133431)
Mark Shannon [Mon, 5 May 2025 12:44:50 +0000 (13:44 +0100)] 
GH-133261: Make sure that the GC doesn't untrack objects in trashcan (GH-133431)

6 months agogh-133419: fix test_external_inspection race assert (#133433)
Victor Stinner [Mon, 5 May 2025 12:38:51 +0000 (14:38 +0200)] 
gh-133419: fix test_external_inspection race assert (#133433)

Follow-up of commit c4cc5d58aee6a3be55a95efee6ec25d5774f7b5f,
fix more tests.

6 months agogh-107006: Move `threading.local` docstring to docs (#131840)
Lysandros Nikolaou [Mon, 5 May 2025 12:00:15 +0000 (14:00 +0200)] 
gh-107006: Move `threading.local` docstring to docs (#131840)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
6 months agoBump mypy to 1.15 (#133405)
sobolevn [Mon, 5 May 2025 10:29:48 +0000 (13:29 +0300)] 
Bump mypy to 1.15 (#133405)

6 months agogh-61103: don't use C _Complex types to implement F/D/G in ctypes (GH-133237)
Sergey B Kirpichev [Mon, 5 May 2025 09:23:30 +0000 (12:23 +0300)] 
gh-61103: don't use C _Complex types to implement F/D/G in ctypes (GH-133237)

According to the C standard, the memory representation of _Complex types
is equivalent to 2-element arrays. Unlike _Complex, arrays are always available.

- drop _complex.h header
- use appropriate real arrays to replace complex types

Co-authored-by: Lisandro Dalcin <dalcinl@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
6 months agoGH-133410: Use commit hashes for change detection (gh-133416)
Adam Turner [Mon, 5 May 2025 08:49:12 +0000 (09:49 +0100)] 
GH-133410: Use commit hashes for change detection (gh-133416)

6 months agogh-113081: Highlight source code in pdb (#133355)
Tian Gao [Mon, 5 May 2025 07:49:52 +0000 (00:49 -0700)] 
gh-113081: Highlight source code in pdb (#133355)

6 months agogh-128307: Support eager_start=<bool> in create_eager_task_factory and various creat...
Thomas Grainger [Mon, 5 May 2025 04:58:07 +0000 (05:58 +0100)] 
gh-128307:  Support eager_start=<bool> in create_eager_task_factory and various create_task functions (#128306)

Some create_task() functions were changed from `name=None, context=None` to `**kwargs`.

Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
6 months ago[GH-133419] fix test_external_inspection race assert (#133422)
Gregory P. Smith [Mon, 5 May 2025 04:41:22 +0000 (21:41 -0700)] 
[GH-133419] fix test_external_inspection race assert (#133422)

[tests] fix test_external_inspection race assert

either line could be where the inspection finds the foo()
function as after ready is sent, the process may not have made progress
onto the next line yet.  "solve" by putting the statements on the same
line.

6 months ago[tests] test_subprocess maybe avoid a timeout race condition? (#133420)
Gregory P. Smith [Mon, 5 May 2025 04:02:16 +0000 (21:02 -0700)] 
[tests] test_subprocess maybe avoid a timeout race condition? (#133420)

The few buildbot failures on https://github.com/python/cpython/pull/133103
are possibly just due to racing a child process launch and exit?