diff --git a/generic_utils.py b/generic_utils.py index 7977681f..8bc502ef 100644 --- a/generic_utils.py +++ b/generic_utils.py @@ -35,6 +35,11 @@ import functools import sys +try: + collectionsAbc = collections.abc +except AttributeError: + collectionsAbc = collections + ################################################################ # # Debug @@ -79,7 +84,7 @@ def memoizer(*args, **kwargs): # ################################################################ -class OrderedSet(collections.MutableSet): +class OrderedSet(collectionsAbc.MutableSet): """ A set implementations that retains insertion order. From the receipe http://code.activestate.com/recipes/576694/