Wrap invocation of dict.items() in list(). (#91)
Some infrastructure parses bzl files as python, which fails when
dict.items() returns a special dict_items generator instead of a list in
python3.
diff --git a/lib/collections.bzl b/lib/collections.bzl
index de612ff..f41eea2 100644
--- a/lib/collections.bzl
+++ b/lib/collections.bzl
@@ -60,7 +60,10 @@
A new list with all unique elements from `iterable`.
"""
unique_elements = {element: None for element in iterable}
- return unique_elements.keys()
+
+ # list() used here for python3 compatibility.
+ # TODO(bazel-team): Remove when testing frameworks no longer require python compatibility.
+ return list(unique_elements.keys())
collections = struct(
after_each = _after_each,