From bc7cf8a7ecb4f916009334b98c7bd1dc1903a9af Mon Sep 17 00:00:00 2001 From: Timo Reymann Date: Mon, 2 Dec 2024 17:08:50 +0100 Subject: [PATCH] chore: Remove enable_cleanup_closed parameter for aiohttp No longer required due to https://github.com/python/cpython/pull/118960 --- tests/test_api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_api.py b/tests/test_api.py index 5411008..a5fc6b2 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -3,6 +3,7 @@ import platform import socket import ssl +import sys import tempfile from dataclasses import dataclass from operator import attrgetter @@ -301,7 +302,7 @@ async def test_sslcontext_api_success_async(host): ctx = truststore.SSLContext(ssl.PROTOCOL_TLS_CLIENT) # connector avoids https://github.com/aio-libs/aiohttp/issues/5426 async with aiohttp.ClientSession( - connector=aiohttp.TCPConnector(force_close=True, enable_cleanup_closed=True) + connector=aiohttp.TCPConnector(force_close=True) ) as http: resp = await http.request("GET", f"https://{host}", ssl=ctx) @@ -330,7 +331,7 @@ async def test_sslcontext_api_failures_async(failure): ctx.verify_flags |= ssl.VERIFY_CRL_CHECK_CHAIN # connector avoids https://github.com/aio-libs/aiohttp/issues/5426 async with aiohttp.ClientSession( - connector=aiohttp.TCPConnector(force_close=True, enable_cleanup_closed=True) + connector=aiohttp.TCPConnector(force_close=True) ) as http: with pytest.raises( aiohttp.client_exceptions.ClientConnectorCertificateError