From 6615fa4bcf6925a9d74694485337db0faed67c81 Mon Sep 17 00:00:00 2001 From: AN Long Date: Tue, 30 Dec 2025 20:19:46 +0900 Subject: [PATCH 1/4] Add note distinguishing concurrent.futures.Future from asyncio.Future --- Doc/library/asyncio-future.rst | 2 ++ Doc/library/concurrent.futures.rst | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/Doc/library/asyncio-future.rst b/Doc/library/asyncio-future.rst index 4b69e569523c58..5fae49f42e9b95 100644 --- a/Doc/library/asyncio-future.rst +++ b/Doc/library/asyncio-future.rst @@ -254,6 +254,8 @@ the Future has a result:: asyncio.run(main()) +.. _asyncio-vs-concurrent-futures: + .. important:: The Future object was designed to mimic diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index c2e2f7f820f4ef..6a7af12056e915 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -21,6 +21,13 @@ or separate processes, using :class:`ProcessPoolExecutor`. Each implements the same interface, which is defined by the abstract :class:`Executor` class. +.. important:: + + :class:`concurrent.futures.Future` must not be confused with + :class:`asyncio.Future`, which is designed for use with :mod:`asyncio` + tasks and coroutines. See :ref:`asyncio-vs-concurrent-futures` for a + detailed comparison of the two. + .. include:: ../includes/wasm-notavail.rst Executor Objects From 655980a1b2afcecb46668736d4ec0b8c5678db61 Mon Sep 17 00:00:00 2001 From: AN Long Date: Tue, 30 Dec 2025 20:35:19 +0900 Subject: [PATCH 2/4] Fix sphinx build by remove the cross ref --- Doc/library/asyncio-future.rst | 2 -- Doc/library/concurrent.futures.rst | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Doc/library/asyncio-future.rst b/Doc/library/asyncio-future.rst index 5fae49f42e9b95..4b69e569523c58 100644 --- a/Doc/library/asyncio-future.rst +++ b/Doc/library/asyncio-future.rst @@ -254,8 +254,6 @@ the Future has a result:: asyncio.run(main()) -.. _asyncio-vs-concurrent-futures: - .. important:: The Future object was designed to mimic diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index 6a7af12056e915..4bd7a3faa7b457 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -25,7 +25,7 @@ by the abstract :class:`Executor` class. :class:`concurrent.futures.Future` must not be confused with :class:`asyncio.Future`, which is designed for use with :mod:`asyncio` - tasks and coroutines. See :ref:`asyncio-vs-concurrent-futures` for a + tasks and coroutines. See the :doc:`asyncio-future` documentation for a detailed comparison of the two. .. include:: ../includes/wasm-notavail.rst From 86829c589904d8cf848962975067b260d47e31c9 Mon Sep 17 00:00:00 2001 From: AN Long Date: Tue, 30 Dec 2025 21:10:42 +0900 Subject: [PATCH 3/4] Update important block to normal paragraph --- Doc/library/concurrent.futures.rst | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index 4bd7a3faa7b457..07074ee900bcac 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -21,12 +21,10 @@ or separate processes, using :class:`ProcessPoolExecutor`. Each implements the same interface, which is defined by the abstract :class:`Executor` class. -.. important:: - - :class:`concurrent.futures.Future` must not be confused with - :class:`asyncio.Future`, which is designed for use with :mod:`asyncio` - tasks and coroutines. See the :doc:`asyncio-future` documentation for a - detailed comparison of the two. +:class:`concurrent.futures.Future` must not be confused with +:class:`asyncio.Future`, which is designed for use with :mod:`asyncio` +tasks and coroutines. See the :doc:`asyncio-future` documentation for a +detailed comparison of the two. .. include:: ../includes/wasm-notavail.rst From 3cb86ee65dd07054ef4b3f9209fe2b76d65d4662 Mon Sep 17 00:00:00 2001 From: AN Long Date: Tue, 30 Dec 2025 21:50:02 +0900 Subject: [PATCH 4/4] Update Doc/library/concurrent.futures.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- Doc/library/concurrent.futures.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/concurrent.futures.rst b/Doc/library/concurrent.futures.rst index 07074ee900bcac..d379e984b84b9f 100644 --- a/Doc/library/concurrent.futures.rst +++ b/Doc/library/concurrent.futures.rst @@ -23,8 +23,8 @@ by the abstract :class:`Executor` class. :class:`concurrent.futures.Future` must not be confused with :class:`asyncio.Future`, which is designed for use with :mod:`asyncio` -tasks and coroutines. See the :doc:`asyncio-future` documentation for a -detailed comparison of the two. +tasks and coroutines. See the :doc:`asyncio's Future ` +documentation for a detailed comparison of the two. .. include:: ../includes/wasm-notavail.rst