]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
sigh...*NOW* fix it for py3k so the next transformer doesn't squash it
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 6 Aug 2011 19:52:50 +0000 (15:52 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 6 Aug 2011 19:52:50 +0000 (15:52 -0400)
lib/sqlalchemy/util/langhelpers.py

index 82f28f8ec152d376e190212403958736a0d88d8a..11d4cdaf60b500ffcf501ece62265cfff851f3a4 100644 (file)
@@ -616,14 +616,15 @@ def counter():
     lock = threading.Lock()
     counter = itertools.count(1L)
 
-    def next():
+    # avoid the 2to3 "next" transformation...
+    def _next():
         lock.acquire()
         try:
             return counter.next()
         finally:
             lock.release()
 
-    return next
+    return _next
 
 def duck_type_collection(specimen, default=None):
     """Given an instance or class, guess if it is or is acting as one of