]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
7 months agogh-124111: Update macOS installer to use Tcl/Tk 8.6.16. (#132190)
Ned Deily [Mon, 7 Apr 2025 05:42:26 +0000 (01:42 -0400)] 
gh-124111: Update macOS installer to use Tcl/Tk 8.6.16. (#132190)

7 months agogh-131423: Update macOS installer to use OpenSSL 3.0.16. (GH-132189)
Ned Deily [Mon, 7 Apr 2025 04:46:13 +0000 (00:46 -0400)] 
gh-131423: Update macOS installer to use OpenSSL 3.0.16. (GH-132189)

Patch by Bénédikt Tran.

7 months agogh-129204: Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob (GH-132184)
Vincent Fazio [Mon, 7 Apr 2025 03:53:02 +0000 (22:53 -0500)] 
gh-129204: Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob (GH-132184)

* Add _PYTHON_SUBPROCESS_USE_POSIX_SPAWN environment knob

Add support for disabling the use of `posix_spawn` via a variable in
the process environment.

While it was previously possible to toggle this by modifying the value
of `subprocess._USE_POSIX_SPAWN`, this required either patching CPython
or modifying it within the interpreter instance which is not always
possible, such as when running applications or scripts not under a
user's control.

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
* fixup NEWS entry

---------

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
7 months agoDocs: Add a single table summary for ``cmath`` (#131887)
Sergey B Kirpichev [Sun, 6 Apr 2025 23:36:21 +0000 (02:36 +0300)] 
Docs: Add a single table summary for ``cmath`` (#131887)

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: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
7 months agogh-132168: Add `__class_getitem__` to `ctypes.py_object` (#132169)
Brian Schubert [Sun, 6 Apr 2025 21:05:19 +0000 (17:05 -0400)] 
gh-132168: Add `__class_getitem__` to `ctypes.py_object` (#132169)

7 months agogh-84481: Add ZipFile.data_offset attribute (#132165)
Emma Smith [Sun, 6 Apr 2025 20:51:42 +0000 (13:51 -0700)] 
gh-84481: Add ZipFile.data_offset attribute (#132165)

* Add ZipFile.data_offset attribute

This attribute provides the offset to zip data from the start of the file, when available.

* Add blurb-it

* Try fixing class ref in NEWS

7 months agogh-126703: Add freelist for range and range_iter objects (GH-128619)
Pieter Eendebak [Sun, 6 Apr 2025 20:40:52 +0000 (22:40 +0200)] 
gh-126703: Add freelist for range and range_iter objects (GH-128619)

7 months agogh-131591: Handle includes for iOS in remote_debugging.c (#132050)
Pablo Galindo Salgado [Sun, 6 Apr 2025 20:39:25 +0000 (21:39 +0100)] 
gh-131591: Handle includes for iOS in remote_debugging.c (#132050)

7 months agogh-132121: Always escape non-printable characters in pygettext (GH-132122)
Tomas R. [Sun, 6 Apr 2025 20:15:17 +0000 (22:15 +0200)] 
gh-132121: Always escape non-printable characters in pygettext (GH-132122)

7 months agogh-132159: Do not shadow user arguments in generated `__new__` by `@warnings.deprecat...
Xuehai Pan [Sun, 6 Apr 2025 16:37:37 +0000 (00:37 +0800)] 
gh-132159: Do not shadow user arguments in generated `__new__` by `@warnings.deprecated` (#132160)

7 months agogh-132011: Fix crash on invalid `CALL_LIST_APPEND` deoptimization (#132018)
sobolevn [Sun, 6 Apr 2025 16:10:39 +0000 (19:10 +0300)] 
gh-132011: Fix crash on invalid `CALL_LIST_APPEND` deoptimization (#132018)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
7 months agogh-132139: 3.14 what's new: elaborate on why you can no longer set `Union` attributes...
Alex Waygood [Sun, 6 Apr 2025 15:51:05 +0000 (16:51 +0100)] 
gh-132139: 3.14 what's new: elaborate on why you can no longer set `Union` attributes (#132157)

7 months agogh-131178: Add tests for `pickle` command-line interface (#131275)
Semyon Moroz [Sun, 6 Apr 2025 15:50:32 +0000 (19:50 +0400)] 
gh-131178: Add tests for `pickle` command-line interface (#131275)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
7 months agogh-132139: Document that you can no longer set attributes on unions (#132146)
Jelle Zijlstra [Sun, 6 Apr 2025 12:43:09 +0000 (05:43 -0700)] 
gh-132139: Document that you can no longer set attributes on unions (#132146)

7 months agogh-128182: add critical sections to ctypes arrays getters and setters (#132152)
Kumar Aditya [Sun, 6 Apr 2025 10:51:44 +0000 (16:21 +0530)] 
gh-128182: add critical sections to ctypes arrays getters and setters (#132152)

7 months agoDocs: Replace dead hyperlink for CGI environment variables (#132137)
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) [Sun, 6 Apr 2025 08:12:48 +0000 (13:42 +0530)] 
Docs: Replace dead hyperlink for CGI environment variables (#132137)

7 months agogh-132134: Add the clangd ``.cache`` directory to ``.gitignore`` (#132135)
Nadeshiko Manju [Sun, 6 Apr 2025 04:25:08 +0000 (12:25 +0800)] 
gh-132134: Add the clangd ``.cache`` directory to ``.gitignore`` (#132135)

Signed-off-by: Manjusaka <me@manjusaka.me>
7 months agoGH-131798: Narrow the result of _CONTAINS_OP_SET to bool in the JIT (GH-132057)
Tomas R. [Sat, 5 Apr 2025 22:56:01 +0000 (00:56 +0200)] 
GH-131798: Narrow the result of _CONTAINS_OP_SET to bool in the JIT (GH-132057)

7 months agogh-131852: Filter out POT-Creation-Date in msgfmt (GH-131880)
Stan Ulbrych [Sat, 5 Apr 2025 19:38:39 +0000 (20:38 +0100)] 
gh-131852: Filter out POT-Creation-Date in msgfmt (GH-131880)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
7 months agoFix numbered list syntax in programming.rst (#130158)
Rafael Fontenelle [Sat, 5 Apr 2025 19:20:21 +0000 (16:20 -0300)] 
Fix numbered list syntax in programming.rst (#130158)

7 months agoGH-118761: Expose more core interpreter types in ``_types`` (#132103)
Adam Turner [Sat, 5 Apr 2025 18:11:07 +0000 (19:11 +0100)] 
GH-118761: Expose more core interpreter types in ``_types`` (#132103)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
7 months agogh-132132: Upgrade LLVM on tail calling CI (GH-132098)
Ken Jin [Sat, 5 Apr 2025 16:58:23 +0000 (00:58 +0800)] 
gh-132132: Upgrade LLVM on tail calling CI (GH-132098)

7 months agogh-131591: Fix GENERATE_DEBUG_SECTION for clangcl on Windows (GH-132112)
Chris Eibl [Sat, 5 Apr 2025 16:00:54 +0000 (18:00 +0200)] 
gh-131591: Fix GENERATE_DEBUG_SECTION for clangcl on Windows (GH-132112)

7 months agogh-126703: Add PyCFunction freelist (GH-128692)
Pieter Eendebak [Sat, 5 Apr 2025 15:51:05 +0000 (17:51 +0200)] 
gh-126703: Add PyCFunction freelist (GH-128692)

7 months agoGenerate social media preview cards for the documentation (#132101)
Adam Turner [Sat, 5 Apr 2025 14:20:06 +0000 (15:20 +0100)] 
Generate social media preview cards for the documentation (#132101)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
7 months agoSkip a test for Bluetooth HCI socket (added in GH-132023) if it fails (GH-132072)
Serhiy Storchaka [Sat, 5 Apr 2025 13:41:57 +0000 (16:41 +0300)] 
Skip a test for Bluetooth HCI socket (added in GH-132023) if it fails (GH-132072)

7 months agoDocs: Fix typo in `InternalDocs/jit.md` (#132119)
Tomas R. [Sat, 5 Apr 2025 10:36:16 +0000 (12:36 +0200)] 
Docs: Fix typo in `InternalDocs/jit.md` (#132119)

7 months agogh-128182: add critical section to `_ctypes.Simple` getters and setters (#132081)
Kumar Aditya [Sat, 5 Apr 2025 10:27:41 +0000 (15:57 +0530)] 
gh-128182: add critical section to `_ctypes.Simple` getters and setters (#132081)

7 months agogh-128182: add critical section to `_ctypes.PyCData` methods (#132082)
Kumar Aditya [Sat, 5 Apr 2025 09:54:58 +0000 (15:24 +0530)] 
gh-128182: add critical section to `_ctypes.PyCData` methods (#132082)

7 months agogh-85162: Add `HTTPSServer` to `http.server` to serve files over HTTPS (#129607)
Semyon Moroz [Sat, 5 Apr 2025 08:49:48 +0000 (12:49 +0400)] 
gh-85162: Add `HTTPSServer` to `http.server` to serve files over HTTPS  (#129607)

The `http.server` module now supports serving over HTTPS using the `http.server.HTTPSServer` class.
This functionality is also exposed by the command-line interface (`python -m http.server`) through the
`--tls-cert`, `--tls-key` and `--tls-password-file` options.

7 months agoDocs: document `plistlib.InvalidFileException` (#132069)
Yuki Kobayashi [Sat, 5 Apr 2025 08:46:17 +0000 (17:46 +0900)] 
Docs: document `plistlib.InvalidFileException` (#132069)

7 months agogh-131015: Add test for bytes formatting errors (#131881)
Ageev Maxim [Sat, 5 Apr 2025 08:30:16 +0000 (11:30 +0300)] 
gh-131015: Add test for bytes formatting errors (#131881)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
7 months agogh-131912: Improve description of grouping options in the format specification docs...
Prometheus3375 [Sat, 5 Apr 2025 08:28:50 +0000 (11:28 +0300)] 
gh-131912: Improve description of grouping options in the format specification docs (#132030)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
7 months agogh-129463, gh-128593: Simplify ForwardRef (#129465)
Jelle Zijlstra [Sat, 5 Apr 2025 04:36:34 +0000 (21:36 -0700)] 
gh-129463, gh-128593: Simplify ForwardRef (#129465)

7 months agogh-109599: Expose `CapsuleType` via the `_types` module (#131969)
Adam Turner [Fri, 4 Apr 2025 22:37:41 +0000 (23:37 +0100)] 
gh-109599: Expose `CapsuleType` via the `_types` module (#131969)

7 months agogh-131933: Document UnionType/Union merger in What's New (#131941)
Jelle Zijlstra [Fri, 4 Apr 2025 18:15:31 +0000 (11:15 -0700)] 
gh-131933: Document UnionType/Union merger in What's New (#131941)

Co-authored-by: Alex Waygood
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
7 months agoFix typo in `template_replace()` test helper docstring (#132094)
Victorien [Fri, 4 Apr 2025 17:38:09 +0000 (19:38 +0200)] 
Fix typo in `template_replace()` test helper docstring (#132094)

7 months agogh-100239: fix bug in comparison (#132093)
Irit Katriel [Fri, 4 Apr 2025 17:09:49 +0000 (18:09 +0100)] 
gh-100239: fix bug in comparison (#132093)

7 months agogh-99108: Implement HACL* HMAC (#130157)
Bénédikt Tran [Fri, 4 Apr 2025 17:04:00 +0000 (19:04 +0200)] 
gh-99108: Implement HACL* HMAC (#130157)

A new extension module, `_hmac`, now exposes the HACL* HMAC (formally verified) implementation.

The HACL* implementation is used as a fallback implementation when the OpenSSL implementation of HMAC
is not available or disabled. For now, only named hash algorithms are recognized and SIMD support provided
by HACL* for the BLAKE2 hash functions is not yet used.

7 months agoGH-131498: Cases generator: manage stacks automatically (GH-132074)
Mark Shannon [Fri, 4 Apr 2025 16:59:36 +0000 (17:59 +0100)] 
GH-131498: Cases generator: manage stacks automatically (GH-132074)

7 months agogh-118761: Lazily import annotationlib in typing (#132060)
Jelle Zijlstra [Fri, 4 Apr 2025 15:57:10 +0000 (08:57 -0700)] 
gh-118761: Lazily import annotationlib in typing (#132060)

annotationlib is used quite a few times in typing.py, but I think the
usages are just rare enough that this makes sense.

The import would get triggered by:
- Using get_type_hints(), evaluate_forward_ref(), and similar introspection
  functions
- Using a string annotation anywhere that goes through _type_convert (e.g.,
  "Final['x']" will trigger an annotationlib import in order to access the
  ForwardRef class).
- Creating a TypedDict or NamedTuple (unless it's empty or PEP 563 is on).

Lots of programs will want to use typing without any of these, so the tradeoff
seems worth it.

7 months agogh-131938: Update exception message for `Element.remove()` when an element is not...
Bénédikt Tran [Fri, 4 Apr 2025 15:04:07 +0000 (17:04 +0200)] 
gh-131938: Update exception message for `Element.remove()` when an element is not found (#131972)

The exception message for `xml.etree.ElementTree.Element.remove` when an element is not found
has been updated from "list.remove(x): x not in list" to "Element.remove(x): element not found".

7 months agogh-100239: more refined specialisation stats for BINARY_OP/SUBSCR (#132068)
Irit Katriel [Fri, 4 Apr 2025 14:33:31 +0000 (15:33 +0100)] 
gh-100239: more refined specialisation stats for BINARY_OP/SUBSCR (#132068)

7 months agogh-130115: fix thread identifiers for 32-bit musl (#130391)
Vincent Fazio [Fri, 4 Apr 2025 14:31:37 +0000 (09:31 -0500)] 
gh-130115: fix thread identifiers for 32-bit musl (#130391)

CPython's pthread-based thread identifier relies on pthread_t being able
to be represented as an unsigned integer type.

This is true in most Linux libc implementations where it's defined as an
unsigned long, however musl typedefs it as a struct *.

If the pointer has the high bit set and is cast to PyThread_ident_t, the
resultant value can be sign-extended [0]. This can cause issues when
comparing against threading._MainThread's identifier. The main thread's
identifier value is retrieved via _get_main_thread_ident which is backed
by an unsigned long which truncates sign extended bits.

  >>> hex(threading.main_thread().ident)
  '0xb6f33f3c'
  >>> hex(threading.current_thread().ident)
  '0xffffffffb6f33f3c'

Work around this by conditionally compiling in some code for non-glibc
based Linux platforms that are at risk of sign-extension to return a
PyLong based on the main thread's unsigned long thread identifier if the
current thread is the main thread.

[0]: https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/Arrays-and-pointers-implementation.html

---------

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
7 months agogh-132075: Fix possible use of sockaddr structures with uninitialized members (GH...
Serhiy Storchaka [Fri, 4 Apr 2025 14:09:58 +0000 (17:09 +0300)] 
gh-132075: Fix possible use of sockaddr structures with uninitialized members (GH-132076)

Now all structure members are initialized with zeroes by default.

7 months agogh-118761: Defer import of functools in annotationlib (#132059)
Jelle Zijlstra [Fri, 4 Apr 2025 13:42:22 +0000 (06:42 -0700)] 
gh-118761: Defer import of functools in annotationlib (#132059)

7 months agogh-130655: Add a test for corrupt `.mo` files in `gettext` (#131911)
Tomas R. [Fri, 4 Apr 2025 13:26:59 +0000 (15:26 +0200)] 
gh-130655: Add a test for corrupt `.mo` files in `gettext` (#131911)

7 months agogh-130655: Add a test for bad magic numbers in `.mo` files parsed by `gettext` (...
Tomas R. [Fri, 4 Apr 2025 13:26:15 +0000 (15:26 +0200)] 
gh-130655: Add a test for bad magic numbers in `.mo` files parsed by `gettext` (#131909)

7 months agogh-128632: fix segfault on nested __classdict__ type param (#128744)
Tomasz Pytel [Fri, 4 Apr 2025 13:23:35 +0000 (09:23 -0400)] 
gh-128632: fix segfault on nested __classdict__ type param (#128744)

7 months agogh-105499: Defer "import warnings" in typing (#132061)
Jelle Zijlstra [Fri, 4 Apr 2025 13:19:42 +0000 (06:19 -0700)] 
gh-105499: Defer "import warnings" in typing (#132061)

A bunch of other warnings in typing.py were already deferred, but
I added a few non-lazy ones.

7 months agoGH-131288: Use `_AddressOfReturnAddress` for MSVC in pycore_ceval.h (gh-131289)
Chris Eibl [Fri, 4 Apr 2025 13:03:12 +0000 (15:03 +0200)] 
GH-131288: Use `_AddressOfReturnAddress` for MSVC in pycore_ceval.h (gh-131289)

Use `_AddressOfReturnAddress` in `_Py_get_machine_stack_pointer` to silence MSVC warning in pycore_ceval.h for release builds.

7 months agogh-125434: Display thread name in faulthandler (#132016)
Victor Stinner [Fri, 4 Apr 2025 12:24:41 +0000 (14:24 +0200)] 
gh-125434: Display thread name in faulthandler (#132016)

7 months agoAdd tests for Bluetooth RFCOMM, HCI and SCO (GH-132023)
Serhiy Storchaka [Fri, 4 Apr 2025 11:33:09 +0000 (14:33 +0300)] 
Add tests for Bluetooth RFCOMM, HCI and SCO (GH-132023)

7 months agoGH-131770: increase assumed WASI stack size to 131072 (wasi-sdk default) (#131844)
Filipe Laíns 🇵🇸 [Fri, 4 Apr 2025 08:34:02 +0000 (09:34 +0100)] 
GH-131770: increase assumed WASI stack size to 131072 (wasi-sdk default) (#131844)

https://github.com/WebAssembly/wasi-libc/blob/e9524a0980b9bb6bb92e87a41ed1055bdda5bb86/libc-top-half/musl/src/internal/pthread_impl.h#L220

Signed-off-by: Filipe Laíns <lains@riseup.net>
7 months agoEnable Windows on Arm GitHub runners (#131994)
Diego Russo [Thu, 3 Apr 2025 20:32:29 +0000 (21:32 +0100)] 
Enable Windows on Arm GitHub runners (#131994)

7 months agogh-132038: Make perf version check in test_perf_profiler more robust (#132039)
Itamar Oren [Thu, 3 Apr 2025 17:37:08 +0000 (10:37 -0700)] 
gh-132038: Make perf version check in test_perf_profiler more robust (#132039)

Should work also if the version string includes a commit hash, like `perf version 6.12.9.g242e6068fd5c`

7 months agogh-128661: Remove DeprecationWarning in evaluate_forward_ref (#128930)
Jelle Zijlstra [Thu, 3 Apr 2025 16:52:17 +0000 (09:52 -0700)] 
gh-128661: Remove DeprecationWarning in evaluate_forward_ref (#128930)

It doesn't make sense to use a deprecation for evaluate_forward_ref,
as it is a new function in Python 3.14 and doesn't have compatibility
guarantees.

I considered making it throw an error if type_params it not passed and
there is no owner. However, I think this is too unfriendly for users. The
case where this param is really needed is fairly esoteric and I don't think
this case is worth the pain of forcing users to write "type_params=()".

7 months agogh-131423: Update OpenSSL build tag to 3.0.16.2 to fix ARM64 crash (GH-132051)
Steve Dower [Thu, 3 Apr 2025 16:35:21 +0000 (17:35 +0100)] 
gh-131423: Update OpenSSL build tag to 3.0.16.2 to fix ARM64 crash (GH-132051)

7 months agogh-131591: Implement PEP 768 (#131937)
Pablo Galindo Salgado [Thu, 3 Apr 2025 15:20:01 +0000 (16:20 +0100)] 
gh-131591: Implement PEP 768 (#131937)

Co-authored-by: Ivona Stojanovic <stojanovic.i@hotmail.com>
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
7 months agoGH-131904: Fix Py_STACKREF_DEBUG build (GH-132022)
Mark Shannon [Thu, 3 Apr 2025 08:40:37 +0000 (09:40 +0100)] 
GH-131904: Fix Py_STACKREF_DEBUG build (GH-132022)

7 months agoRemove deferred ``typing`` import in ``annotationlib`` (#132034)
Adam Turner [Thu, 3 Apr 2025 03:30:31 +0000 (04:30 +0100)] 
Remove deferred ``typing`` import in ``annotationlib`` (#132034)

7 months agogh-60115: Support frozen modules for linecache.getline() (#131638)
Tian Gao [Wed, 2 Apr 2025 23:50:01 +0000 (19:50 -0400)] 
gh-60115: Support frozen modules for linecache.getline() (#131638)

7 months agogh-118761: Fix star-import of ast (#132025)
Jelle Zijlstra [Wed, 2 Apr 2025 18:15:05 +0000 (11:15 -0700)] 
gh-118761: Fix star-import of ast (#132025)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
7 months agogh-111178: Skip test_perf_profiler on function sanitizer (#132020)
Victor Stinner [Wed, 2 Apr 2025 16:46:10 +0000 (18:46 +0200)] 
gh-111178: Skip test_perf_profiler on function sanitizer (#132020)

Add 'function' parameter to check_sanitizer() of test.support.

7 months agogh-118761: Optimise import time for ast (#131953)
Adam Turner [Wed, 2 Apr 2025 16:22:15 +0000 (17:22 +0100)] 
gh-118761: Optimise import time for ast (#131953)

7 months agoGH-131498: Cases generator: Parse down to C statement level. (GH-131948)
Mark Shannon [Wed, 2 Apr 2025 15:31:59 +0000 (16:31 +0100)] 
GH-131498: Cases generator: Parse down to C statement level. (GH-131948)

* Parse down to statement level in the cases generator

* Add handling for #if macros, treating them much like normal ifs.

7 months agogh-131974: Fix usages of `locked_deref` in `ctypes` (#131975)
Peter Bierma [Wed, 2 Apr 2025 15:04:25 +0000 (11:04 -0400)] 
gh-131974: Fix usages of `locked_deref` in `ctypes` (#131975)

7 months agogh-131544: Update docs for PyType_AddWatcher (gh-132015)
Donghee Na [Wed, 2 Apr 2025 15:04:07 +0000 (00:04 +0900)] 
gh-131544: Update docs for PyType_AddWatcher (gh-132015)

7 months agogh-59705: Fix solaris detection in test_threading.test_set_name() (#132012)
Jakub Kulík [Wed, 2 Apr 2025 14:34:43 +0000 (16:34 +0200)] 
gh-59705: Fix solaris detection in test_threading.test_set_name() (#132012)

7 months agogh-132013: use relaxed atomics in hash of frozenset (#132014)
Kumar Aditya [Wed, 2 Apr 2025 14:31:05 +0000 (20:01 +0530)] 
gh-132013: use relaxed atomics in hash of frozenset (#132014)

Use relaxed atomics in hash of `frozenset` to fix TSAN warning.

7 months agogh-131888: fix ResourceWarning in test_ftplib (#131889)
Thomas Grainger [Wed, 2 Apr 2025 12:30:19 +0000 (13:30 +0100)] 
gh-131888: fix ResourceWarning in test_ftplib (#131889)

7 months agogh-132002: Fix crash of `ContextVar` on unhashable `str` subtype (#132003)
sobolevn [Wed, 2 Apr 2025 11:48:47 +0000 (14:48 +0300)] 
gh-132002: Fix crash of `ContextVar` on unhashable `str` subtype (#132003)

7 months agogh-130197: pygettext: Test the --escape option (GH-131902)
Tomas R. [Wed, 2 Apr 2025 08:46:54 +0000 (10:46 +0200)] 
gh-130197: pygettext: Test the --escape option (GH-131902)

7 months agoGH-128055: fix test_sysconfigdata_json outside the builddir (#128070)
Filipe Laíns 🇵🇸 [Wed, 2 Apr 2025 05:44:43 +0000 (06:44 +0100)] 
GH-128055: fix test_sysconfigdata_json outside the builddir (#128070)

7 months agoGH-131726: Split up _CHECK_VALIDITY_AND_SET_IP (GH-131810)
Brandt Bucher [Tue, 1 Apr 2025 23:55:05 +0000 (16:55 -0700)] 
GH-131726: Split up _CHECK_VALIDITY_AND_SET_IP (GH-131810)

7 months agoGH-131798: Allow the JIT to remove more int/float/str guards (GH-131800)
Brandt Bucher [Tue, 1 Apr 2025 22:10:15 +0000 (15:10 -0700)] 
GH-131798: Allow the JIT to remove more int/float/str guards (GH-131800)

7 months agogh-131987: Bump the magic number (#131991)
mpage [Tue, 1 Apr 2025 21:53:49 +0000 (14:53 -0700)] 
gh-131987: Bump the magic number (#131991)

This should have been done as part of 053c285 but got blown away
in a merge.

7 months agogh-131831: Implement PEP 758 – Allow except and except* expressions without parenthes...
Pablo Galindo Salgado [Tue, 1 Apr 2025 19:04:56 +0000 (20:04 +0100)] 
gh-131831: Implement PEP 758 – Allow except and except* expressions without parentheses (#131833)

7 months agogh-130704: Strength reduce `LOAD_FAST{_LOAD_FAST}` (#130708)
mpage [Tue, 1 Apr 2025 17:18:42 +0000 (10:18 -0700)] 
gh-130704: Strength reduce `LOAD_FAST{_LOAD_FAST}` (#130708)

Optimize `LOAD_FAST` opcodes into faster versions that load borrowed references onto the operand stack when we can prove that the lifetime of the local outlives the lifetime of the temporary that is loaded onto the stack.

7 months agoGH-131296: Disable MSVC-specific optimization in sre.c when compiling with clang...
Chris Eibl [Tue, 1 Apr 2025 16:29:45 +0000 (18:29 +0200)] 
GH-131296: Disable MSVC-specific optimization in sre.c when compiling with clang-cl (GH-131593)

7 months agogh-111178: remove redundant casts for functions with correct signatures (#131673)
Bénédikt Tran [Tue, 1 Apr 2025 15:18:11 +0000 (17:18 +0200)] 
gh-111178: remove redundant casts for functions with correct signatures (#131673)

7 months agogh-111178: Fix getsockaddrarg() undefined behavior (#131668)
Victor Stinner [Tue, 1 Apr 2025 13:54:27 +0000 (15:54 +0200)] 
gh-111178: Fix getsockaddrarg() undefined behavior (#131668)

Don't pass direct references to sockaddr members since their type may
not match PyArg_ParseTuple() types. Instead, use temporary 'int' and
'unsigned char' variables, and update sockaddr members afterwards.

On FreeBSD, treat BTPROTO_HCI node name as a bytes string,
not as an integer.

7 months agogh-131736: only apply `security_level` workaround in `test_ssl` for security levels... 131559/head
Will Childs-Klein [Tue, 1 Apr 2025 07:58:47 +0000 (03:58 -0400)] 
gh-131736: only apply `security_level` workaround in `test_ssl` for security levels greater than 1 (#131739)

7 months agoMinor improvements to the programming FAQ (#127261)
Rafael Fontenelle [Tue, 1 Apr 2025 07:19:06 +0000 (04:19 -0300)] 
Minor improvements to the programming FAQ (#127261)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
7 months agogh-121249: Note struct module changes in What's New (#131867)
Sergey B Kirpichev [Tue, 1 Apr 2025 07:16:36 +0000 (10:16 +0300)] 
gh-121249: Note struct module changes in What's New (#131867)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
7 months ago gh-125957: sync argument naming in sphinx docs of the cmath and help() (#125958)
Sergey B Kirpichev [Tue, 1 Apr 2025 07:16:11 +0000 (10:16 +0300)] 
 gh-125957: sync argument naming in sphinx docs of the cmath and help() (#125958)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
7 months agogh-131531: Add `android.py package` command (#131532)
Malcolm Smith [Tue, 1 Apr 2025 00:46:29 +0000 (01:46 +0100)] 
gh-131531: Add `android.py package` command (#131532)

Adds a `package` entry point to the `android.py` build script to support
creating an Android distribution artefact.

7 months agogh-129917: Update installers to use SQLite 3.49.1 (#131025)
Erlend E. Aasland [Mon, 31 Mar 2025 21:13:17 +0000 (23:13 +0200)] 
gh-129917: Update installers to use SQLite 3.49.1 (#131025)

Co-authored-by: Ned Deily <nad@python.org>
7 months agoGH-131296: Add missing UNREACHABLE mark in thread_nt.h (GH-131589)
Chris Eibl [Mon, 31 Mar 2025 19:28:35 +0000 (21:28 +0200)] 
GH-131296: Add missing UNREACHABLE mark in thread_nt.h (GH-131589)

7 months agogh-131675: Fix `mi_atomic_yield` in mimalloc on 32-bit ARM (gh-131784)
Vincent Fazio [Mon, 31 Mar 2025 18:29:12 +0000 (13:29 -0500)] 
gh-131675: Fix `mi_atomic_yield` in mimalloc on 32-bit ARM (gh-131784)

Use the standard `__ARM_ARCH` macro, which is supported by GCC and Clang.

The branching logic for of `__ARMEL__` has been removed so if the target
architecture supports v7+ instructions, a yield is emitted, otherwise a nop
is emitted. This covers both big and little endian scenarios.

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
7 months agogh-131865: Properly apply exported CFLAGS for dtrace/systemtap builds (#131866)
stratakis [Mon, 31 Mar 2025 17:53:49 +0000 (19:53 +0200)] 
gh-131865: Properly apply exported CFLAGS for dtrace/systemtap builds (#131866)

When using --with-dtrace the resulting object file could be missing
specific CFLAGS exported by the build system due to the systemtap
script using specific defaults.

Exporting the CC and CFLAGS variables before the dtrace invocation
allows us to properly apply CFLAGS exported by the build system
even when cross-compiling.

The fix does not affect the dtrace invocation on Solaris/macOS.

7 months agogh-107369: Optimise ``textwrap.indent()`` (#131923)
Adam Turner [Mon, 31 Mar 2025 17:31:39 +0000 (18:31 +0100)] 
gh-107369: Optimise ``textwrap.indent()`` (#131923)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
7 months agogh-131936: Strengthen check in `_suggestions._generate_suggestions` (#131945)
Peter Bierma [Mon, 31 Mar 2025 17:30:29 +0000 (13:30 -0400)] 
gh-131936: Strengthen check in `_suggestions._generate_suggestions` (#131945)

7 months agogh-105499: typing: Remove an unused function (#131946)
Jelle Zijlstra [Mon, 31 Mar 2025 17:27:03 +0000 (10:27 -0700)] 
gh-105499: typing: Remove an unused function (#131946)

Leftover from #105511 I believe. GitHub code search found no usages other
than copies of typing.py and lists of stdlib functions.

7 months agoGH-131296: Fix incompatible pointer type warning in _winapi.c (GH-131600)
Chris Eibl [Mon, 31 Mar 2025 16:33:55 +0000 (18:33 +0200)] 
GH-131296: Fix incompatible pointer type warning in _winapi.c (GH-131600)

7 months agoGH-131296: Fix clang-cl warnings on Windows in sqlite3 (GH-131906)
Chris Eibl [Mon, 31 Mar 2025 15:15:31 +0000 (17:15 +0200)] 
GH-131296: Fix clang-cl warnings on Windows in sqlite3 (GH-131906)

7 months agoGH-131296: Fix parenthesis warnings on Windows-specific code (GH-131905)
Chris Eibl [Mon, 31 Mar 2025 14:54:30 +0000 (16:54 +0200)] 
GH-131296: Fix parenthesis warnings on Windows-specific code (GH-131905)

7 months agoGH-131296: Fix clang-cl warning on Windows in liblzma (GH-131897)
Chris Eibl [Mon, 31 Mar 2025 14:50:44 +0000 (16:50 +0200)] 
GH-131296: Fix clang-cl warning on Windows in liblzma (GH-131897)

Also removes warnings suppression for MSVC that no longer need to be suppressed.

7 months agoFix PEP number in `ast_opt.c` for new `finally` check (#131928)
sobolevn [Mon, 31 Mar 2025 13:29:23 +0000 (16:29 +0300)] 
Fix PEP number in `ast_opt.c` for new `finally` check (#131928)

7 months agogh-131525: Remove `_HashedSeq` wrapper from `lru_cache` (gh-131922)
Lukas Geiger [Mon, 31 Mar 2025 13:23:41 +0000 (14:23 +0100)] 
gh-131525: Remove `_HashedSeq` wrapper from `lru_cache` (gh-131922)