summaryrefslogtreecommitdiff
path: root/kvmd/aiogp.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2021-12-23 20:56:16 +0300
committerMaxim Devaev <[email protected]>2021-12-23 20:56:16 +0300
commit1e98d9bd5d63270e17d2b8cddd5820114c355aed (patch)
treee2fec1979c4a22800a49deaad5188eb87b77f00f /kvmd/aiogp.py
parentaef7a5a094853972cbe1ce9127ad1a546ea7f2ab (diff)
python 3.10
Diffstat (limited to 'kvmd/aiogp.py')
-rw-r--r--kvmd/aiogp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/kvmd/aiogp.py b/kvmd/aiogp.py
index 6c9d6814..1eeae28a 100644
--- a/kvmd/aiogp.py
+++ b/kvmd/aiogp.py
@@ -20,6 +20,7 @@
# ========================================================================== #
+import sys
import asyncio
import threading
import dataclasses
@@ -146,7 +147,8 @@ class _DebouncedValue:
self.__notifier = notifier
self.__loop = loop
- self.__queue: "asyncio.Queue[bool]" = asyncio.Queue(loop=loop)
+ queue_kwargs = ({"loop": loop} if sys.version_info < (3, 10) else {})
+ self.__queue: "asyncio.Queue[bool]" = asyncio.Queue(**queue_kwargs) # type: ignore
self.__task = loop.create_task(self.__consumer_task_loop())
def set(self, value: bool) -> None: