mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-10-12 02:18:02 +00:00
Migrate http client to use aiohttp instead of httpx (#643)
This commit is contained in:
@@ -8,7 +8,7 @@ from .credentials import Credentials
|
||||
from .exceptions import SmartDeviceException
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from httpx import AsyncClient
|
||||
from aiohttp import ClientSession
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
@@ -151,7 +151,7 @@ class DeviceConfig:
|
||||
|
||||
# compare=False will be excluded from the serialization and object comparison.
|
||||
#: Set a custom http_client for the device to use.
|
||||
http_client: Optional["AsyncClient"] = field(default=None, compare=False)
|
||||
http_client: Optional["ClientSession"] = field(default=None, compare=False)
|
||||
|
||||
def __post_init__(self):
|
||||
if self.connection_type is None:
|
||||
|
Reference in New Issue
Block a user