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

@ -9,7 +9,7 @@ operator.repeat(obj, n) -> operator.mul(obj, n)
operator.irepeat(obj, n) -> operator.imul(obj, n)
"""
import collections
import collections.abc
# Local imports
from lib2to3 import fixer_base
@ -88,7 +88,7 @@ class FixOperator(fixer_base.BaseFix):
def _check_method(self, node, results):
method = getattr(self, "_" + results["method"][0].value)
if isinstance(method, collections.Callable):
if isinstance(method, collections.abc.Callable):
if "module" in results:
return method
else: