Skip to content

Commit c6cee83

Browse files
Don't depend on async-timeout for Python 3.11+.
This library was upstreamed into the standard library and is thus deprecated.
1 parent e354ae3 commit c6cee83

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

hole/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
import socket
55

66
import aiohttp
7-
import async_timeout
7+
import sys
8+
if sys.version_info >= (3, 11):
9+
import asyncio as async_timeout
10+
else:
11+
import async_timeout
812

913
from . import exceptions
1014

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
license="MIT",
2222
install_requires=[
2323
"aiohttp<4",
24-
"async_timeout>4,<5",
24+
"async_timeout; python_version < \"3.11\"",
2525
],
2626
packages=["hole"],
2727
python_requires=">=3.9",

0 commit comments

Comments
 (0)