From 60aff1a08a3b963f2bdc81149b2bb0b752f747db Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Jun 28 2018 17:26:35 +0000 Subject: Add patch for Python 3.7 compatibility --- diff --git a/0001-Python-3.7-support-async-is-a-keyword.patch b/0001-Python-3.7-support-async-is-a-keyword.patch new file mode 100644 index 0000000..d481d48 --- /dev/null +++ b/0001-Python-3.7-support-async-is-a-keyword.patch @@ -0,0 +1,30 @@ +From 613ee939c3062c952bfaff432395f890d044e8d1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= +Date: Thu, 28 Jun 2018 19:20:17 +0200 +Subject: [PATCH] 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() + +-- +2.17.0 + diff --git a/accerciser.spec b/accerciser.spec index 73e69f6..1ba2330 100644 --- a/accerciser.spec +++ b/accerciser.spec @@ -10,6 +10,9 @@ License: BSD URL: https://wiki.gnome.org/Apps/Accerciser Source0: https://download.gnome.org/sources/accerciser/%{release_version}/accerciser-%{version}.tar.xz +# https://gitlab.gnome.org/GNOME/accerciser/merge_requests/1 +Patch0: 0001-Python-3.7-support-async-is-a-keyword.patch + BuildArch: noarch BuildRequires: at-spi2-core-devel @@ -36,7 +39,7 @@ you can use to create custom views of accessibility information. %prep -%setup -q +%autosetup -p1 %build