Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

address py3.8 deprecation of collections direct ABC access #740

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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