]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
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.

6 months agogh-132261: Store annotations at hidden internal keys in the class dict (#132345)
Jelle Zijlstra [Fri, 11 Apr 2025 04:13:26 +0000 (21:13 -0700)] 
gh-132261: Store annotations at hidden internal keys in the class dict (#132345)

6 months agoGH-131296: Suppress "unused label" warning for clang-cl closer to actual occurrence...
Chris Eibl [Thu, 10 Apr 2025 22:17:33 +0000 (00:17 +0200)] 
GH-131296: Suppress "unused label" warning for clang-cl closer to actual occurrence (GH-131900)

6 months agoGH-123599: `url2pathname()`: handle authority section in file URL (#126844)
Barney Gale [Thu, 10 Apr 2025 19:58:04 +0000 (20:58 +0100)] 
GH-123599: `url2pathname()`: handle authority section in file URL (#126844)

In `urllib.request.url2pathname()`, if the authority resolves to the
current host, discard it. If an authority is present but resolves somewhere
else, then on Windows we return a UNC path (as before), and on other
platforms we raise `URLError`.

Affects `pathlib.Path.from_uri()` in the same way.

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>
6 months agogh-132307: Remove unnecessary check in `asyncio/base_events.py` (#132324)
Stan Ulbrych [Thu, 10 Apr 2025 15:41:32 +0000 (16:41 +0100)] 
gh-132307: Remove unnecessary check in `asyncio/base_events.py` (#132324)

6 months agogh-106482: Clarify documentation of character set in RE (#106517)
Serhiy Storchaka [Thu, 10 Apr 2025 13:41:41 +0000 (16:41 +0300)] 
gh-106482: Clarify documentation of character set in RE (#106517)

Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
6 months agoFix example code in curses tutorial (#126446)
Jiayu Yi [Thu, 10 Apr 2025 12:06:38 +0000 (20:06 +0800)] 
Fix example code in curses tutorial (#126446)

6 months agoFix a typo in Python/pylifecycle.c (#132350)
Chu [Thu, 10 Apr 2025 11:57:37 +0000 (19:57 +0800)] 
Fix a typo in Python/pylifecycle.c (#132350)

6 months agogh-130320: gettext: Test fallback translations (GH-130321)
Tomas R. [Thu, 10 Apr 2025 11:56:21 +0000 (13:56 +0200)] 
gh-130320: gettext: Test fallback translations (GH-130321)

6 months agoDocs: Add a missing trailing full stop (#130561)
Liam DeVoe [Thu, 10 Apr 2025 11:51:20 +0000 (07:51 -0400)] 
Docs: Add a missing trailing full stop (#130561)

6 months agogh-132316: Require `socket` and `GITHUB_TOKEN` env to use `GitHubArtifactDatabase...
sobolevn [Thu, 10 Apr 2025 11:30:58 +0000 (14:30 +0300)] 
gh-132316: Require `socket` and `GITHUB_TOKEN` env to use `GitHubArtifactDatabase` (#132348)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
6 months agogh-72631: Fix wrong documentation for GzipFile.peek (#29820)
180909 [Thu, 10 Apr 2025 11:21:32 +0000 (19:21 +0800)] 
gh-72631: Fix wrong documentation for GzipFile.peek (#29820)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
6 months agogh-130453: pygettext: Allow specifying multiple keywords with the same function name...
Tomas R. [Thu, 10 Apr 2025 11:06:40 +0000 (13:06 +0200)] 
gh-130453: pygettext: Allow specifying multiple keywords with the same function name (GH-131380)

6 months agogh-132336: Mark a few "slow path" functions used by the interpreter loop as noinline...
mpage [Thu, 10 Apr 2025 08:41:15 +0000 (01:41 -0700)] 
gh-132336: Mark a few "slow path" functions used by the interpreter loop as noinline (#132337)

Mark a few functions used by the interpreter loop as noinline

These are all the slow path and should not be inlined into the interpreter
loop. Unfortunately, they end up being inlined with LTO and the current PGO
task.

6 months agodocs: Fix typo in context_aware_warnings flag (#132340)
Jo [Thu, 10 Apr 2025 04:19:01 +0000 (12:19 +0800)] 
docs: Fix typo in context_aware_warnings flag (#132340)

6 months agoGH-132330: Synchronise ``Doc/includes/typestruct.h`` with ``PyTypeObject`` (#132332)
Adam Turner [Thu, 10 Apr 2025 00:51:56 +0000 (01:51 +0100)] 
GH-132330: Synchronise ``Doc/includes/typestruct.h`` with ``PyTypeObject`` (#132332)

6 months agogh-128384: Use a context variable for warnings.catch_warnings (gh-130010)
Neil Schemenauer [Wed, 9 Apr 2025 23:18:54 +0000 (16:18 -0700)] 
gh-128384: Use a context variable for warnings.catch_warnings (gh-130010)

Make `warnings.catch_warnings()` use a context variable for holding
the warning filtering state if the `sys.flags.context_aware_warnings`
flag is set to true.  This makes using the context manager thread-safe in
multi-threaded programs.

Add the `sys.flags.thread_inherit_context` flag.  If true, starting a new
thread with `threading.Thread` will use a copy of the context
from the caller of `Thread.start()`.

Both these flags are set to true by default for the free-threaded build
and false for the default build.

Move the Python implementation of warnings.py into _py_warnings.py.

Make _contextvars a builtin module.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
6 months agoEscape hyphens in manpage (#132291)
Stefano Rivera [Wed, 9 Apr 2025 22:41:16 +0000 (15:41 -0700)] 
Escape hyphens in manpage (#132291)

6 months agoGH-131798: Remove JIT guards for dict, frozenset, list, set, and tuple (GH-132289)
Brandt Bucher [Wed, 9 Apr 2025 21:32:21 +0000 (14:32 -0700)] 
GH-131798: Remove JIT guards for dict, frozenset, list, set, and tuple (GH-132289)

7 months agogh-131336: fix thread safety for ctypes functions (#132232)
Kumar Aditya [Wed, 9 Apr 2025 18:18:40 +0000 (23:48 +0530)] 
gh-131336: fix thread safety for ctypes functions  (#132232)

7 months agogh-130587: Invoke regen-token rst with rstfile as an argument (#132304)
Karolina Surma [Wed, 9 Apr 2025 18:14:57 +0000 (20:14 +0200)] 
gh-130587: Invoke regen-token rst with rstfile as an argument (#132304)

7 months agogh-132305: Make Argument Clinic code compatible with Python 3.10 (#132306)
Serhiy Storchaka [Wed, 9 Apr 2025 18:10:02 +0000 (21:10 +0300)] 
gh-132305: Make Argument Clinic code compatible with Python 3.10 (#132306)

7 months agoRemove a duplicate word in the Makefile (#132301)
Chu [Wed, 9 Apr 2025 17:47:52 +0000 (01:47 +0800)] 
Remove a duplicate word in the Makefile (#132301)

7 months agogh-132285: Fix that `__annotate__` is not deleted when `__annotations__` is deleted...
sobolevn [Wed, 9 Apr 2025 17:36:08 +0000 (20:36 +0300)] 
gh-132285: Fix that `__annotate__` is not deleted when `__annotations__` is deleted (#132286)

7 months agogh-129987: Disable GCC SLP autovectorization for the interpreter loop on x86-64 ...
mpage [Wed, 9 Apr 2025 17:34:12 +0000 (10:34 -0700)] 
gh-129987: Disable GCC SLP autovectorization for the interpreter loop on x86-64 (#132295)

The SLP autovectorizer can cause poor code generation for opcode dispatch, negating any benefit we get from vectorization elsewhere in the interpreter loop.

7 months agoupdate comment about LLVM bug relevant for `--with-tail-call-interp` performance...
h-vetinari [Wed, 9 Apr 2025 14:50:38 +0000 (01:50 +1100)] 
update comment about LLVM bug relevant for `--with-tail-call-interp` performance (#132297)

7 months agogh-126703: Fix possible use after free in pycfunction freelist (GH-132319)
Ken Jin [Wed, 9 Apr 2025 14:49:33 +0000 (22:49 +0800)] 
gh-126703: Fix possible use after free in pycfunction freelist (GH-132319)