Skip to content

Commit

Permalink
chore: remove redundant asyncio import (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Jul 31, 2024
1 parent c8fecf6 commit d69d8e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/aiohappyeyeballs/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# https://github.com/aio-libs/aiohttp/issues/8556
# https://bugs.python.org/issue39129
# https://github.com/python/cpython/pull/17693
import asyncio
import asyncio.futures

asyncio.futures.TimeoutError = asyncio.TimeoutError # type: ignore[attr-defined]
Expand Down
8 changes: 8 additions & 0 deletions tests/test_impl.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio
import socket
import sys
from types import ModuleType
from typing import Tuple
from unittest import mock
Expand Down Expand Up @@ -1272,3 +1273,10 @@ async def _sock_connect(
("dead:aaaa::", 80, 0, 0),
("107.6.106.83", 80),
]


@pytest.mark.asyncio
@pytest.mark.skipif(sys.version_info >= (3, 8, 2), reason="requires < python 3.8.2")
def test_python_38_compat() -> None:
"""Verify python < 3.8.2 compatibility."""
assert asyncio.futures.TimeoutError is asyncio.TimeoutError # type: ignore[attr-defined]

0 comments on commit d69d8e0

Please sign in to comment.