From 07510967722a9064ce4885582076ec9c2b8dfbc7 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Thu, 20 Aug 2015 17:58:30 -0500
Subject: [PATCH] Fix, test Python 2.6

---
 .gitlab-ci.yml      | 12 ++++++++++++
 loopy/statistics.py |  5 +++--
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f79c22be5..fb90b5129 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,6 +10,18 @@ Python 2.7 AMD CPU:
   - amd-cl-cpu
   except:
   - tags
+Python 2.6 AMD CPU:
+  script:
+  - export PY_EXE=python2.6
+  - export PYOPENCL_TEST=amd:pu
+  - export EXTRA_INSTALL="numpy mako"
+  - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh
+  - ". ./build-and-test-py-project.sh"
+  tags:
+  - python2.6
+  - amd-cl-cpu
+  except:
+  - tags
 Python 3.4 AMD CPU:
   script:
   - export PY_EXE=python3.4
diff --git a/loopy/statistics.py b/loopy/statistics.py
index 7281cd2b2..76345f097 100755
--- a/loopy/statistics.py
+++ b/loopy/statistics.py
@@ -60,8 +60,9 @@ class ToCountMap:
 
     def __mul__(self, other):
         if isinstance(other, isl.PwQPolynomial):
-            return ToCountMap({index: self.dict[index]*other
-                                     for index in self.dict.keys()})
+            return ToCountMap(dict(
+                (index, self.dict[index]*other)
+                for index in self.dict.keys()))
         else:
             raise ValueError("ToCountMap: Attempted to multiply "
                                 "ToCountMap by {} {}."
-- 
GitLab