Replace deprecated import of ABCs from collections

ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.

Closes-Bug: #1936667
Change-Id: Ie660b2e4c7dac05822e13b47335620815a7ad1cf
This commit is contained in:
Takashi Kajinami 2021-07-17 00:37:34 +09:00
parent 3a05fab126
commit 6354f6182a
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import collections
from collections import abc
import email.utils
import re
import time
@ -884,7 +884,7 @@ class RestClient(object):
resp=resp)
def is_absolute_limit(self, resp, resp_body):
if (not isinstance(resp_body, collections.Mapping) or
if (not isinstance(resp_body, abc.Mapping) or
'retry-after' not in resp):
return True
return 'exceed' in resp_body.get('message', 'blabla')