summaryrefslogtreecommitdiff
path: root/doc/summarize.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/summarize.py')
-rwxr-xr-xdoc/summarize.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/summarize.py b/doc/summarize.py
index dbadb30b3..972e298f4 100755
--- a/doc/summarize.py
+++ b/doc/summarize.py
@@ -8,7 +8,12 @@ Show a summary about which NumPy functions are documented and which are not.
from __future__ import division, absolute_import, print_function
import os, glob, re, sys, inspect, optparse
-import collections
+try:
+ # Accessing collections abstact classes from collections
+ # has been deprecated since Python 3.3
+ import collections.abc as collections_abc
+except ImportError:
+ import collections as collections_abc
sys.path.append(os.path.join(os.path.dirname(__file__), 'sphinxext'))
from sphinxext.phantom_import import import_phantom_module
@@ -136,7 +141,7 @@ def get_undocumented(documented, module, module_name=None, skip=[]):
if full_name in skip: continue
if full_name.startswith('numpy.') and full_name[6:] in skip: continue
- if not (inspect.ismodule(obj) or isinstance(obj, collections.Callable) or inspect.isclass(obj)):
+ if not (inspect.ismodule(obj) or isinstance(obj, collections_abc.Callable) or inspect.isclass(obj)):
continue
if full_name not in documented: