Commit 35fe1909 authored by Stefan Behnel's avatar Stefan Behnel

Import "Iterable" ABC class from "collections.abc" in Py3 instead of...

Import "Iterable" ABC class from "collections.abc" in Py3 instead of deprecated "collections" package.
parent 68d0d575
......@@ -18,6 +18,11 @@ from distutils.extension import Extension
from distutils.util import strtobool
import zipfile
try:
from collections.abc import Iterable
except ImportError:
from collections import Iterable
try:
import gzip
gzip_open = gzip.open
......@@ -752,7 +757,7 @@ def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=
exclude = []
if patterns is None:
return [], {}
elif isinstance(patterns, basestring) or not isinstance(patterns, collections.Iterable):
elif isinstance(patterns, basestring) or not isinstance(patterns, Iterable):
patterns = [patterns]
explicit_modules = set([m.name for m in patterns if isinstance(m, Extension)])
seen = set()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment