[orca/gnome-40] Fix compatibility with Python 3.10
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca/gnome-40] Fix compatibility with Python 3.10
- Date: Mon, 10 Jan 2022 17:11:47 +0000 (UTC)
commit 4cff4f85bafe74a3c16f699e49722f9cd274b09a
Author: Kalev Lember <klember redhat com>
Date: Fri Sep 10 10:12:23 2021 +0200
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 ea9cc74f4..b1a1974de 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]