From 4a51c4ba30b886b5d1505e4aed790df0cc7cd8d2 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Wed, 21 Jan 2026 16:25:16 +0100 Subject: [PATCH] NEEDS_CLEANUP_CLOSED fixed in Python 3.12.8 (#11972) --- CHANGES/11972.bugfix.rst | 2 ++ CONTRIBUTORS.txt | 1 + aiohttp/connector.py | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 CHANGES/11972.bugfix.rst diff --git a/CHANGES/11972.bugfix.rst b/CHANGES/11972.bugfix.rst new file mode 100644 index 00000000000..8a6c2f56f28 --- /dev/null +++ b/CHANGES/11972.bugfix.rst @@ -0,0 +1,2 @@ +Fixed false-positive :py:class:`DeprecationWarning` for passing ``enable_cleanup_closed=True`` to :py:class:`~aiohttp.TCPConnector` specifically on Python 3.12.7. +-- by :user:`Robsdedude`. diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 16889761889..0c2db273d92 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -322,6 +322,7 @@ Roman Markeloff Roman Podoliaka Roman Postnov Rong Zhang +Rouven Bauer Samir Akarioh Samuel Colvin Samuel Gaist diff --git a/aiohttp/connector.py b/aiohttp/connector.py index 2cdc425d83f..0a4f79c0154 100644 --- a/aiohttp/connector.py +++ b/aiohttp/connector.py @@ -75,9 +75,9 @@ 3, 13, 1, -) or sys.version_info < (3, 12, 7) +) or sys.version_info < (3, 12, 8) # Cleanup closed is no longer needed after https://github.com/python/cpython/pull/118960 -# which first appeared in Python 3.12.7 and 3.13.1 +# which first appeared in Python 3.12.8 and 3.13.1 __all__ = (