Skip to content

Commit

Permalink
Merge pull request #740 from maxnbk/maxnbk/feat-py3-3.8-collections-a…
Browse files Browse the repository at this point in the history
…bc-access

address py3.8 deprecation of collections direct ABC access
  • Loading branch information
nerdvegas authored Sep 10, 2019
2 parents 96073a7 + abe67f6 commit ef5fccc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/rez/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,13 @@ def _atexit():
def is_non_string_iterable(arg):
"""Python 2 and 3 compatible non-string iterable identifier"""

if six.PY2:
iterable_class = collections.Iterable
else:
iterable_class = collections.abc.Iterable

return (
isinstance(arg, collections.Iterable)
isinstance(arg, iterable_class)
and not isinstance(arg, six.string_types)
)

Expand Down

0 comments on commit ef5fccc

Please sign in to comment.