From abe67f696ad9f838583bc42a5ac6b2cd475aa09b Mon Sep 17 00:00:00 2001 From: Stephen Mackenzie Date: Mon, 9 Sep 2019 14:22:44 -0400 Subject: [PATCH] address py3.8 deprecation of collections direct ABC access --- src/rez/util.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rez/util.py b/src/rez/util.py index bdb50336f..c2126492a 100644 --- a/src/rez/util.py +++ b/src/rez/util.py @@ -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) )