]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Pieter Eendebak [Fri, 18 Apr 2025 14:50:29 +0000 (16:50 +0200)]
gh-132657: Avoid locking in frozenset.__contains__ (#132659)
sobolevn [Fri, 18 Apr 2025 14:32:28 +0000 (17:32 +0300)]
gh-132673: Fix `ctypes.Structure` with `_align_=0` (#132676)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Brandt Bucher [Fri, 18 Apr 2025 14:16:28 +0000 (07:16 -0700)]
GH-131498: Replace single-element arrays with scalars in bytecodes.c (GH-132615)
Łukasz Langa [Fri, 18 Apr 2025 13:56:44 +0000 (15:56 +0200)]
gh-132678: Add --prioritize to regrtest (GH-132679)
This is an option that allows the user to specify, which selected tests should
execute first, even if the order is otherwise randomized. This is particularly
useful for tests that run the longest.
Pablo Galindo Salgado [Fri, 18 Apr 2025 13:42:20 +0000 (14:42 +0100)]
gh-130861: Add clarification to the perf docs on optimization levels (#131098)
Kumar Aditya [Fri, 18 Apr 2025 13:12:45 +0000 (18:42 +0530)]
gh-127945: skip more tests in ctypes when using parallel threads (#132682)
Pablo Galindo Salgado [Fri, 18 Apr 2025 12:30:04 +0000 (13:30 +0100)]
gh-129958: Properly disallow newlines in format specs in single-quoted f-strings (GH-130063)
Pablo Galindo Salgado [Fri, 18 Apr 2025 12:26:59 +0000 (13:26 +0100)]
gh-132553: Build the perf tool without buildid cache (GH-132663)
Yuki Kobayashi [Fri, 18 Apr 2025 12:08:50 +0000 (21:08 +0900)]
gh-132668: Remove outdated description of `POP_JUMP_*` instructions (#132669)
Bénédikt Tran [Fri, 18 Apr 2025 11:52:17 +0000 (13:52 +0200)]
gh-132674: fix `_hashopenssl.c` compiler warnings on free-threaded build (#132675)
Bénédikt Tran [Fri, 18 Apr 2025 10:24:34 +0000 (12:24 +0200)]
gh-132097: use a macro for semantically casting function pointers (#132406)
Kumar Aditya [Fri, 18 Apr 2025 09:36:27 +0000 (15:06 +0530)]
gh-132643: use atomic load for dict in specializer (#132653)
Chris Eibl [Fri, 18 Apr 2025 08:45:30 +0000 (10:45 +0200)]
GH-131296: fix clang-cl warning on Windows in `Objects/longobject.c` for 32bit builds (#131604)
Jon Crall [Fri, 18 Apr 2025 08:39:30 +0000 (04:39 -0400)]
gh-103997: Automatically dedent the argument to "-c" (#103998)
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
Co-authored-by: Kirill Podoprigora <80244920+Eclips4@users.noreply.github.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
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>
Bénédikt Tran [Fri, 18 Apr 2025 08:15:40 +0000 (10:15 +0200)]
gh-132097: allow AC to disable fastcall convention to avoid UBSan failures (#131605)
Adam Turner [Fri, 18 Apr 2025 01:49:19 +0000 (02:49 +0100)]
Remove duplicate includes: Python/importdl.c (#132623)
Alper [Thu, 17 Apr 2025 20:38:34 +0000 (13:38 -0700)]
gh-131173: Improve exception handling during take_ownership processing (#132620)
Save and restore exceptions during take_ownership processing to preserve
exceptions currently being raised.
Co-authored-by: alperyoney <alperyoney@fb.com>
Ee Durbin [Thu, 17 Apr 2025 19:42:40 +0000 (15:42 -0400)]
Docs: Migrate entirely to PSF hosted plausible for analytics (#132648)
Steve Dower [Thu, 17 Apr 2025 19:14:00 +0000 (20:14 +0100)]
gh-132649: Allow passing --include-tcltk to PC\layout on Windows ARM64 (GH-132650)
Kumar Aditya [Thu, 17 Apr 2025 18:44:14 +0000 (00:14 +0530)]
gh-127945: fix critical sections around ctypes array (#132646)
Tomasz Pytel [Thu, 17 Apr 2025 17:08:59 +0000 (13:08 -0400)]
gh-132284: Don't wrap base PyCFunction slots on class creation if not overridden (#132329)
Jelle Zijlstra [Thu, 17 Apr 2025 16:03:53 +0000 (09:03 -0700)]
gh-132493: Avoid eager import of annotationlib in typing (again) (#132596)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Sergey Miryanov [Thu, 17 Apr 2025 10:04:42 +0000 (03:04 -0700)]
gh-132042: Do not lookup tp_dict each time to speedup class creation (#132619)
Duprat [Thu, 17 Apr 2025 09:41:30 +0000 (11:41 +0200)]
gh-132561: Fix the public `multiprocessing.SemLock.locked` method (#132586)
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
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)
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>
Adam Turner [Thu, 17 Apr 2025 07:10:01 +0000 (08:10 +0100)]
Remove duplicate includes: Python/ast_opt.c (#132621)
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>
Chris Eibl [Wed, 16 Apr 2025 21:44:57 +0000 (23:44 +0200)]
GH-131296: Remove unused variable from overlapped.c (GH-131590)
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.
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)
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.
Remove unused headers from _asynciomodule.c file (#132047)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Yongzi Li [Wed, 16 Apr 2025 18:11:47 +0000 (02:11 +0800)]
Fix some typos in various doc files (GH-132589)
Tian Gao [Wed, 16 Apr 2025 17:44:33 +0000 (10:44 -0700)]
Clean up pdb state after each pdb doctest (#132577)
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>
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)
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>
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.
Jelle Zijlstra [Wed, 16 Apr 2025 15:21:27 +0000 (08:21 -0700)]
typing: Add missing test case for Protocol inheritance (#132597)
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>
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.
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.
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>
Jelle Zijlstra [Wed, 16 Apr 2025 13:16:13 +0000 (06:16 -0700)]
annotationlib: Remove some unnecessary dict copies (#132495)
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)
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)
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.
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.
Kumar Aditya [Wed, 16 Apr 2025 00:40:56 +0000 (06:10 +0530)]
gh-132070: add `PyObject_Realloc` suppression in free-threading (#132468)
Tian Gao [Tue, 15 Apr 2025 22:31:52 +0000 (15:31 -0700)]
gh-132536: Do not disable PY_THROW event in bdb (#132537)
Adam Turner [Tue, 15 Apr 2025 22:27:01 +0000 (23:27 +0100)]
Docs: Synchronise ``indexsidebar.html`` with docsbuild-scripts (#132567)
Jelle Zijlstra [Tue, 15 Apr 2025 20:10:53 +0000 (13:10 -0700)]
gh-132491: Rename annotationlib.value_to_string to type_repr (#132492)
Jelle Zijlstra [Tue, 15 Apr 2025 19:58:21 +0000 (12:58 -0700)]
gh-129463: Remove two attributes from ForwardRef equality (#132283)
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>
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)
Jelle Zijlstra [Tue, 15 Apr 2025 17:14:27 +0000 (10:14 -0700)]
gh-132493: Support deferred annotations in Protocols (#132494)
Raymond Hettinger [Tue, 15 Apr 2025 16:50:52 +0000 (11:50 -0500)]
Fix argument order in multinomial() example (gh-132557)
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)
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)
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>
Sergey B Kirpichev [Tue, 15 Apr 2025 10:38:03 +0000 (13:38 +0300)]
gh-130664: support '_' (just as ',') in Decimal's formatting (#132155)
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.
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.
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)
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)
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>
Semyon Moroz [Mon, 14 Apr 2025 16:55:29 +0000 (20:55 +0400)]
gh-131885: Document `/` for `codecs` functions (#131992)
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)
RUANG (James Roy) [Mon, 14 Apr 2025 16:40:39 +0000 (00:40 +0800)]
gh-46236: Add missing PyUnicode_FromOrdinal() doc (#132040)
Tomasz Pytel [Mon, 14 Apr 2025 16:31:19 +0000 (12:31 -0400)]
gh-131757: allow lru_cache functions to execute concurrently (#131758)
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)
Yongzi Li [Mon, 14 Apr 2025 13:24:46 +0000 (21:24 +0800)]
Docs: fix some typos in `Doc/library` (#132511)
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)
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)
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)
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)
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)
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.
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).
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.
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>
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)
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 ).
Tian Gao [Sun, 13 Apr 2025 21:49:35 +0000 (14:49 -0700)]
gh-120144: Refactor bdb monitoring backend to match settrace behavior (#132484)
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>
Kumar Aditya [Sun, 13 Apr 2025 21:39:24 +0000 (03:09 +0530)]
gh-86513: improve docs of loop.call_exception_handler (#132466)
Tomas R. [Sun, 13 Apr 2025 20:44:00 +0000 (22:44 +0200)]
gh-132435: Test syntax warnings in a finally block (GH-132436)
Yuki Kobayashi [Sun, 13 Apr 2025 18:35:26 +0000 (03:35 +0900)]
gh-101100: Fix sphinx warnings in `library/plistlib.rst` (#132422)
Tapeline [Sun, 13 Apr 2025 16:47:44 +0000 (21:47 +0500)]
gh-132111: Document dataclasses.InitVar (#132446)
Serhiy Storchaka [Sun, 13 Apr 2025 15:39:22 +0000 (18:39 +0300)]
gh-132099: Fix documentation for the BTPROTO_HCI protocol (GH-132118)
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.
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>
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)
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>
Felix Scherz [Sun, 13 Apr 2025 07:35:44 +0000 (09:35 +0200)]
gh-132354: document return value for `asyncio.Task.cancel` (#132374)
Yongzi Li [Sun, 13 Apr 2025 07:18:58 +0000 (15:18 +0800)]
Fix a typo in c-api/typeobj.rst (#132317)
Yongzi Li [Sun, 13 Apr 2025 07:16:59 +0000 (15:16 +0800)]
Docs: Fix a typo in `Doc/c-api/unicode.rst` (#132318)
Serhiy Storchaka [Sat, 12 Apr 2025 22:35:28 +0000 (01:35 +0300)]
gh-132429: Remove not working test for Bluetooth socket (GH-132459)
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.