Python 3.7 compatibility - async is a reserved word
Created by: jasontibbitts
I was working on updating the Fedora package (finally) and switching it over to python3 and ran into an issue:
async
is a reserved word in python 3.7. This means that the async function in ui/init.py causes various syntax errors:
File "/usr/lib/python3.7/site-packages/solaar/ui/__init__.py", line 78
def async(function, *args, **kwargs):
^
SyntaxError: invalid syntax
File "/usr/lib/python3.7/site-packages/solaar/ui/config_panel.py", line 26
from solaar.ui import async as _ui_async
^
SyntaxError: invalid syntax
File "/usr/lib/python3.7/site-packages/solaar/ui/window.py", line 34
from solaar.ui import async as _ui_async
^
SyntaxError: invalid syntax
It should be pretty easy to rename this "ui_async" or something like that, and then change the three imports. Conveniently they all import async as _ui_async so it's not even necessary to fix up anything else.