mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-30144: Import collections ABC from collections.abc rather than collections. (#1263)
This commit is contained in:
parent
9eb5ca0774
commit
2e576f5aec
22 changed files with 90 additions and 85 deletions
|
@ -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]=='%':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue