fix MutableMapping import for py 3.8 compatibility
parent
609935efac
commit
da633cb705
|
@ -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.
|
||||
"""
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue