Python 3.7 compatibility fixes
This fixes the python 3.7 incompatibilities arising from 'async' becoming a reserved word. The file lib/solaar/async.py is renamed to asks.py. I picked the name because it defines the TaskRunner class and it's the best I could come up in fifteen seconds. The async function in solar/ui/__init__.py is renamed to ui_async, and the various imports of that function are changed to match. Without this patch it doesn't build at all. I am running with this patch applied and everything appears to work as expected. Signed-off-by: Jason Tibbitts <tibbs@math.uh.edu>
This commit is contained in:
parent
5d0d353c74
commit
d021d87656
|
@ -75,7 +75,7 @@ def error_dialog(reason, object):
|
|||
#
|
||||
|
||||
_task_runner = None
|
||||
def async(function, *args, **kwargs):
|
||||
def ui_async(function, *args, **kwargs):
|
||||
if _task_runner:
|
||||
_task_runner(function, *args, **kwargs)
|
||||
|
||||
|
@ -90,7 +90,7 @@ def _startup(app, startup_hook):
|
|||
if _log.isEnabledFor(_DEBUG):
|
||||
_log.debug("startup registered=%s, remote=%s", app.get_is_registered(), app.get_is_remote())
|
||||
|
||||
from solaar.async import TaskRunner as _TaskRunner
|
||||
from solaar.tasks import TaskRunner as _TaskRunner
|
||||
global _task_runner
|
||||
_task_runner = _TaskRunner('AsyncUI')
|
||||
_task_runner.start()
|
||||
|
|
|
@ -23,7 +23,7 @@ from gi.repository import Gtk, GLib
|
|||
from threading import Timer as _Timer
|
||||
|
||||
from solaar.i18n import _
|
||||
from solaar.ui import async as _ui_async
|
||||
from solaar.ui import ui_async as _ui_async
|
||||
from logitech_receiver.settings import KIND as _SETTING_KIND
|
||||
|
||||
#
|
||||
|
|
|
@ -31,7 +31,7 @@ from solaar import NAME
|
|||
from solaar.i18n import _
|
||||
from gettext import ngettext
|
||||
# from solaar import __version__ as VERSION
|
||||
from solaar.ui import async as _ui_async
|
||||
from solaar.ui import ui_async as _ui_async
|
||||
from logitech_receiver import hidpp10 as _hidpp10
|
||||
from logitech_receiver.common import NamedInts as _NamedInts, NamedInt as _NamedInt
|
||||
from logitech_receiver.status import KEYS as _K
|
||||
|
|
Loading…
Reference in New Issue