Skip to content

Commit

Permalink
Re-enable cleanup_closed on cpython >= 3.11.4 (#93120)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed May 15, 2023
1 parent d8d4446 commit 72a6d3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homeassistant/helpers/aiohttp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@
APPLICATION_NAME, __version__, aiohttp.__version__, sys.version_info
)

ENABLE_CLEANUP_CLOSED = sys.version_info < (3, 11, 1)
ENABLE_CLEANUP_CLOSED = not (3, 11, 1) <= sys.version_info < (3, 11, 4)
# Enabling cleanup closed on python 3.11.1+ leaks memory relatively quickly
# see https://github.com/aio-libs/aiohttp/issues/7252
# aiohttp interacts poorly with https://github.com/python/cpython/pull/98540
# The issue was fixed in 3.11.4 via https://github.com/python/cpython/pull/104485

WARN_CLOSE_MSG = "closes the Home Assistant aiohttp session"

Expand Down

0 comments on commit 72a6d3a

Please sign in to comment.