diff --git a/0001-Fix-compatibility-with-Python-3.10.patch b/0001-Fix-compatibility-with-Python-3.10.patch new file mode 100644 index 0000000..6c47bc7 --- /dev/null +++ b/0001-Fix-compatibility-with-Python-3.10.patch @@ -0,0 +1,31 @@ +From 5ae6ba625b5262780f3d4fea3da363af7a0b01cb Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Fri, 10 Sep 2021 10:12:23 +0200 +Subject: [PATCH] Fix compatibility with Python 3.10 + +Python 3.10 removed aliases to Collections Abstract Base Classes that +were deprecated in Python 3.3. + +Fix this by just using collections.abc directly without using the alias. + +https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-0-alpha-5 +--- + src/orca/generator.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/orca/generator.py b/src/orca/generator.py +index e98970992..e9a9d89de 100644 +--- a/src/orca/generator.py ++++ b/src/orca/generator.py +@@ -78,7 +78,7 @@ class Generator: + self._activeProgressBars = {} + self._methodsDict = {} + for method in \ +- [z for z in [getattr(self, y).__get__(self, self.__class__) for y in [x for x in dir(self) if x.startswith(METHOD_PREFIX)]] if isinstance(z, collections.Callable)]: ++ [z for z in [getattr(self, y).__get__(self, self.__class__) for y in [x for x in dir(self) if x.startswith(METHOD_PREFIX)]] if isinstance(z, collections.abc.Callable)]: + name = method.__name__[len(METHOD_PREFIX):] + name = name[0].lower() + name[1:] + self._methodsDict[name] = method +-- +2.31.1 + diff --git a/orca.spec b/orca.spec index 720a3e2..f9c3bbb 100644 --- a/orca.spec +++ b/orca.spec @@ -2,13 +2,16 @@ Name: orca Version: 41~rc -Release: 1%{?dist} +Release: 2%{?dist} Summary: Assistive technology for people with visual impairments License: LGPLv2+ URL: https://wiki.gnome.org/Projects/Orca Source0: https://download.gnome.org/sources/%{name}/41/%{name}-%{tarball_version}.tar.xz +# Backported from https://gitlab.gnome.org/GNOME/orca/-/merge_requests/118 +Patch0: 0001-Fix-compatibility-with-Python-3.10.patch + BuildArch: noarch BuildRequires: pkgconfig(atk-bridge-2.0) @@ -76,6 +79,9 @@ desktop-file-validate %{buildroot}%{_sysconfdir}/xdg/autostart/orca-autostart.de %changelog +* Fri Sep 10 2021 Kalev Lember - 41~rc-2 +- Fix compatibility with Python 3.10 (#1973397) + * Wed Sep 08 2021 Kalev Lember - 41~rc-1 - Update to 41.rc