From 768d01d7c5d64718f9286c0a4753c94f80c82818 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 31 Jan 2022 14:35:55 +1000 Subject: [PATCH] Import MutableMapping from collections.abc Python 3.3 and above moved the abstract base classes to their own module under collections, collections.abc. Import from that location, falling back if required for Python 3.2. Fixes #29 --- chest/core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chest/core.py b/chest/core.py index 0d9d696..2aa780b 100644 --- a/chest/core.py +++ b/chest/core.py @@ -1,4 +1,7 @@ -from collections import MutableMapping +try: + from collections.abc import MutableMapping +except ImportError: # pragma: no cover + from collections import MutableMapping # pragma: no cover from functools import partial from threading import Lock from contextlib import contextmanager