forked from M-Labs/artiq
gui: work around quamash bug with python 3.8
This commit is contained in:
parent
cf19c9512d
commit
5fd0d0bbb6
@ -5,6 +5,7 @@ import asyncio
|
|||||||
import atexit
|
import atexit
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
import sys
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
from quamash import QEventLoop
|
from quamash import QEventLoop
|
||||||
@ -143,6 +144,9 @@ def main():
|
|||||||
app = QtWidgets.QApplication(["ARTIQ Browser"])
|
app = QtWidgets.QApplication(["ARTIQ Browser"])
|
||||||
loop = QEventLoop(app)
|
loop = QEventLoop(app)
|
||||||
asyncio.set_event_loop(loop)
|
asyncio.set_event_loop(loop)
|
||||||
|
# https://github.com/harvimt/quamash/issues/123
|
||||||
|
if sys.version_info >= (3, 8):
|
||||||
|
asyncio.events._set_running_loop(loop)
|
||||||
atexit.register(loop.close)
|
atexit.register(loop.close)
|
||||||
|
|
||||||
datasets_sub = models.LocalModelManager(datasets.Model)
|
datasets_sub = models.LocalModelManager(datasets.Model)
|
||||||
|
@ -5,6 +5,7 @@ import asyncio
|
|||||||
import atexit
|
import atexit
|
||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
import sys
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
from quamash import QEventLoop
|
from quamash import QEventLoop
|
||||||
@ -104,6 +105,9 @@ def main():
|
|||||||
app = QtWidgets.QApplication(["ARTIQ Dashboard"])
|
app = QtWidgets.QApplication(["ARTIQ Dashboard"])
|
||||||
loop = QEventLoop(app)
|
loop = QEventLoop(app)
|
||||||
asyncio.set_event_loop(loop)
|
asyncio.set_event_loop(loop)
|
||||||
|
# https://github.com/harvimt/quamash/issues/123
|
||||||
|
if sys.version_info >= (3, 8):
|
||||||
|
asyncio.events._set_running_loop(loop)
|
||||||
atexit.register(loop.close)
|
atexit.register(loop.close)
|
||||||
smgr = state.StateManager(args.db_file)
|
smgr = state.StateManager(args.db_file)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user