mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-24 14:35:45 +00:00
added python >= 3.10 compatibility
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
8323035af3
commit
1d42f2585e
@ -7,6 +7,7 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
from planetmint.ipc.events import EventTypes
|
from planetmint.ipc.events import EventTypes
|
||||||
@ -65,7 +66,10 @@ class Dispatcher:
|
|||||||
run_loop = asyncio.get_running_loop()
|
run_loop = asyncio.get_running_loop()
|
||||||
logging.debug(f"get loop: {get_loop}")
|
logging.debug(f"get loop: {get_loop}")
|
||||||
logging.debug(f"run loop: {run_loop}")
|
logging.debug(f"run loop: {run_loop}")
|
||||||
app[queue_name] = asyncio.Queue(loop=get_loop)
|
if( sys.version_info.major ==3 and sys.version_info.minor < 10 ):
|
||||||
|
app[queue_name] = asyncio.Queue(loop=get_loop)
|
||||||
|
elif( sys.version_info.major ==3 and sys.version_info.minor >= 10 ):
|
||||||
|
app[queue_name] = asyncio.Queue()
|
||||||
|
|
||||||
return app[queue_name]
|
return app[queue_name]
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user