]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
6 months agogh-101410: Revert loghelper() change in 75f59bb for integer input (GH-132625)
Sergey B Kirpichev [Thu, 17 Apr 2025 07:55:00 +0000 (10:55 +0300)] 
gh-101410: Revert loghelper() change in 75f59bb for integer input (GH-132625)

6 months agogh-130070: Fix `exec(<string>, closure=<non-None>)` unexpected path (#130071)
Bartosz Sławecki [Thu, 17 Apr 2025 07:14:55 +0000 (09:14 +0200)] 
gh-130070: Fix `exec(<string>, closure=<non-None>)` unexpected path (#130071)

Fixed an assertion error (so, it could be reproduced only in builds with assertions enabled)
for `exec` when the `source` argument is a string and the `closure` argument is not `None`.

Co-authored-by: sobolevn <mail@sobolevn.me>
6 months agoRemove duplicate includes: Python/ast_opt.c (#132621)
Adam Turner [Thu, 17 Apr 2025 07:10:01 +0000 (08:10 +0100)] 
Remove duplicate includes: Python/ast_opt.c (#132621)

6 months agogh-118761: Add helper to ensure that lazy imports are actually lazy (#132614)
Jelle Zijlstra [Thu, 17 Apr 2025 03:46:36 +0000 (20:46 -0700)] 
gh-118761: Add helper to ensure that lazy imports are actually lazy (#132614)

This ensures that if we jump through some hoops to make sure something is imported
lazily, we don't regress on importing it.

I recently already accidentally made typing import warnings and annotationlib eagerly.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
6 months agoGH-131296: Remove unused variable from overlapped.c (GH-131590)
Chris Eibl [Wed, 16 Apr 2025 21:44:57 +0000 (23:44 +0200)] 
GH-131296: Remove unused variable from overlapped.c (GH-131590)

6 months agogh-128384: Fix for unreliable warnings unit tests. (gh-132611)
Neil Schemenauer [Wed, 16 Apr 2025 20:13:23 +0000 (13:13 -0700)] 
gh-128384: Fix for unreliable warnings unit tests. (gh-132611)

When the `showwarning()` function is replaced, make sure to restore
it after the test finishes.  Add a timeout for `Barrier()` so we
don't hang for a long time if something goes wrong.

6 months agoAdd Doc section in free-threaded extension howto for critical sections (GH-132531)
Neil Schemenauer [Wed, 16 Apr 2025 19:43:01 +0000 (12:43 -0700)] 
Add Doc section in free-threaded extension howto for critical sections (GH-132531)

6 months agogh-132608: Fix a sample code coloring for ast.While (#132609)
Tan90909090 [Wed, 16 Apr 2025 19:23:13 +0000 (04:23 +0900)] 
gh-132608: Fix a sample code coloring for ast.While (#132609)

Add missing '>' in prompt.

6 months agoRemove unused headers from _asynciomodule.c file (#132047)
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి) [Wed, 16 Apr 2025 18:20:41 +0000 (23:50 +0530)] 
Remove unused headers from _asynciomodule.c file (#132047)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
6 months agoFix some typos in various doc files (GH-132589)
Yongzi Li [Wed, 16 Apr 2025 18:11:47 +0000 (02:11 +0800)] 
Fix some typos in various doc files (GH-132589)

6 months agoClean up pdb state after each pdb doctest (#132577)
Tian Gao [Wed, 16 Apr 2025 17:44:33 +0000 (10:44 -0700)] 
Clean up pdb state after each pdb doctest (#132577)

6 months agotyping docs: Clarify Protocol / runtime_checkable docs (#132606)
Jelle Zijlstra [Wed, 16 Apr 2025 17:44:17 +0000 (10:44 -0700)] 
typing docs: Clarify Protocol / runtime_checkable docs (#132606)

- Explicitly say that isinstance/issubclass do not work on non-runtime checkable
  protocols.
- Move the sentence "This raises TypeError when applied to a non-protocol class". It
  took me quite some time to decide what "this" was here: it refers to applying the
  decorator, not to an isinstance() call.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
6 months agogh-127945: change `_ctypes_test.c` static globals to thread local (#132575)
Kumar Aditya [Wed, 16 Apr 2025 17:41:27 +0000 (23:11 +0530)] 
gh-127945: change `_ctypes_test.c` static globals to thread local (#132575)

6 months agogh-131798: Use `sym_new_type` instead of `sym_new_not_null` for `_BUILD_LIST`, `_BUIL...
Nadeshiko Manju [Wed, 16 Apr 2025 17:17:48 +0000 (01:17 +0800)] 
gh-131798: Use `sym_new_type` instead of `sym_new_not_null` for `_BUILD_LIST`, `_BUILD_SLICE`, and `_BUILD_MAP` (GH-132434)

---------

Signed-off-by: Manjusaka <me@manjusaka.me>
6 months agogh-130104: Call __rpow__ in ternary pow() if necessary (GH-130251)
Serhiy Storchaka [Wed, 16 Apr 2025 15:32:41 +0000 (18:32 +0300)] 
gh-130104: Call __rpow__ in ternary pow() if necessary (GH-130251)

Previously it was only called in binary pow() and the binary
power operator.

6 months agotyping: Add missing test case for Protocol inheritance (#132597)
Jelle Zijlstra [Wed, 16 Apr 2025 15:21:27 +0000 (08:21 -0700)] 
typing: Add missing test case for Protocol inheritance (#132597)

6 months agogh-132493: lazy evaluation of annotations in `typing._proto_hook` (#132534)
Felix Scherz [Wed, 16 Apr 2025 15:20:35 +0000 (17:20 +0200)] 
gh-132493: lazy evaluation of annotations in `typing._proto_hook` (#132534)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
6 months agogh-130052: Fix search_map_for_section() error handling (#132594)
Victor Stinner [Wed, 16 Apr 2025 13:56:58 +0000 (15:56 +0200)] 
gh-130052: Fix search_map_for_section() error handling (#132594)

* Don't call close() if the file descriptor is negative.
* If close() fails, chain the existing exception.

6 months agoannotationlib: Move ForwardRef tests to test_annotationlib (#132571)
Jelle Zijlstra [Wed, 16 Apr 2025 13:40:29 +0000 (06:40 -0700)] 
annotationlib: Move ForwardRef tests to test_annotationlib (#132571)

I started with just moving ForwardRefTests to test_annotationlib,
but found that it contained a number of tests for no_type_check, which
I moved to a new class in test_typing, as well as a number of tests that
are more appropriately classified as tests for get_type_hints().

One test, test_forward_equality_namespace(), was somewhat accidentally
depending on a global class A in test_typing. I added a class A in the
annotationlib tests instead.

Also add a useful comment in annotationlib.

6 months agoUse Windows ARM64 hosted runners (#132546)
Hugo van Kemenade [Wed, 16 Apr 2025 13:27:20 +0000 (16:27 +0300)] 
Use Windows ARM64 hosted runners (#132546)

Co-authored-by: Diego Russo <diego.russo@arm.com>
6 months agoannotationlib: Remove some unnecessary dict copies (#132495)
Jelle Zijlstra [Wed, 16 Apr 2025 13:16:13 +0000 (06:16 -0700)] 
annotationlib: Remove some unnecessary dict copies (#132495)

6 months agogh-130941: Fix `configparser` parsing values with `allow_no_value` and `interpolation...
sobolevn [Wed, 16 Apr 2025 10:39:11 +0000 (13:39 +0300)] 
gh-130941: Fix `configparser` parsing values with `allow_no_value` and `interpolation` set (GH-130949)

6 months agogh-127591: Fix altering environment in test_urllib2 (unsetting no_proxy) (GH-132584)
Serhiy Storchaka [Wed, 16 Apr 2025 10:05:54 +0000 (13:05 +0300)] 
gh-127591: Fix altering environment in test_urllib2 (unsetting no_proxy) (GH-132584)

6 months agogh-132099: Accept an integer as the address for BTPROTO_HCI on Linux (GH-132525)
Serhiy Storchaka [Wed, 16 Apr 2025 10:02:51 +0000 (13:02 +0300)] 
gh-132099: Accept an integer as the address for BTPROTO_HCI on Linux (GH-132525)

Previously only an integer packed in a tuple was accepted, while
getsockname() could return a raw integer.
Now the result of getsockname() is always acceptable as an address.

6 months agogh-132535: Fix resource warnings in test_timeout (GH-132572)
Serhiy Storchaka [Wed, 16 Apr 2025 07:20:07 +0000 (10:20 +0300)] 
gh-132535: Fix resource warnings in test_timeout (GH-132572)

They were emitted if internet connection was not available.

6 months agogh-132070: add `PyObject_Realloc` suppression in free-threading (#132468)
Kumar Aditya [Wed, 16 Apr 2025 00:40:56 +0000 (06:10 +0530)] 
gh-132070: add `PyObject_Realloc` suppression in free-threading (#132468)

6 months agogh-132536: Do not disable PY_THROW event in bdb (#132537)
Tian Gao [Tue, 15 Apr 2025 22:31:52 +0000 (15:31 -0700)] 
gh-132536: Do not disable PY_THROW event in bdb (#132537)

6 months agoDocs: Synchronise ``indexsidebar.html`` with docsbuild-scripts (#132567)
Adam Turner [Tue, 15 Apr 2025 22:27:01 +0000 (23:27 +0100)] 
Docs: Synchronise ``indexsidebar.html`` with docsbuild-scripts (#132567)

6 months agogh-132491: Rename annotationlib.value_to_string to type_repr (#132492)
Jelle Zijlstra [Tue, 15 Apr 2025 20:10:53 +0000 (13:10 -0700)] 
gh-132491: Rename annotationlib.value_to_string to type_repr (#132492)

6 months agogh-129463: Remove two attributes from ForwardRef equality (#132283)
Jelle Zijlstra [Tue, 15 Apr 2025 19:58:21 +0000 (12:58 -0700)] 
gh-129463: Remove two attributes from ForwardRef equality (#132283)

6 months agogh-114713: Handle case of an empty string passed to `zoneinfo.ZoneInfo` (#114731)
Bogdan Romanyuk [Tue, 15 Apr 2025 18:41:52 +0000 (18:41 +0000)] 
gh-114713: Handle case of an empty string passed to `zoneinfo.ZoneInfo` (#114731)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
6 months agoGH-90812: Add test for `urlopen()` of file URI for UNC path (#132489)
Barney Gale [Tue, 15 Apr 2025 18:16:34 +0000 (19:16 +0100)] 
GH-90812: Add test for `urlopen()` of file URI for UNC path (#132489)

6 months agogh-132493: Support deferred annotations in Protocols (#132494)
Jelle Zijlstra [Tue, 15 Apr 2025 17:14:27 +0000 (10:14 -0700)] 
gh-132493: Support deferred annotations in Protocols (#132494)

6 months agoFix argument order in multinomial() example (gh-132557)
Raymond Hettinger [Tue, 15 Apr 2025 16:50:52 +0000 (11:50 -0500)] 
Fix argument order in multinomial() example (gh-132557)

6 months agoGH-131296: fix clang-cl warning on Windows in pegen.h (#131584)
Chris Eibl [Tue, 15 Apr 2025 16:01:42 +0000 (18:01 +0200)] 
GH-131296: fix clang-cl warning on Windows in pegen.h (#131584)

6 months agogh-127945: move initialization of field desc to module exec in ctypes (#132552)
Kumar Aditya [Tue, 15 Apr 2025 14:00:33 +0000 (19:30 +0530)] 
gh-127945: move initialization of field desc to module exec in ctypes  (#132552)

6 months agogh-132176: Fix crash on `type()` when `tuple` subclass passed as `bases` (#132212)
sobolevn [Tue, 15 Apr 2025 11:13:51 +0000 (14:13 +0300)] 
gh-132176: Fix crash on `type()` when `tuple` subclass passed as `bases` (#132212)

Co-authored-by: Victor Stinner <vstinner@python.org>
6 months agogh-130664: support '_' (just as ',') in Decimal's formatting (#132155)
Sergey B Kirpichev [Tue, 15 Apr 2025 10:38:03 +0000 (13:38 +0300)] 
gh-130664: support '_' (just as ',') in Decimal's formatting (#132155)

6 months agogh-129987: Selectively re-enable SLP autovectorization of _PyEval_EvalFrameDefault...
T. Wouters [Tue, 15 Apr 2025 09:39:32 +0000 (11:39 +0200)] 
gh-129987: Selectively re-enable SLP autovectorization of _PyEval_EvalFrameDefault (#132530)

Only disable SLP autovectorization of `_PyEval_EvalFrameDefault` on newer
GCCs, as the optimization bug seems to exist only on GCC 12 and later, and
before GCC 9 disabling the optimization has a dramatic performance impact.

6 months agoGH-123599: Match `file:` URL hostname against machine hostname in urllib (#132523)
Barney Gale [Tue, 15 Apr 2025 00:05:06 +0000 (01:05 +0100)] 
GH-123599: Match `file:` URL hostname against machine hostname in urllib (#132523)

In `_is_local_authority()`, return early if the authority matches the
machine hostname from `socket.gethostname()`, rather than resolving the
names and matching IP addresses.

6 months agogh-124476: Fix decoding from the locale encoding in the C.UTF-8 locale (GH-132477)
Serhiy Storchaka [Mon, 14 Apr 2025 18:32:41 +0000 (21:32 +0300)] 
gh-124476: Fix decoding from the locale encoding in the C.UTF-8 locale (GH-132477)

6 months agogh-70145: Add support for channels in Bluetooth HCI protocol (GH-132481)
Serhiy Storchaka [Mon, 14 Apr 2025 17:09:16 +0000 (20:09 +0300)] 
gh-70145: Add support for channels in Bluetooth HCI protocol (GH-132481)

6 months agogh-85702: Catch IsADirectoryError in zoneinfo (#131333)
Stan Ulbrych [Mon, 14 Apr 2025 17:07:51 +0000 (18:07 +0100)] 
gh-85702: Catch IsADirectoryError in zoneinfo (#131333)

Co-authored-by: Victor Stinner <vstinner@python.org>
6 months agogh-131885: Document `/` for `codecs` functions (#131992)
Semyon Moroz [Mon, 14 Apr 2025 16:55:29 +0000 (20:55 +0400)] 
gh-131885: Document `/` for `codecs` functions (#131992)

6 months agogh-131803: Clarify that you must register signal handlers for set_wakeup_fd (#131859)
Jeremy Fleischman [Mon, 14 Apr 2025 16:46:11 +0000 (09:46 -0700)] 
gh-131803: Clarify that you must register signal handlers for set_wakeup_fd (#131859)

6 months agogh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)
RUANG (James Roy) [Mon, 14 Apr 2025 16:40:39 +0000 (00:40 +0800)] 
gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)

6 months agogh-131757: allow lru_cache functions to execute concurrently (#131758)
Tomasz Pytel [Mon, 14 Apr 2025 16:31:19 +0000 (12:31 -0400)] 
gh-131757: allow lru_cache functions to execute concurrently (#131758)

6 months agogh-132515: de-duplicate `test_dataclass_derived_generic_from_slotted_base` (#132516)
Bénédikt Tran [Mon, 14 Apr 2025 15:06:38 +0000 (17:06 +0200)] 
gh-132515: de-duplicate `test_dataclass_derived_generic_from_slotted_base` (#132516)

6 months agoDocs: fix some typos in `Doc/library` (#132511)
Yongzi Li [Mon, 14 Apr 2025 13:24:46 +0000 (21:24 +0800)] 
Docs: fix some typos in `Doc/library` (#132511)

6 months agoGH-131498: Cases generator: Allow input and 'peek' variables to be modified (GH-132506)
Mark Shannon [Mon, 14 Apr 2025 11:19:53 +0000 (12:19 +0100)] 
GH-131498: Cases generator: Allow input and 'peek' variables to be modified (GH-132506)

6 months agogh-127945: fix thread safety and add lock held assertions to paramfunc in ctypes...
Kumar Aditya [Mon, 14 Apr 2025 08:35:06 +0000 (14:05 +0530)] 
gh-127945: fix thread safety and add lock held assertions to paramfunc in ctypes (#132473)

6 months agogh-71339: Use new assertion methods in the email tests (GH-129055)
Serhiy Storchaka [Mon, 14 Apr 2025 06:25:58 +0000 (09:25 +0300)] 
gh-71339: Use new assertion methods in the email tests (GH-129055)

6 months agogh-71339: Use new assertion methods in the http tests (GH-129058)
Serhiy Storchaka [Mon, 14 Apr 2025 06:24:54 +0000 (09:24 +0300)] 
gh-71339: Use new assertion methods in the http tests (GH-129058)

6 months agogh-71339: Use new assertion methods in the urllib tests (GH-129056)
Serhiy Storchaka [Mon, 14 Apr 2025 06:24:41 +0000 (09:24 +0300)] 
gh-71339: Use new assertion methods in the urllib tests (GH-129056)

6 months agoGH-115322: fix ctypes call_function audit hook on 32-bit platforms (GH-132496)
Gregory P. Smith [Mon, 14 Apr 2025 06:22:29 +0000 (23:22 -0700)] 
GH-115322: fix ctypes call_function audit hook on 32-bit platforms (GH-132496)

* GH-115322: fix ctypes call_function audit hook on 32-bit platforms.

It was using a signed conversion to communicate the function id (pointer) value.

6 months agogh-124986: Fix test_no_leaking in test_subprocess on NetBSD and FreeBSD (GH-132476)
Serhiy Storchaka [Mon, 14 Apr 2025 06:15:12 +0000 (09:15 +0300)] 
gh-124986: Fix test_no_leaking in test_subprocess on NetBSD and FreeBSD (GH-132476)

On platforms where the file descriptor limit is larger than FD_SETSIZE
that test was always skipped (FreeBSD) or always failing (NetBSD).

6 months agogh-132099: Harmonize Bluetooth address handling (GH-132486)
Serhiy Storchaka [Mon, 14 Apr 2025 05:58:56 +0000 (08:58 +0300)] 
gh-132099: Harmonize Bluetooth address handling (GH-132486)

Now all protocols always accept the Bluetooth address as string and
getsockname() always returns the Bluetooth address as string.

* BTPROTO_SCO now accepts not only bytes, but str.
* BTPROTO_SCO now checks address for embedded null.
* On *BSD, BTPROTO_HCI now accepts str instead of bytes.
* On FreeBSD, getsockname() for BTPROTO_HCI now returns str instead of bytes.
* On NetBSD and DragonFly BDS, BTPROTO_HCI now checks address for embedded null.

6 months agoGH-125866: Support complete "file:" URLs in urllib (#132378)
Barney Gale [Mon, 14 Apr 2025 00:49:02 +0000 (01:49 +0100)] 
GH-125866: Support complete "file:" URLs in urllib (#132378)

Add optional *add_scheme* argument to `urllib.request.pathname2url()`; when
set to true, a complete URL is returned. Likewise add optional
*require_scheme* argument to `url2pathname()`; when set to true, a complete
URL is accepted.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
6 months agogh-132064: Make annotationlib use __annotate__ if only it is present (#132195)
Jelle Zijlstra [Sun, 13 Apr 2025 23:32:44 +0000 (16:32 -0700)] 
gh-132064: Make annotationlib use __annotate__ if only it is present (#132195)

6 months agogh-132388: fix typos in `Lib/test/test_hmac.py` (#132480)
abhi-jha [Sun, 13 Apr 2025 22:26:58 +0000 (18:26 -0400)] 
gh-132388: fix typos in `Lib/test/test_hmac.py` (#132480)

Fix typos that slipped in GH-132389 (commit 9634085af3670b1eb654e3c7820aca66f358f39f).

6 months agogh-120144: Refactor bdb monitoring backend to match settrace behavior (#132484)
Tian Gao [Sun, 13 Apr 2025 21:49:35 +0000 (14:49 -0700)] 
gh-120144: Refactor bdb monitoring backend to match settrace behavior (#132484)

6 months agoGH-115322: Add missing audit hooks (GH-115624)
Robin Jadoul [Sun, 13 Apr 2025 21:46:20 +0000 (23:46 +0200)] 
GH-115322: Add missing audit hooks (GH-115624)

Add extra audit hooks to catch C function calling from ctypes,
reading/writing files through readline and executing external
programs through _posixsubprocess.

* Make audit-tests for open pass when readline.append_history_file is unavailable
* Less direct testing of _posixsubprocess for audit hooks
* Also remove the audit hook from call_cdeclfunction now that _ctypes_callproc does it instead.
* reword the NEWS entry.
* mention readline in NEWS
* add versionchanged markers
* fix audit_events.rst versionadded
* doc lint

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 months agogh-86513: improve docs of loop.call_exception_handler (#132466)
Kumar Aditya [Sun, 13 Apr 2025 21:39:24 +0000 (03:09 +0530)] 
gh-86513: improve docs of loop.call_exception_handler (#132466)

6 months agogh-132435: Test syntax warnings in a finally block (GH-132436)
Tomas R. [Sun, 13 Apr 2025 20:44:00 +0000 (22:44 +0200)] 
gh-132435: Test syntax warnings in a finally block (GH-132436)

6 months agogh-101100: Fix sphinx warnings in `library/plistlib.rst` (#132422)
Yuki Kobayashi [Sun, 13 Apr 2025 18:35:26 +0000 (03:35 +0900)] 
gh-101100: Fix sphinx warnings in `library/plistlib.rst` (#132422)

6 months agogh-132111: Document dataclasses.InitVar (#132446)
Tapeline [Sun, 13 Apr 2025 16:47:44 +0000 (21:47 +0500)] 
gh-132111: Document dataclasses.InitVar (#132446)

6 months agogh-132099: Fix documentation for the BTPROTO_HCI protocol (GH-132118)
Serhiy Storchaka [Sun, 13 Apr 2025 15:39:22 +0000 (18:39 +0300)] 
gh-132099: Fix documentation for the BTPROTO_HCI protocol (GH-132118)

6 months agogh-131624: Fix posix_spawn tests failing on NetBSD with stack limit assertions (GH...
Furkan Onder [Sun, 13 Apr 2025 11:06:38 +0000 (11:06 +0000)] 
gh-131624: Fix posix_spawn tests failing on NetBSD with stack limit assertions (GH-131625)

Fix recursive limit assertions on NetBSD for posix_spawn.

6 months agogh-129169: update `asyncio.ensure_future` docs to suggest taskgroups
Case Zumbrum [Sun, 13 Apr 2025 07:59:22 +0000 (03:59 -0400)] 
gh-129169: update `asyncio.ensure_future` docs to suggest taskgroups

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
6 months agogh-123471: Make concurrent iteration over itertools.repeat safe under free-threading...
Pieter Eendebak [Sun, 13 Apr 2025 07:56:58 +0000 (09:56 +0200)] 
gh-123471: Make concurrent iteration over itertools.repeat safe under free-threading (#131247)

6 months agogh-132106: Ensure that running `logging.handlers.QueueListener` cannot be started...
Charles Machalow [Sun, 13 Apr 2025 07:53:13 +0000 (00:53 -0700)] 
gh-132106: Ensure that running `logging.handlers.QueueListener` cannot be started again (GH-132444)

Prevents a thread leak
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
6 months agogh-132354: document return value for `asyncio.Task.cancel` (#132374)
Felix Scherz [Sun, 13 Apr 2025 07:35:44 +0000 (09:35 +0200)] 
gh-132354: document return value for `asyncio.Task.cancel` (#132374)

6 months agoFix a typo in c-api/typeobj.rst (#132317)
Yongzi Li [Sun, 13 Apr 2025 07:18:58 +0000 (15:18 +0800)] 
Fix a typo in c-api/typeobj.rst (#132317)

6 months agoDocs: Fix a typo in `Doc/c-api/unicode.rst` (#132318)
Yongzi Li [Sun, 13 Apr 2025 07:16:59 +0000 (15:16 +0800)] 
Docs: Fix a typo in `Doc/c-api/unicode.rst` (#132318)

6 months agogh-132429: Remove not working test for Bluetooth socket (GH-132459)
Serhiy Storchaka [Sat, 12 Apr 2025 22:35:28 +0000 (01:35 +0300)] 
gh-132429: Remove not working test for Bluetooth socket (GH-132459)

6 months agogh-132429: Fix support of Bluetooth sockets on NetBSD and DragonFly BSD (GH-132431)
Serhiy Storchaka [Sat, 12 Apr 2025 20:57:34 +0000 (23:57 +0300)] 
gh-132429: Fix support of Bluetooth sockets on NetBSD and DragonFly BSD (GH-132431)

* Also add support for cid and bdaddr_type in the BTPROTO_L2CAP address on FreeBSD.
* Return cid in getsockname() for BTPROTO_L2CAP if it is not zero.
* Fix a compiler warning on FreeBSD.

6 months agogh-132388: Increase test coverage for HMAC (#132389)
Bénédikt Tran [Sat, 12 Apr 2025 17:43:11 +0000 (19:43 +0200)] 
gh-132388: Increase test coverage for HMAC (#132389)

- Correctly test missing `digestmod` and `digest` parameters.
- Test when chunks of length > 2048 are passed to `update()`.
- Test one-shot HMAC-BLAKE2.

6 months agogh-132185: Speed up expanduser() test with large password database (GH-132231)
Serhiy Storchaka [Sat, 12 Apr 2025 16:17:52 +0000 (19:17 +0300)] 
gh-132185: Speed up expanduser() test with large password database (GH-132231)

Use only a limited number of randomly selected entries.

6 months agoDocs: Fix specifications of `gcvisitobjects_t` (#132433)
da-woods [Sat, 12 Apr 2025 15:36:02 +0000 (16:36 +0100)] 
Docs: Fix specifications of `gcvisitobjects_t` (#132433)

`gcvisitobjects_t` callbacks should return 1 for the iteration to continue instead of 0.

6 months agogh-58211: Add tests for the `__self__` attribute of builtins functions (#113575)
Adorilson Bezerra [Sat, 12 Apr 2025 12:02:43 +0000 (13:02 +0100)] 
gh-58211: Add tests for  the `__self__` attribute of builtins functions (#113575)

---------

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 months agogh-132106: Allow `logging.handlers.QueueListener` to be used as a context manager...
Charles Machalow [Sat, 12 Apr 2025 12:00:04 +0000 (05:00 -0700)] 
gh-132106: Allow `logging.handlers.QueueListener` to be used as a context manager (#132107)

6 months agogh-123441: Update Belorussian spelling (GH-132409)
Stan Ulbrych [Sat, 12 Apr 2025 10:36:01 +0000 (11:36 +0100)] 
gh-123441: Update Belorussian spelling (GH-132409)

6 months agogh-131927: Prevent emitting optimizer warnings twice in the REPL (#131993)
Tomas R. [Sat, 12 Apr 2025 10:34:36 +0000 (12:34 +0200)] 
gh-131927: Prevent emitting optimizer warnings twice in the REPL (#131993)

6 months agogh-125434: Fix building on OpenBSD (GH-132393)
Serhiy Storchaka [Sat, 12 Apr 2025 08:25:35 +0000 (11:25 +0300)] 
gh-125434: Fix building on OpenBSD (GH-132393)

pthread_get_name_np is defined in pthread_np.h.

6 months agogh-132399: fix invalid function signatures on the free-threaded build (#132400)
Bénédikt Tran [Sat, 12 Apr 2025 07:46:33 +0000 (09:46 +0200)] 
gh-132399: fix invalid function signatures on the free-threaded build (#132400)

6 months agogh-131290: ensure that test files can be executed as standalone scripts (#131371)
Maksim [Sat, 12 Apr 2025 07:46:19 +0000 (10:46 +0300)] 
gh-131290: ensure that test files can be executed as standalone scripts (#131371)

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
6 months agoGH-132417: ctypes: Fix potential `Py_DECREF(NULL)` when handling functions returning...
Nicolas Trangez [Sat, 12 Apr 2025 07:40:34 +0000 (09:40 +0200)] 
GH-132417: ctypes: Fix potential `Py_DECREF(NULL)` when handling functions returning `PyObject *` (#132418)

Some functions (such as `PyErr_Occurred`) with a `restype` set to `ctypes.py_object` may return NULL without setting an exception.

6 months agogh-132097: fix runtime UB when calling expat handlers (#132265)
Bénédikt Tran [Sat, 12 Apr 2025 07:20:11 +0000 (09:20 +0200)] 
gh-132097: fix runtime UB when calling expat handlers (#132265)

6 months agogh-132097: skip tests raising an explicit SIGSEV when UB sanitizer is on (#132398)
Bénédikt Tran [Sat, 12 Apr 2025 07:18:58 +0000 (09:18 +0200)] 
gh-132097: skip tests raising an explicit SIGSEV when UB sanitizer is on (#132398)

6 months agogh-130322: drop deprecation of `asyncio.set_event_loop` (#132349)
Kumar Aditya [Sat, 12 Apr 2025 06:33:52 +0000 (12:03 +0530)] 
gh-130322: drop deprecation of `asyncio.set_event_loop` (#132349)

6 months agogh-132386: Fix a crash when passing a dict subclass to `exec` (GH-132412)
Tomas R. [Fri, 11 Apr 2025 21:05:03 +0000 (23:05 +0200)] 
gh-132386: Fix a crash when passing a dict subclass to `exec` (GH-132412)

* Fix crash when passing a dict subclass to exec

* Add news entry

6 months agoAdd ``.yaml`` to ``.editorconfig`` (#132410)
Xuehai Pan [Fri, 11 Apr 2025 18:23:13 +0000 (02:23 +0800)] 
Add ``.yaml`` to ``.editorconfig`` (#132410)

6 months agogh-85302: Add support for BTPROTO_SCO on FreeBSD (GH-131981)
Serhiy Storchaka [Fri, 11 Apr 2025 16:38:17 +0000 (19:38 +0300)] 
gh-85302: Add support for BTPROTO_SCO on FreeBSD (GH-131981)

BTPROTO_SCO has been supported on FreeBSD since 2008.

6 months agogh-127405: Add ABIFLAGS to sysconfig variables on Windows (GH-131799)
Xuehai Pan [Fri, 11 Apr 2025 15:19:03 +0000 (23:19 +0800)] 
gh-127405: Add ABIFLAGS to sysconfig variables on Windows (GH-131799)

6 months agogh-111178: fix incorrect function signatures in docs (#132395)
Bénédikt Tran [Fri, 11 Apr 2025 14:59:38 +0000 (16:59 +0200)] 
gh-111178: fix incorrect function signatures in docs (#132395)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
6 months agogh-132356: Find the correct group name in test_group_no_follow_symlinks (#132357)
Karolina Surma [Fri, 11 Apr 2025 14:58:39 +0000 (16:58 +0200)] 
gh-132356: Find the correct group name in test_group_no_follow_symlinks (#132357)

Find the correct group name in test_group_no_follow_symlinks

6 months agoCI: Update outdated references to Python version and GH issues (#132394)
Bénédikt Tran [Fri, 11 Apr 2025 14:46:33 +0000 (16:46 +0200)] 
CI: Update outdated references to Python version and GH issues (#132394)

6 months agogh-131127: Minimal build support on systems using LibreSSL (GH-131128)
Collin Funk [Fri, 11 Apr 2025 12:35:12 +0000 (05:35 -0700)] 
gh-131127: Minimal build support on systems using LibreSSL (GH-131128)

6 months agoGH-127682: Only call `__iter__` once in generator expressions. (GH-132351)
Mark Shannon [Fri, 11 Apr 2025 08:37:22 +0000 (09:37 +0100)] 
GH-127682: Only call `__iter__` once in generator expressions. (GH-132351)

6 months agogh-132257: Remove -flto-partition=none for Linux LTO builds (GH-132258)
Ken Jin [Fri, 11 Apr 2025 08:06:05 +0000 (16:06 +0800)] 
gh-132257: Remove -flto-partition=none for Linux LTO builds (GH-132258)

Change the default LTO flags on GCC to not pass -flto-partition=none, and allow parallelization of LTO. This has a multiple factor speedup for LTO build times on GCC, with no noticeable loss in performance.

On newer make and newer GCC, this passes the jobserver automatically to GCC (or more like GCC grabs it from the env vars).

On older make, this will have benign warnings about serial compilation. It's safe to ignore them.