Skip to content

fix(aiohttp): remove support for older versions of aiohttp #763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 36 additions & 16 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
# ppc64le and s390x have limitations with some supported libraries.
machine, py_version = get_runtime_env_info()
if machine in ["ppc64le", "s390x"]:
collect_ignore_glob.extend([
"*test_google-cloud*",
"*test_pymongo*",
])
collect_ignore_glob.extend(
[
"*test_google-cloud*",
"*test_pymongo*",
]
)

if machine == "ppc64le":
collect_ignore_glob.append("*test_grpcio*")
Expand All @@ -51,28 +53,44 @@
collect_ignore_glob.append("*test_couchbase*")

if not os.environ.get("GEVENT_STARLETTE_TEST"):
collect_ignore_glob.extend([
"*test_gevent*",
"*test_starlette*",
])
collect_ignore_glob.extend(
[
"*test_gevent*",
"*test_starlette*",
]
)

if not os.environ.get("KAFKA_TEST"):
collect_ignore_glob.append("*kafka/test*")

# Currently asyncio and tornado_server depends on aiohttp and
# since aiohttp versions < 3.12.14 have vulnerability we skip the tests below
if sys.version_info < (3, 9):
collect_ignore_glob.extend(
[
"*test_aiohttp*",
"*test_asyncio*",
"*test_tornado_server*",
]
)

if sys.version_info >= (3, 12):
# Currently Spyne does not support python > 3.12
collect_ignore_glob.append("*test_spyne*")


if sys.version_info >= (3, 14):
collect_ignore_glob.extend([
# Currently not installable dependencies because of 3.14 incompatibilities
"*test_fastapi*",
# aiohttp-server tests failing due to deprecated methods used
"*test_aiohttp_server*",
# Currently Sanic does not support python >= 3.14
"*test_sanic*",
])
collect_ignore_glob.extend(
[
# Currently not installable dependencies because of 3.14 incompatibilities
"*test_fastapi*",
# aiohttp-server tests failing due to deprecated methods used
"*test_aiohttp_server*",
# Currently Sanic does not support python >= 3.14
"*test_sanic*",
]
)


@pytest.fixture(scope="session")
def celery_config():
Expand Down Expand Up @@ -253,10 +271,12 @@ def announce(monkeypatch, request) -> None:
else:
monkeypatch.setattr(HostAgent, "announce", always_true)


# Mocking the import of uwsgi
def _uwsgi_masterpid() -> int:
return 12345


module = type(sys)("uwsgi")
module.opt = {
"master": True,
Expand Down
3 changes: 1 addition & 2 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
-r requirements-minimal.txt
aioamqp>=0.15.0
aiofiles>=0.5.0
aiohttp<=3.10.11; python_version <= "3.8"
aiohttp>=3.8.3; python_version > "3.8"
aiohttp>=3.12.14; python_version >= "3.9"
aio-pika>=9.5.2
boto3>=1.17.74
bottle>=0.12.25
Expand Down
Loading