Fix issue with Callable, Union, and Python 3.9 [mqtt] (#83547)
parent
b2edf9b598
commit
25feac1bc4
|
@ -1,8 +1,11 @@
|
|||
"""Support for MQTT message handling."""
|
||||
# pylint: disable=deprecated-typing-alias
|
||||
# In Python 3.9.0 and 3.9.1 collections.abc.Callable
|
||||
# can't be used inside typing.Union or typing.Optional
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections.abc import Callable, Coroutine, Iterable
|
||||
from collections.abc import Coroutine, Iterable
|
||||
from functools import lru_cache, partial, wraps
|
||||
import inspect
|
||||
from itertools import groupby
|
||||
|
@ -10,7 +13,7 @@ import logging
|
|||
from operator import attrgetter
|
||||
import ssl
|
||||
import time
|
||||
from typing import TYPE_CHECKING, Any, Union, cast
|
||||
from typing import TYPE_CHECKING, Any, Callable, Union, cast
|
||||
import uuid
|
||||
|
||||
import attr
|
||||
|
|
Loading…
Reference in New Issue