pombreda / gevent

Automatically exported from code.google.com/p/gevent
0 stars 0 forks source link

fix building under 3.2 #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

Thanks for the great framework. Here is what I changed to build it under 3.2 
(besides 2to3). Hope it is useful.

--- a/util/cythonpp.py  Wed Apr 11 19:17:34 2012 +0400
+++ b/util/cythonpp.py  Thu Apr 12 13:54:17 2012 +0200
@@ -726,7 +726,7 @@
     n = len(pool)
     if r > n:
         return
-    indices = range(r)
+    indices = list(range(r))
     yield tuple(pool[i] for i in indices)
     while True:
         for i in reversed(range(r)):
@@ -743,7 +743,7 @@
 def product(*args, **kwds):
     # product('ABCD', 'xy') --> Ax Ay Bx By Cx Cy Dx Dy
     # product(range(2), repeat=3) --> 000 001 010 011 100 101 110 111
-    pools = map(tuple, args) * kwds.get('repeat', 1)
+    pools = tuple(map(tuple, args)) * kwds.get('repeat', 1)
     result = [[]]
     for pool in pools:
         result = [x+[y] for x in result for y in pool]

Original issue reported on code.google.com by reg...@messir.net on 12 Apr 2012 at 11:57

GoogleCodeExporter commented 9 years ago
Applied in https://bitbucket.org/denis/gevent/changeset/d658c390b7ed

Thanks!

Original comment by Denis.Bi...@gmail.com on 12 Apr 2012 at 10:21

GoogleCodeExporter commented 9 years ago
Migrated to http://github.com/SiteSupport/gevent/issues/123

Original comment by Denis.Bi...@gmail.com on 14 Sep 2012 at 10:52