]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
6 months ago GH-91048: Add utils for printing the call stack for asyncio tasks (#133284)
Pablo Galindo Salgado [Sun, 4 May 2025 00:51:57 +0000 (02:51 +0200)] 
 GH-91048: Add utils for printing the call stack for asyncio tasks (#133284)

6 months agogh-133139: Add curses.assume_default_colors() (GH-133145)
Serhiy Storchaka [Sat, 3 May 2025 20:33:22 +0000 (23:33 +0300)] 
gh-133139: Add curses.assume_default_colors() (GH-133145)

This is a refinement of the curses.use_default_colors() function which
allows to change the color pair 0.

6 months agogh-123539: Add new error message changes to "Whats New" (#133344)
sobolevn [Sat, 3 May 2025 17:18:40 +0000 (20:18 +0300)] 
gh-123539: Add new error message changes to "Whats New" (#133344)

6 months agogh-133210: Fix `test_rlcompleter` in `--without-doc-strings` mode (#133332)
sobolevn [Sat, 3 May 2025 15:38:27 +0000 (18:38 +0300)] 
gh-133210: Fix `test_rlcompleter` in `--without-doc-strings` mode (#133332)

6 months agogh-123299: Add PyREPL syntax highlighting to release highlights (#133321)
Hugo van Kemenade [Sat, 3 May 2025 15:25:13 +0000 (18:25 +0300)] 
gh-123299: Add PyREPL syntax highlighting to release highlights (#133321)

6 months agogh-133304: workaround for RISC-V in PyFloat_Pack4/Unpack4() (#133328)
Sergey B Kirpichev [Sat, 3 May 2025 15:07:52 +0000 (18:07 +0300)] 
gh-133304: workaround for RISC-V in PyFloat_Pack4/Unpack4() (#133328)

6 months agogh-133306: Use \z instead of \Z in regular expressions in the stdlib (GH-133337)
Serhiy Storchaka [Sat, 3 May 2025 14:58:49 +0000 (17:58 +0300)] 
gh-133306: Use \z instead of \Z in regular expressions in the stdlib (GH-133337)

6 months agogh-133306: Use \z instead of \Z in fnmatch.translate() and glob.translate() (GH-133338)
Serhiy Storchaka [Sat, 3 May 2025 14:58:21 +0000 (17:58 +0300)] 
gh-133306: Use \z instead of \Z in fnmatch.translate() and glob.translate() (GH-133338)

6 months agogh-133117: Enable stricter mypy checks for `tomllib` (#133206)
sobolevn [Sat, 3 May 2025 13:57:09 +0000 (16:57 +0300)] 
gh-133117: Enable stricter mypy checks for `tomllib` (#133206)

6 months agogh-130160: use `.. program::` directive for documenting `platform` CLI (#133335)
Semyon Moroz [Sat, 3 May 2025 12:05:04 +0000 (16:05 +0400)] 
gh-130160: use `.. program::` directive for documenting `platform` CLI (#133335)

6 months agogh-131524: Update platform CLI to use argparse (#131542)
Harry [Sat, 3 May 2025 08:58:59 +0000 (09:58 +0100)] 
gh-131524: Update platform CLI to use argparse (#131542)

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-133306: Support \z as a synonym for \Z in regular expressions (GH-133314)
Serhiy Storchaka [Sat, 3 May 2025 07:54:33 +0000 (10:54 +0300)] 
gh-133306: Support \z as a synonym for \Z in regular expressions (GH-133314)

\Z was an error inherited from PCRE 0.95. It was fixed in PCRE 2.0.
In other engines, \Z means not “anchor at string end”, but
“anchor before optional newline at string end”.

\z means “anchor at string end” in most RE engines.

6 months agogh-114713: Revert gh-114731 (#133330)
Kirill Podoprigora [Sat, 3 May 2025 07:47:08 +0000 (08:47 +0100)] 
gh-114713: Revert gh-114731 (#133330)

Revert "gh-114713: Handle case of an empty string passed to `zoneinfo.ZoneInfo` (#114731)"

This reverts commit 884df116d79b05d9342e05e50484d61c684ecb8b.

6 months agogh-133194: Fix regression with PEP 758 parsing on older `feature_version` (#133289)
sobolevn [Sat, 3 May 2025 07:33:14 +0000 (10:33 +0300)] 
gh-133194: Fix regression with PEP 758 parsing on older `feature_version` (#133289)

gh-133192: Fix regression with PEP 758 parsing on older `feature_version`

6 months agogh-133037: Add test for shadowing __annotate__ (#133084)
Jelle Zijlstra [Sat, 3 May 2025 02:42:49 +0000 (19:42 -0700)] 
gh-133037: Add test for shadowing __annotate__ (#133084)

6 months agogh-91156: Document how TextIOWrapper interacts with UTF-8 mode (GH-132885)
Malcolm Smith [Sat, 3 May 2025 01:20:10 +0000 (02:20 +0100)] 
gh-91156: Document how TextIOWrapper interacts with UTF-8 mode (GH-132885)

Document how TextIOWrapper interacts with UTF-8 mode

6 months agogh-91048: Chain some exceptions in _testexternalinspection.c (#132970)
Sergey Miryanov [Fri, 2 May 2025 23:35:30 +0000 (16:35 -0700)] 
gh-91048: Chain some exceptions in _testexternalinspection.c (#132970)

6 months agoLint: Use Ruff to format ``Tools/build/check_warnings.py`` (#133317)
Adam Turner [Fri, 2 May 2025 20:26:32 +0000 (21:26 +0100)] 
Lint: Use Ruff to format ``Tools/build/check_warnings.py`` (#133317)

6 months agogh-131507: Add support for syntax highlighting in PyREPL (GH-133247)
Łukasz Langa [Fri, 2 May 2025 18:22:31 +0000 (20:22 +0200)] 
gh-131507: Add support for syntax highlighting in PyREPL (GH-133247)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
6 months agoGH-113464: Get LLVM from cpython-bin-deps on Windows (GH-133278)
Brandt Bucher [Fri, 2 May 2025 18:17:15 +0000 (11:17 -0700)] 
GH-113464: Get LLVM from cpython-bin-deps on Windows (GH-133278)

6 months agogh-100926: Move ctype's pointers cache from _pointer_type_cache to StgInfo (GH-131282)
Sergey Miryanov [Fri, 2 May 2025 17:06:37 +0000 (10:06 -0700)] 
gh-100926: Move ctype's pointers cache from _pointer_type_cache to StgInfo (GH-131282)

Deprecate _pointer_type_cache and calling POINTER on a string.

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
6 months agogh-112936: Fix IDLE: no Shell menu item in single-process mode (GH-126598)
Zhikang Yan [Fri, 2 May 2025 17:03:32 +0000 (01:03 +0800)] 
gh-112936: Fix IDLE: no Shell menu item in single-process mode (GH-126598)

6 months agogh-132995: Upgrade bundled pip to 25.1.1 (gh-132997)
Paul Moore [Fri, 2 May 2025 16:43:13 +0000 (17:43 +0100)] 
gh-132995: Upgrade bundled pip to 25.1.1 (gh-132997)

* gh-132995: Upgrade bundled pip to 25.1.1

6 months agogh-132744: Check recursion limit in CALL_PY_GENERAL (GH-132746)
Ken Jin [Fri, 2 May 2025 16:36:29 +0000 (00:36 +0800)] 
gh-132744: Check recursion limit in CALL_PY_GENERAL (GH-132746)

6 months agogh-128972: Add `_Py_ALIGN_AS` and revert `PyASCIIObject` memory layout. (GH-133085)
Petr Viktorin [Fri, 2 May 2025 16:30:40 +0000 (18:30 +0200)] 
gh-128972: Add `_Py_ALIGN_AS` and revert `PyASCIIObject` memory layout. (GH-133085)

Add `_Py_ALIGN_AS` as per C API WG vote: https://github.com/capi-workgroup/decisions/issues/61
This patch only adds it to free-threaded builds; the `#ifdef Py_GIL_DISABLED`
can be removed in the future.

Use this to revert `PyASCIIObject` memory layout for non-free-threaded builds.
The long-term plan is to deprecate the entire struct; until that happens
it's better to keep it unchanged, as courtesy to people that rely on it despite
it not being stable ABI.

6 months agogh-121249: fix complex formatting codes in the struct docs (note 10) (GH-133249)
Sergey B Kirpichev [Fri, 2 May 2025 16:27:07 +0000 (19:27 +0300)] 
gh-121249: fix complex formatting codes in the struct docs (note 10) (GH-133249)

This amends 85f89cb.

6 months agoGH-133171: Prevent combinations of --disable-gil and --enable-experimental-jit.....
Brandt Bucher [Fri, 2 May 2025 16:26:03 +0000 (09:26 -0700)] 
GH-133171: Prevent combinations of --disable-gil and --enable-experimental-jit... for now (GH-133179)

6 months agogh-121249: unconditionally support `complex` types in `struct` (GH-132864)
Sergey B Kirpichev [Fri, 2 May 2025 16:24:52 +0000 (19:24 +0300)] 
gh-121249: unconditionally support `complex` types in `struct` (GH-132864)

Co-authored-by: Lisandro Dalcin <dalcinl@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
6 months agogh-133300: argparse: make `suggest_on_error` a keyword-only parameter (#133302)
Hugo van Kemenade [Fri, 2 May 2025 15:11:44 +0000 (18:11 +0300)] 
gh-133300: argparse: make `suggest_on_error` a keyword-only parameter (#133302)

6 months agogh-133164: Add `PyUnstable_Object_IsUniqueReferencedTemporary` C API (gh-133170)
Sam Gross [Fri, 2 May 2025 13:24:57 +0000 (09:24 -0400)] 
gh-133164: Add `PyUnstable_Object_IsUniqueReferencedTemporary` C API (gh-133170)

After gh-130704, the interpreter replaces some uses of `LOAD_FAST` with
`LOAD_FAST_BORROW` which avoid incref/decrefs by "borrowing" references
on the interpreter stack when the bytecode compiler can determine that
it's safe.

This change broke some checks in C API extensions that relied on
`Py_REFCNT()` of `1` to determine if it's safe to modify an object
in-place. Objects may have a reference count of one, but still be
referenced further up the interpreter stack due to borrowing of
references.

This provides a replacement function for those checks.
`PyUnstable_Object_IsUniqueReferencedTemporary` is more conservative:
it checks that the object has a reference count of one and that it exists as a
unique strong reference in the interpreter's stack of temporary
variables in the top most frame.

See also:

* https://github.com/numpy/numpy/issues/28681

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: mpage <mpage@cs.stanford.edu>
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
6 months agogh-130645: Add color to `argparse` help (GH-132323)
Hugo van Kemenade [Fri, 2 May 2025 13:06:10 +0000 (16:06 +0300)] 
gh-130645: Add color to `argparse` help (GH-132323)

6 months agogh-133210: Fix `test_descr` in `--without-doc-strings` mode (#133294)
sobolevn [Fri, 2 May 2025 13:04:27 +0000 (16:04 +0300)] 
gh-133210: Fix `test_descr` in `--without-doc-strings` mode (#133294)

6 months agogh-132385: Fix instance error suggestions trigger potential exceptions in `traceback...
sobolevn [Fri, 2 May 2025 12:52:59 +0000 (15:52 +0300)] 
gh-132385: Fix instance error suggestions trigger potential exceptions in `traceback` (#132387)

6 months agogh-133279: Assert with HAS_TARGET in the codegen_addop_j function (#133280)
Nybblista [Fri, 2 May 2025 12:52:48 +0000 (15:52 +0300)] 
gh-133279: Assert with HAS_TARGET in the codegen_addop_j function (#133280)

6 months agogh-133290: Use PyObject_SetAttr to set _type_ (GH-133292)
Petr Viktorin [Fri, 2 May 2025 12:47:07 +0000 (14:47 +0200)] 
gh-133290: Use PyObject_SetAttr to set _type_ (GH-133292)

6 months agoDocs: delete title links in `turtle.rst` and `typing.rst` (#133283)
Yongzi Li [Fri, 2 May 2025 12:15:26 +0000 (20:15 +0800)] 
Docs: delete title links in `turtle.rst` and `typing.rst` (#133283)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
6 months agogh-130482: Add ability to specify name for tkinter.OptionMenu and tkinter.ttk.OptionM...
Zhikang Yan [Fri, 2 May 2025 11:38:50 +0000 (19:38 +0800)] 
gh-130482: Add ability to specify name for tkinter.OptionMenu and tkinter.ttk.OptionMenu (GH-130502)

6 months agogh-133197: Improve error message for incompatible string / bytes prefixes (#133242)
sobolevn [Fri, 2 May 2025 11:28:17 +0000 (14:28 +0300)] 
gh-133197: Improve error message for incompatible string / bytes prefixes (#133242)

6 months agogh-133210: Fix `test_pydoc` in `--without-doc-strings` mode (#133271)
sobolevn [Fri, 2 May 2025 10:12:24 +0000 (13:12 +0300)] 
gh-133210: Fix `test_pydoc` in `--without-doc-strings` mode (#133271)

6 months agogh-123539: Improve SyntaxError msg for `import as` with not a name (#123629)
sobolevn [Fri, 2 May 2025 08:34:13 +0000 (11:34 +0300)] 
gh-123539: Improve SyntaxError msg for `import as` with not a name (#123629)

6 months agogh-123299: Add missing pending removals (#133082)
Hugo van Kemenade [Fri, 2 May 2025 08:18:24 +0000 (11:18 +0300)] 
gh-123299: Add missing pending removals (#133082)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
6 months agogh-119605: Respect `follow_wrapped` for `__init__` and `__new__` when getting class...
Xuehai Pan [Thu, 1 May 2025 22:41:44 +0000 (06:41 +0800)] 
gh-119605: Respect `follow_wrapped` for `__init__` and `__new__` when getting class signature with `inspect.signature` (#132055)

6 months agogh-133259: Show path to python.sh script on successful build (#133268)
Michael Droettboom [Thu, 1 May 2025 18:49:39 +0000 (14:49 -0400)] 
gh-133259: Show path to python.sh script on successful build (#133268)

* gh-133259: Show path to python.sh script on successful build

* wasmtime -> (generic) wasm runtime

6 months agogh-133258: Fix crash in test_index (GH-133262)
Irit Katriel [Thu, 1 May 2025 17:15:53 +0000 (18:15 +0100)] 
gh-133258: Fix crash in test_index (GH-133262)

6 months agogh-133261: Use __builtin_frame_address() on GCC 9 and older (#133269)
Victor Stinner [Thu, 1 May 2025 17:13:03 +0000 (19:13 +0200)] 
gh-133261: Use __builtin_frame_address() on GCC 9 and older (#133269)

GCC 9 and older don't have __has_builtin(), but have
__builtin_frame_address() function.

6 months agogh-130197: Test pygettext --output option (GH-133041)
Stan Ulbrych [Thu, 1 May 2025 16:30:24 +0000 (17:30 +0100)] 
gh-130197: Test pygettext --output option (GH-133041)

6 months agogh-133210: Fix `test_inspect` in `--without-doc-strings` mode (#133250)
sobolevn [Thu, 1 May 2025 16:08:35 +0000 (19:08 +0300)] 
gh-133210: Fix `test_inspect` in `--without-doc-strings` mode (#133250)

6 months agogh-133256: Add _Py_NONSTRING macro (#133257)
Victor Stinner [Thu, 1 May 2025 15:55:49 +0000 (17:55 +0200)] 
gh-133256: Add _Py_NONSTRING macro (#133257)

Fix GCC 15 compiler warnings such as:

    Modules/fcntlmodule.c:27:36: warning: initializer-string for
    array of 'char' truncates NUL terminator but destination lacks
    'nonstring' attribute (9 chars into 8 available)
    [-Wunterminated-string-initialization]
    static const char guard[GUARDSZ] = "\x00\xfa\x69\xc4\x67\xa3\x6c\x58";

6 months agogh-130317: Fix test_pack_unpack_roundtrip() and add docs (#133204)
Sergey B Kirpichev [Thu, 1 May 2025 14:20:36 +0000 (17:20 +0300)] 
gh-130317: Fix test_pack_unpack_roundtrip() and add docs (#133204)

* Skip sNaN's testing in 32-bit mode.
* Drop float_set_snan() helper.
* Use memcpy() workaround for sNaN's in PyFloat_Unpack4().
* Document, that sNaN's may not be preserved by PyFloat_Pack/Unpack API.

6 months agogh-132930: Include IDLE path in registry for PyManager packages (GH-133246)
Steve Dower [Thu, 1 May 2025 13:41:17 +0000 (14:41 +0100)] 
gh-132930: Include IDLE path in registry for PyManager packages (GH-133246)

6 months agogh-130197: Improve test coverage of msgfmt.py (GH-133048)
Tomas R. [Thu, 1 May 2025 13:32:11 +0000 (15:32 +0200)] 
gh-130197: Improve test coverage of msgfmt.py (GH-133048)

6 months agogh-133166: Fix missing error emission of PyType_GetModuleByDef (GH-133240)
neonene [Thu, 1 May 2025 12:32:57 +0000 (21:32 +0900)] 
gh-133166: Fix missing error emission of PyType_GetModuleByDef (GH-133240)

6 months agogh-124715: Fix method_dealloc(): use PyObject_GC_UnTrack() (#133199)
Victor Stinner [Thu, 1 May 2025 11:42:42 +0000 (13:42 +0200)] 
gh-124715: Fix method_dealloc(): use PyObject_GC_UnTrack() (#133199)

Replace _PyObject_GC_UNTRACK() with PyObject_GC_UnTrack() to not fail
if the method was already untracked.

6 months agogh-130655: Add a test for big-endian MO files in gettext (GH-132469)
Tomas R. [Thu, 1 May 2025 11:13:08 +0000 (13:13 +0200)] 
gh-130655: Add a test for big-endian MO files in gettext (GH-132469)

6 months agoRemove duplicate includes: Python/{bytecodes,ceval,optimizer_analysis}.c (#132622)
Adam Turner [Thu, 1 May 2025 11:07:53 +0000 (12:07 +0100)] 
Remove duplicate includes: Python/{bytecodes,ceval,optimizer_analysis}.c (#132622)

6 months agogh-100239: specialize BINARY_OP/SUBSCR for list-slice (#132626)
Irit Katriel [Thu, 1 May 2025 10:28:52 +0000 (11:28 +0100)] 
gh-100239: specialize BINARY_OP/SUBSCR for list-slice (#132626)

6 months agoPyStats: Make sure that the `failure_kinds` array is big enough. (#133245)
Mark Shannon [Thu, 1 May 2025 10:02:51 +0000 (11:02 +0100)] 
PyStats: Make sure that the `failure_kinds` array is big enough. (#133245)

6 months agoLint: Create a project-wide ``.ruff.toml`` settings file (#133124)
Adam Turner [Thu, 1 May 2025 08:28:44 +0000 (09:28 +0100)] 
Lint: Create a project-wide ``.ruff.toml`` settings file (#133124)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
6 months agogh-133196: Guard PEP 750 grammar with `CHECK_VERSION` (#133225)
sobolevn [Thu, 1 May 2025 07:17:07 +0000 (10:17 +0300)] 
gh-133196: Guard PEP 750 grammar with `CHECK_VERSION` (#133225)

6 months agogh-131531: Make Android build retry after network failures (#133193)
Malcolm Smith [Thu, 1 May 2025 04:17:41 +0000 (05:17 +0100)] 
gh-131531: Make Android build retry after network failures (#133193)

Adds a retry strategy when downloading compilation resources for Android, plus some other cleanups.

6 months agogh-130167: Improve ``difflib.IS_LINE_JUNK`` performance by using string methods ...
Semyon Moroz [Thu, 1 May 2025 04:11:36 +0000 (08:11 +0400)] 
gh-130167: Improve ``difflib.IS_LINE_JUNK`` performance by using string methods (#130170)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.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>
Co-authored-by: Tim Peters <tim.peters@gmail.com>
6 months agoAdd missing whitespace in `is_running_main` comment (#133174)
Nybblista [Thu, 1 May 2025 03:36:59 +0000 (06:36 +0300)] 
Add missing whitespace in `is_running_main` comment (#133174)

6 months agoBump the HACL* revision. (#133226)
Russell Keith-Magee [Thu, 1 May 2025 02:57:49 +0000 (10:57 +0800)] 
Bump the HACL* revision. (#133226)

Bump the HACL* revision to include iOS platform identification.

6 months agogh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shim targets. (#133184)
Russell Keith-Magee [Thu, 1 May 2025 02:35:33 +0000 (10:35 +0800)] 
gh-133183: Include IPHONEOS_DEPLOYMENT_TARGET in iOS shim targets. (#133184)

Include IPHONEOS_DEPLOYMENT_TARGET in iOS shim targets.

6 months agoRevert "gh-132775: Add _PyCode_GetVarCounts() (gh-133128)" (gh-133232)
Eric Snow [Thu, 1 May 2025 02:35:20 +0000 (20:35 -0600)] 
Revert "gh-132775: Add _PyCode_GetVarCounts() (gh-133128)" (gh-133232)

The change broke the s390 builds, so I'm reverting it while I investigate.

This reverts commit 94b4fcd806e7b692955173d309ea3b70a193ad96.

6 months agodict: Remove redundant incref of immortal object Py_EMPTY_KEYS (GH-133200)
Mae Hood [Wed, 30 Apr 2025 23:39:26 +0000 (00:39 +0100)] 
dict: Remove redundant incref of immortal object Py_EMPTY_KEYS (GH-133200)

6 months agogh-132775: Add _PyPickle_GetXIData() (gh-133107)
Eric Snow [Wed, 30 Apr 2025 23:34:05 +0000 (17:34 -0600)] 
gh-132775: Add _PyPickle_GetXIData() (gh-133107)

There's some extra complexity due to making sure we we get things right when handling functions and classes defined in the __main__ module.  This is also reflected in the tests, including the addition of extra functions in test.support.import_helper.

6 months agoGH-125515: Remove two unused error branches. (#133181)
Russell Keith-Magee [Wed, 30 Apr 2025 22:21:57 +0000 (06:21 +0800)] 
GH-125515: Remove two unused error branches. (#133181)

Remove two unused error branches in the generated bytecode handling.

6 months agogh-133153: Use rlcompleter for pdb's interact command (#133176)
Tian Gao [Wed, 30 Apr 2025 22:19:13 +0000 (15:19 -0700)] 
gh-133153: Use rlcompleter for pdb's interact command (#133176)

6 months agogh-133213: Add tests for `string.templatelib.TemplateIter` (#133215)
sobolevn [Wed, 30 Apr 2025 19:38:25 +0000 (22:38 +0300)] 
gh-133213: Add tests for `string.templatelib.TemplateIter` (#133215)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
6 months agogh-132775: Add _PyCode_GetVarCounts() (gh-133128)
Eric Snow [Wed, 30 Apr 2025 18:19:20 +0000 (12:19 -0600)] 
gh-132775: Add _PyCode_GetVarCounts() (gh-133128)

This helper is useful in a variety of ways, including in demonstrating how the different counts relate to one another.

It will be used in a later change to help identify if a function is "stateless", meaning it doesn't have any free vars or globals.

Note that a majority of this change is tests.

6 months agoGH-114809: Add support for macOS multi-arch builds with the JIT enabled (#131751)
Savannah Ostrowski [Wed, 30 Apr 2025 18:03:57 +0000 (11:03 -0700)] 
GH-114809: Add support for macOS multi-arch builds with the JIT enabled (#131751)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
6 months agoApply 'mod' role to typing module (#133201)
Rafael Fontenelle [Wed, 30 Apr 2025 16:52:03 +0000 (13:52 -0300)] 
Apply 'mod' role to typing module (#133201)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
6 months agogh-133197: Improve error message for `ft""` and `bt""` cases (#133202)
sobolevn [Wed, 30 Apr 2025 16:20:44 +0000 (19:20 +0300)] 
gh-133197: Improve error message for `ft""` and `bt""` cases (#133202)

6 months agoRemove redundant ``--keep-going`` when running Sphinx (#133156)
Hugo van Kemenade [Wed, 30 Apr 2025 16:12:28 +0000 (19:12 +0300)] 
Remove redundant ``--keep-going`` when running Sphinx (#133156)

6 months agogh-133211: Test that PEP750 types are final (#133212)
sobolevn [Wed, 30 Apr 2025 16:03:19 +0000 (19:03 +0300)] 
gh-133211: Test that PEP750 types are final (#133212)

6 months agogh-133167: Fix compilation process with `--enable-optimizations` and `--without-docst...
sobolevn [Wed, 30 Apr 2025 13:41:50 +0000 (16:41 +0300)] 
gh-133167: Fix compilation process with `--enable-optimizations` and `--without-docstrings` (#133187)

6 months agogh-87135: test_threading: Wait on thread, not an Event it sets (GH-133198)
Petr Viktorin [Wed, 30 Apr 2025 13:14:24 +0000 (15:14 +0200)] 
gh-87135: test_threading: Wait on thread, not an Event it sets (GH-133198)

When the event is set the thread might not be done yet.

This is a fix-up for commit 4ebbfcf30e0e2d87ff6036d4d1de0f6f0ef7c46a

6 months agogh-131591: Add tests for _PdbClient (#132976)
Matt Wozniski [Wed, 30 Apr 2025 13:09:41 +0000 (09:09 -0400)] 
gh-131591: Add tests for _PdbClient (#132976)

6 months agogh-89867: string.Formatter auto numbering doc updates (GH-129617)
dgpb [Wed, 30 Apr 2025 12:24:40 +0000 (15:24 +0300)] 
gh-89867: string.Formatter auto numbering doc updates (GH-129617)

6 months agogh-133194: Add `CHECK_VERSION` to new PEP758 grammar (#133195)
sobolevn [Wed, 30 Apr 2025 10:39:26 +0000 (13:39 +0300)] 
gh-133194: Add `CHECK_VERSION` to new PEP758 grammar (#133195)

6 months agoGH-124715: Move trashcan mechanism into `Py_Dealloc` (GH-132280)
Mark Shannon [Wed, 30 Apr 2025 10:37:53 +0000 (11:37 +0100)] 
GH-124715: Move trashcan mechanism into `Py_Dealloc` (GH-132280)

6 months agogh-130317: Skip test_pack_unpack_roundtrip_for_nans() on x86 (#133155)
Victor Stinner [Wed, 30 Apr 2025 10:01:06 +0000 (12:01 +0200)] 
gh-130317: Skip test_pack_unpack_roundtrip_for_nans() on x86 (#133155)

Reduce also the number of iterations from 1000 to 10 to ease
debugging failures and prevent "command line too line" error when
tests are re-run.

6 months agogh-132661: Implement PEP 750 (#132662)
Lysandros Nikolaou [Wed, 30 Apr 2025 09:46:41 +0000 (11:46 +0200)] 
gh-132661: Implement PEP 750 (#132662)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
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: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Wingy <git@wingysam.xyz>
Co-authored-by: Koudai Aono <koxudaxi@gmail.com>
Co-authored-by: Dave Peck <davepeck@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Paul Everitt <pauleveritt@me.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
6 months agogh-133117: Run mypy on `tomllib` in CI (#133118)
sobolevn [Wed, 30 Apr 2025 08:45:58 +0000 (11:45 +0300)] 
gh-133117: Run mypy on `tomllib` in CI (#133118)

6 months agoRemove trailing whitespace from python.gram (#133175)
Rafael Fontenelle [Wed, 30 Apr 2025 08:35:15 +0000 (05:35 -0300)] 
Remove trailing whitespace from python.gram (#133175)

6 months agogh-127604: Optimize -ldl usage on platforms that use dlopen for libFFI. (#133081)
Russell Keith-Magee [Wed, 30 Apr 2025 08:28:31 +0000 (16:28 +0800)] 
gh-127604: Optimize -ldl usage on platforms that use dlopen for libFFI. (#133081)

Optimize -ldl usage on platforms that use dlopen for libFFI.

6 months agoAdd `profile-gen-stamp` to `.gitignore` (#133188)
sobolevn [Wed, 30 Apr 2025 07:53:45 +0000 (10:53 +0300)] 
Add `profile-gen-stamp` to `.gitignore` (#133188)

6 months agogh-116436: Improve error message when TypeError occurs during dict update (#116443)
Shantanu [Wed, 30 Apr 2025 05:18:06 +0000 (22:18 -0700)] 
gh-116436: Improve error message when TypeError occurs during dict update (#116443)

6 months agogh-133036: Deprecate codecs.open (#133038)
Inada Naoki [Wed, 30 Apr 2025 01:11:09 +0000 (10:11 +0900)] 
gh-133036: Deprecate codecs.open (#133038)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
6 months agoGet rid of ERROR_IF's "label" parameter (GH-132654)
Brandt Bucher [Wed, 30 Apr 2025 00:21:53 +0000 (17:21 -0700)] 
Get rid of ERROR_IF's "label" parameter (GH-132654)

6 months agoGH-125515: Mark code after "return" as unreachable in the cases generator (#133178)
Brandt Bucher [Wed, 30 Apr 2025 00:21:14 +0000 (17:21 -0700)] 
GH-125515: Mark code after "return" as unreachable in the cases generator (#133178)

Mark code after "return" as unreachable

6 months agogh-133131: Discover an appropriate iOS simulator rather than hard-coding iPhone SE...
Russell Keith-Magee [Tue, 29 Apr 2025 21:35:36 +0000 (05:35 +0800)] 
gh-133131: Discover an appropriate iOS simulator rather than hard-coding iPhone SE 3rd gen (#133132)

Determines a candidate simulator at runtime rather than hardcoding iPhone SE.

6 months agogh-120220: Deprecate legacy methods for tracing variables in Tkinter (GH-120223)
Serhiy Storchaka [Tue, 29 Apr 2025 17:26:51 +0000 (20:26 +0300)] 
gh-120220: Deprecate legacy methods for tracing variables in Tkinter (GH-120223)

They do not work with Tcl 9.0.
Use new methods added in Python 3.6.

6 months agoDocs: fix typo in `InternalDocs/garbage_collector.md` (gh-133151)
Yongzi Li [Tue, 29 Apr 2025 17:20:50 +0000 (01:20 +0800)] 
Docs: fix typo in `InternalDocs/garbage_collector.md` (gh-133151)

Fix typo in `InternalDocs/garbage_collector.md`.

6 months agoGH-132508: Use tagged integers on the evaluation stack for the last instruction offse...
Mark Shannon [Tue, 29 Apr 2025 17:00:35 +0000 (18:00 +0100)] 
GH-132508: Use tagged integers on the evaluation stack for the last instruction offset (GH-132545)

6 months agogh-121468: Support async breakpoint in pdb (#132576)
Tian Gao [Tue, 29 Apr 2025 16:28:24 +0000 (09:28 -0700)] 
gh-121468: Support async breakpoint in pdb (#132576)

6 months agogh-132987: Support __index__() in the socket module (GH-133093)
Serhiy Storchaka [Tue, 29 Apr 2025 16:27:07 +0000 (19:27 +0300)] 
gh-132987: Support __index__() in the socket module (GH-133093)

ntohl(), htonl(), if_indextoname(), getaddrinfo() now use __index__() if
available.

Also fix the Argument Clinic names for module-level functions (although
this does not affect the user).

6 months agogh-132987: Support __index__() in the stat module (GH-133097)
Serhiy Storchaka [Tue, 29 Apr 2025 16:25:44 +0000 (19:25 +0300)] 
gh-132987: Support __index__() in the stat module (GH-133097)

Use it for the mode arguments in filemode(), S_IMODE(), S_ISDIR(), etc.

6 months agoGH-130328: pasting in new REPL is slow on Windows (GH-132884)
Chris Eibl [Tue, 29 Apr 2025 16:03:45 +0000 (18:03 +0200)] 
GH-130328: pasting in new REPL is slow on Windows (GH-132884)