Disable cleanup_closed on python 3.12.7+ and 3.13.1+ (#129645)

This commit is contained in:
J. Nick Koston 2024-11-02 22:15:56 -05:00 committed by GitHub
parent 5cf13d9273
commit dfbb763031
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -44,11 +44,13 @@ SERVER_SOFTWARE = (
f"aiohttp/{aiohttp.__version__} Python/{sys.version_info[0]}.{sys.version_info[1]}" f"aiohttp/{aiohttp.__version__} Python/{sys.version_info[0]}.{sys.version_info[1]}"
) )
ENABLE_CLEANUP_CLOSED = not (3, 11, 1) <= sys.version_info < (3, 11, 4) ENABLE_CLEANUP_CLOSED = (3, 13, 0) <= sys.version_info < (
# Enabling cleanup closed on python 3.11.1+ leaks memory relatively quickly 3,
# see https://github.com/aio-libs/aiohttp/issues/7252 13,
# aiohttp interacts poorly with https://github.com/python/cpython/pull/98540 1,
# The issue was fixed in 3.11.4 via https://github.com/python/cpython/pull/104485 ) or sys.version_info < (3, 12, 7)
# 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
WARN_CLOSE_MSG = "closes the Home Assistant aiohttp session" WARN_CLOSE_MSG = "closes the Home Assistant aiohttp session"