1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
Origin: upstream, https://github.com/harvimt/quamash/commit/1e9047bec739dbc9d6ab337fc1a111a8b1090244
From: rr- <dash@wind.garden>
Date: Mon, 20 Dec 2021 18:44:49 +0100
Subject: Add compatibility with Python 3.10
---
quamash/_unix.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/quamash/_unix.py b/quamash/_unix.py
index 0e7137e..97b58d9 100644
--- a/quamash/_unix.py
+++ b/quamash/_unix.py
@@ -6,7 +6,10 @@
import asyncio
import selectors
-import collections
+try:
+ from collections import Mapping
+except ImportError:
+ from collections.abc import Mapping
from . import QtCore, with_logger
@@ -41,7 +44,7 @@ def _fileobj_to_fd(fileobj):
return fd
-class _SelectorMapping(collections.Mapping):
+class _SelectorMapping(Mapping):
"""Mapping of file objects to selector keys."""
|