[py3k] import zip using six.moves
authorRémi Cardona <remi.cardona@logilab.fr>
Tue, 15 Sep 2015 14:58:52 +0200
changeset 10606 718e78ef6699
parent 10605 61521bee2b68
child 10607 6519ae8cca0c
[py3k] import zip using six.moves
wsgi/handler.py
--- a/wsgi/handler.py	Tue Sep 22 15:36:32 2015 +0200
+++ b/wsgi/handler.py	Tue Sep 15 14:58:52 2015 +0200
@@ -19,7 +19,9 @@
 
 __docformat__ = "restructuredtext en"
 
-from itertools import chain, repeat, izip
+from itertools import chain, repeat
+
+from six.moves import zip
 
 from cubicweb import AuthenticationError
 from cubicweb.web import DirectResponse
@@ -78,7 +80,7 @@
     def __init__(self, code, req, body=None):
         text = STATUS_CODE_TEXT.get(code, 'UNKNOWN STATUS CODE')
         self.status =  '%s %s' % (code, text)
-        self.headers = list(chain(*[izip(repeat(k), v)
+        self.headers = list(chain(*[zip(repeat(k), v)
                                     for k, v in req.headers_out.getAllRawHeaders()]))
         self.headers = [(str(k), str(v)) for k, v in self.headers]
         if body: