fix MutableMapping import for py 3.8 compatibility

master
Thomas Waldmann 2020-10-31 23:34:06 +01:00
parent 609935efac
commit da633cb705
2 changed files with 5 additions and 2 deletions

View File

@ -1,9 +1,10 @@
import collections
import os
import pickle
import logging
import tempfile
from ...utils._compat import MutableMapping
logger = logging.getLogger(__name__)
@ -122,7 +123,7 @@ class Data(object):
return self._file.write(data)
class Meta(collections.MutableMapping):
class Meta(MutableMapping):
"""
Meta-data of item.
"""

View File

@ -14,9 +14,11 @@ if PY2:
range_type = xrange # noqa: F821
bytes_type = str
iteritems = lambda d: d.iteritems() # noqa: E731
from collections import MutableMapping # noqa: F401
else:
from urllib.parse import urlparse, urljoin
range_type = range
bytes_type = bytes
iteritems = lambda d: iter(d.items()) # noqa: E731
from collections.abc import MutableMapping # noqa: F401