From cc4c5795af0de18a982969b3bdeb21c5ecf5c414 Mon Sep 17 00:00:00 2001 From: Mikhail Efimov Date: Fri, 24 Oct 2025 20:29:50 +0300 Subject: [PATCH 1/3] NEWS entry --- .../2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst b/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst new file mode 100644 index 00000000000000..3525e7231001c7 --- /dev/null +++ b/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst @@ -0,0 +1,4 @@ +Fixed a refcount leak when iterating over the result of the +built-in ``map`` function. It was possible if input ``iterables`` +have different lengths and ``strict`` is ``True``. +Patch by Mikhail Efimov. From e9356c6b91161286a3ec1f030415789488c6c816 Mon Sep 17 00:00:00 2001 From: Mikhail Efimov Date: Fri, 24 Oct 2025 21:02:25 +0300 Subject: [PATCH 2/3] Update Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst Co-authored-by: Jelle Zijlstra --- .../2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst b/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst index 3525e7231001c7..be68c80f13d9d9 100644 --- a/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst +++ b/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst @@ -1,4 +1,4 @@ -Fixed a refcount leak when iterating over the result of the -built-in ``map`` function. It was possible if input ``iterables`` +Fixed a reference leak when iterating over the result of +:func:`map`. The leak could happen when input ``iterables`` have different lengths and ``strict`` is ``True``. Patch by Mikhail Efimov. From fee000ff384f7a315d94ac4336b4152bece2a10c Mon Sep 17 00:00:00 2001 From: Mikhail Efimov Date: Fri, 24 Oct 2025 22:53:41 +0300 Subject: [PATCH 3/3] Review addressed --- .../2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst b/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst index be68c80f13d9d9..15aaea8ab027e3 100644 --- a/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst +++ b/Misc/NEWS.d/next/Core_and_Builtins/2025-10-24-20-16-42.gh-issue-140517.cqun-K.rst @@ -1,4 +1,3 @@ -Fixed a reference leak when iterating over the result of -:func:`map`. The leak could happen when input ``iterables`` -have different lengths and ``strict`` is ``True``. +Fixed a reference leak when iterating over the result of :func:`map` +with ``strict=True`` when the input iterables have different lengths. Patch by Mikhail Efimov.