gui: quamash -> qasync

This commit is contained in:
Sebastien Bourdeauducq 2020-12-12 21:50:11 +08:00
parent 1ce505c547
commit 4b10273a2d
6 changed files with 8 additions and 13 deletions

View File

@ -54,6 +54,7 @@ Breaking changes:
thin veneer around lists. Most prior use cases of NumPy arrays in kernels should work
unchanged with the new implementation, but the behavior might differ slightly in some
cases (for instance, non-rectangular arrays are not currently supported).
* ``quamash`` has been replaced with ``qasync``.
ARTIQ-5

View File

@ -4,7 +4,7 @@ import asyncio
import os
import string
from quamash import QEventLoop, QtWidgets, QtCore
from qasync import QEventLoop, QtWidgets, QtCore
from sipyco.sync_struct import Subscriber, process_mod
from sipyco import pyon
@ -114,7 +114,7 @@ class SimpleApplet:
self.datasets = {getattr(self.args, arg.replace("-", "_"))
for arg in self.dataset_args}
def quamash_init(self):
def qasync_init(self):
app = QtWidgets.QApplication([])
self.loop = QEventLoop(app)
asyncio.set_event_loop(self.loop)
@ -212,7 +212,7 @@ class SimpleApplet:
def run(self):
self.args_init()
self.quamash_init()
self.qasync_init()
try:
self.ipc_init()
try:

View File

@ -8,7 +8,7 @@ import logging
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from quamash import QEventLoop
from qasync import QEventLoop
from sipyco.asyncio_tools import atexit_register_coroutine
from sipyco import common_args
@ -144,9 +144,6 @@ def main():
app = QtWidgets.QApplication(["ARTIQ Browser"])
loop = QEventLoop(app)
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)
datasets_sub = models.LocalModelManager(datasets.Model)

View File

@ -8,7 +8,7 @@ import logging
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from quamash import QEventLoop
from qasync import QEventLoop
from sipyco.pc_rpc import AsyncioClient, Client
from sipyco.broadcast import Receiver
@ -104,9 +104,6 @@ def main():
app = QtWidgets.QApplication(["ARTIQ Dashboard"])
loop = QEventLoop(app)
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)
smgr = state.StateManager(args.db_file)

View File

@ -36,7 +36,7 @@ mock_modules = ["artiq.gui.waitingspinnerwidget",
"artiq.compiler.module",
"artiq.compiler.embedding",
"artiq.dashboard",
"quamash", "pyqtgraph", "matplotlib",
"qasync", "pyqtgraph", "matplotlib",
"numpy", "dateutil", "dateutil.parser", "prettytable", "PyQt5",
"h5py", "serial", "scipy", "scipy.interpolate",
"llvmlite_artiq", "Levenshtein", "pythonparser",

View File

@ -14,7 +14,7 @@ if sys.version_info[:3] < (3, 5, 3):
requirements = [
"numpy", "scipy",
"python-dateutil", "prettytable", "h5py",
"quamash", "pyqtgraph", "pygit2",
"qasync", "pyqtgraph", "pygit2",
"llvmlite_artiq", "pythonparser", "python-Levenshtein",
]