[accerciser: 1/2] Python 3.7+ support, async is a keyword



commit 613ee939c3062c952bfaff432395f890d044e8d1
Author: Miro HronĨok <miro hroncok cz>
Date:   Thu Jun 28 19:20:17 2018 +0200

    Python 3.7+ support, async is a keyword
    
        File "accerciser/accerciser.py", line 106
          pyatspi.Registry.start(async=True, gil=False)
                                     ^
        SyntaxError: invalid syntax

 src/lib/accerciser/accerciser.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/lib/accerciser/accerciser.py b/src/lib/accerciser/accerciser.py
index fa6e5c7..065a7fe 100644
--- a/src/lib/accerciser/accerciser.py
+++ b/src/lib/accerciser/accerciser.py
@@ -103,7 +103,8 @@ class Main(Tools):
     '''
     GLib.timeout_add(200, self._pumpEvents)
     try:
-      pyatspi.Registry.start(async=True, gil=False)
+      # async is a reserved keyword in Python 3.7+, so we pass the args as dict
+      pyatspi.Registry.start(**{'async': True, 'gil': False})
     except KeyboardInterrupt:
       self._shutDown()
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]