diff --git a/lib/third_party/dns/namedict.py b/lib/third_party/dns/namedict.py --- a/lib/third_party/dns/namedict.py 1980-01-01 01:00:00.000000000 -0700 +++ b/lib/third_party/dns/namedict.py 2022-02-03 18:13:23.113987963 -0700 @@ -32,7 +32,14 @@ from ._compat import xrange -class NameDict(collections.MutableMapping): +try: + # Python 3.3 and above. + collections_abc = collections.abc +except AttributeError: + collections_abc = collections + + +class NameDict(collections_abc.MutableMapping): """A dictionary whose keys are dns.name.Name objects. In addition to being like a regular Python dictionary, this diff --git a/lib/third_party/functools32/functools32.py b/lib/third_party/functools32/functools32.py --- a/lib/third_party/functools32/functools32.py 1980-01-01 01:00:00.000000000 -0700 +++ b/lib/third_party/functools32/functools32.py 2022-02-03 18:13:23.113987963 -0700 @@ -12,7 +12,7 @@ 'total_ordering', 'cmp_to_key', 'lru_cache', 'reduce', 'partial'] from _functools import partial, reduce -from collections import MutableMapping, namedtuple +from collections import namedtuple from .reprlib32 import recursive_repr as _recursive_repr from weakref import proxy as _proxy import sys as _sys @@ -21,6 +21,11 @@ except ImportError: from ._dummy_thread32 import allocate_lock as Lock +try: + from collections.abc import MutableMapping +except ImportError: + from collections import MutableMapping + ################################################################################ ### OrderedDict ################################################################################ diff --git a/lib/third_party/ml_sdk/cloud/ml/prediction/prediction_utils.py b/lib/third_party/ml_sdk/cloud/ml/prediction/prediction_utils.py --- a/lib/third_party/ml_sdk/cloud/ml/prediction/prediction_utils.py 1980-01-01 01:00:00.000000000 -0700 +++ b/lib/third_party/ml_sdk/cloud/ml/prediction/prediction_utils.py 2022-02-03 18:13:23.113987963 -0700 @@ -28,6 +28,13 @@ from tensorflow.python.framework import dtypes # pylint: disable=g-direct-tensorflow-import +try: + # Python 3.3 and above. + collections_abc = collections.abc +except AttributeError: + collections_abc = collections + + # -------------------------- # prediction.common # -------------------------- @@ -580,7 +587,7 @@ Raises: ValueError if response_json is malformed. """ - if not isinstance(response_json, collections.Mapping): + if not isinstance(response_json, collections_abc.Mapping): raise ValueError( "Invalid response received from prediction server: {}".format( repr(response_json))) @@ -603,7 +610,7 @@ Raises: ValueError if response_json is malformed. """ - if not isinstance(response_json, collections.Mapping): + if not isinstance(response_json, collections_abc.Mapping): raise ValueError( "Invalid response received from prediction server: {}".format( repr(response_json))) @@ -626,7 +633,7 @@ Raises: ValueError if request_json is malformed. """ - if not isinstance(request_json, collections.Mapping): + if not isinstance(request_json, collections_abc.Mapping): raise ValueError("Invalid request sent to prediction server: {}".format( repr(request_json))) if INSTANCES_KEY not in request_json: diff --git a/platform/gsutil/gslib/vendored/boto/boto/dynamodb/types.py b/platform/gsutil/gslib/vendored/boto/boto/dynamodb/types.py --- a/platform/gsutil/gslib/vendored/boto/boto/dynamodb/types.py 1980-01-01 01:00:00.000000000 -0700 +++ b/platform/gsutil/gslib/vendored/boto/boto/dynamodb/types.py 2022-02-03 18:13:23.113987963 -0700 @@ -27,11 +27,17 @@ import base64 from decimal import (Decimal, DecimalException, Context, Clamped, Overflow, Inexact, Underflow, Rounded) -from collections import Mapping from boto.dynamodb.exceptions import DynamoDBNumberError from boto.compat import filter, map, six, long_type + +try: + from collections.abc import Mapping +except ImportError: + from collections import Mapping + + DYNAMODB_CONTEXT = Context( Emin=-128, Emax=126, rounding=None, prec=38, traps=[Clamped, Overflow, Inexact, Rounded, Underflow]) diff --git a/platform/gsutil/gslib/vendored/boto/boto/mws/connection.py b/platform/gsutil/gslib/vendored/boto/boto/mws/connection.py --- a/platform/gsutil/gslib/vendored/boto/boto/mws/connection.py 1980-01-01 01:00:00.000000000 -0700 +++ b/platform/gsutil/gslib/vendored/boto/boto/mws/connection.py 2022-02-03 18:13:23.113987963 -0700 @@ -29,6 +29,13 @@ from boto.handler import XmlHandler from boto.compat import filter, map, six, encodebytes +try: + # Python 3.3 and above. + collections_abc = collections.abc +except AttributeError: + collections_abc = collections + + __all__ = ['MWSConnection'] api_version_path = { @@ -109,7 +116,7 @@ def destructure_object(value, into, prefix, members=False): if isinstance(value, boto.mws.response.ResponseElement): destructure_object(value.__dict__, into, prefix, members=members) - elif isinstance(value, collections.Mapping): + elif isinstance(value, collections_abc.Mapping): for name in value: if name.startswith('_'): continue diff --git a/platform/bundledpythonunix/lib/python3.8/site-packages/pip-21.1.3-py3.8.egg/pip/_vendor/distlib/compat.py b/platform/bundledpythonunix/lib/python3.8/site-packages/pip-21.1.3-py3.8.egg/pip/_vendor/distlib/compat.py index c316fd9..4191788 100644 --- a/platform/bundledpythonunix/lib/python3.8/site-packages/pip-21.1.3-py3.8.egg/pip/_vendor/distlib/compat.py +++ b/platform/bundledpythonunix/lib/python3.8/site-packages/pip-21.1.3-py3.8.egg/pip/_vendor/distlib/compat.py @@ -481,7 +481,10 @@ else: try: from collections import ChainMap except ImportError: # pragma: no cover - from collections import MutableMapping + if sys.version_info > (3, 3): + from collections.abc import MutableMapping + else: + from collections import MutableMapping try: from reprlib import recursive_repr as _recursive_repr