Skip to content

Commit

Permalink
Import ABCs from collections.abc
Browse files Browse the repository at this point in the history
Import directly from collections is deprecated and will stop working
with Python 3.9.

Fixes #253.
  • Loading branch information
jgosmann committed Jun 15, 2020
1 parent 5932c59 commit 0af3c74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nengo_spa/typechecks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import collections
from collections.abc import Iterable

import numpy as np

Expand Down Expand Up @@ -27,7 +27,7 @@ def is_iterable(obj):
if isinstance(obj, np.ndarray):
return obj.ndim > 0
else:
return isinstance(obj, collections.Iterable)
return isinstance(obj, Iterable)


def is_number(obj):
Expand Down

0 comments on commit 0af3c74

Please sign in to comment.