From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 7 Oct 2025 17:52:07 +0000 (+0200) Subject: [3.14] gh-137239: Add *_max functions to heapq.__all__ (gh-137241) (#137256) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a03dd74c9444930928c5e817f156223affb741f8;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-137239: Add *_max functions to heapq.__all__ (gh-137241) (#137256) gh-137239: Add *_max functions to heapq.__all__ (gh-137241) (cherry picked from commit 5f35f9b8fad50670604552062c1df8fbdff835ab) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- diff --git a/Lib/heapq.py b/Lib/heapq.py index 6ceb211f1ca2..17f62dd2d583 100644 --- a/Lib/heapq.py +++ b/Lib/heapq.py @@ -126,8 +126,9 @@ Believe me, real good tape sorts were quite spectacular to watch! From all times, sorting has always been a Great Art! :-) """ -__all__ = ['heappush', 'heappop', 'heapify', 'heapreplace', 'merge', - 'nlargest', 'nsmallest', 'heappushpop'] +__all__ = ['heappush', 'heappop', 'heapify', 'heapreplace', 'heappushpop', + 'heappush_max', 'heappop_max', 'heapify_max', 'heapreplace_max', + 'heappushpop_max', 'nlargest', 'nsmallest', 'merge'] def heappush(heap, item): """Push item onto heap, maintaining the heap invariant.""" diff --git a/Misc/NEWS.d/next/Library/2025-07-30-17-42-36.gh-issue-137239.qSpj32.rst b/Misc/NEWS.d/next/Library/2025-07-30-17-42-36.gh-issue-137239.qSpj32.rst new file mode 100644 index 000000000000..3be583ee937f --- /dev/null +++ b/Misc/NEWS.d/next/Library/2025-07-30-17-42-36.gh-issue-137239.qSpj32.rst @@ -0,0 +1 @@ +:mod:`heapq`: Update :data:`!heapq.__all__` with ``*_max`` functions.