File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 14
14
import errno
15
15
import logging
16
16
import struct
17
- import sys
18
17
from pprint import pformat as pf
19
18
from typing import Dict , Generator , Optional , Union
20
19
20
+ # When support for cpython older than 3.12 is dropped
21
+ # async_timeout can be replaced with asyncio.timeout
22
+ from async_timeout import timeout as asyncio_timeout
23
+
21
24
from .exceptions import SmartDeviceException
22
25
from .json import dumps as json_dumps
23
26
from .json import loads as json_loads
24
27
25
- if sys .version_info [:2 ] < (3 , 11 ):
26
- from async_timeout import timeout as asyncio_timeout
27
- else :
28
- from asyncio import timeout as asyncio_timeout
29
-
30
-
31
28
_LOGGER = logging .getLogger (__name__ )
32
29
_NO_RETRY_ERRORS = {errno .EHOSTDOWN , errno .EHOSTUNREACH , errno .ECONNREFUSED }
33
30
You can’t perform that action at this time.
0 commit comments