Fix some imports for py310
Between this and the (unreleased) pyeclib fix, I see unit and func tests passing on py310. Haven't tried probe tests, yet. Change-Id: Iacf66eda75fed6bf96900107250f393227c57ae5
This commit is contained in:
parent
092d409c4b
commit
1eaf7474fe
@ -14,7 +14,10 @@
|
||||
# limitations under the License.
|
||||
|
||||
import re
|
||||
from collections import MutableMapping
|
||||
try:
|
||||
from collections.abc import MutableMapping
|
||||
except ImportError:
|
||||
from collections import MutableMapping # py2
|
||||
from functools import partial
|
||||
|
||||
from swift.common import header_key_dict
|
||||
|
@ -35,7 +35,11 @@ place to keep Swift working every time webob decides some interface
|
||||
needs to change.
|
||||
"""
|
||||
|
||||
from collections import defaultdict, MutableMapping
|
||||
from collections import defaultdict
|
||||
try:
|
||||
from collections.abc import MutableMapping
|
||||
except ImportError:
|
||||
from collections import MutableMapping # py2
|
||||
import time
|
||||
from functools import partial
|
||||
from datetime import datetime
|
||||
|
@ -22,7 +22,11 @@ import logging
|
||||
import logging.handlers
|
||||
import sys
|
||||
from contextlib import contextmanager, closing
|
||||
from collections import defaultdict, Iterable
|
||||
from collections import defaultdict
|
||||
try:
|
||||
from collections.abc import Iterable
|
||||
except ImportError:
|
||||
from collections import Iterable # py2
|
||||
import itertools
|
||||
from numbers import Number
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
Loading…
Reference in New Issue
Block a user