From b100071f1f27690ecf357caa64509f1c7a1b4ab7 Mon Sep 17 00:00:00 2001 From: Steven Winfield Date: Fri, 22 Mar 2019 16:20:00 +0000 Subject: [PATCH] Fix DeprecationWarning in Python 3.7 --- quamash/_unix.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/quamash/_unix.py b/quamash/_unix.py index 0e7137e..bd4db66 100644 --- a/quamash/_unix.py +++ b/quamash/_unix.py @@ -6,7 +6,10 @@ import asyncio import selectors -import collections +try: + from collections.abc import Mapping +except ImportError: + from collections 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."""