bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263)

This commit is contained in:
Serhiy Storchaka 2017-04-24 09:05:00 +03:00 committed by GitHub
parent 9eb5ca0774
commit 2e576f5aec
22 changed files with 90 additions and 85 deletions

View file

@ -14,7 +14,7 @@ import sys
import encodings
import encodings.aliases
import re
import collections
import collections.abc
from builtins import str as _builtin_str
import functools
import warnings
@ -215,7 +215,7 @@ def format_string(f, val, grouping=False, monetary=False):
percents = list(_percent_re.finditer(f))
new_f = _percent_re.sub('%s', f)
if isinstance(val, collections.Mapping):
if isinstance(val, collections.abc.Mapping):
new_val = []
for perc in percents:
if perc.group()[-1]=='%':