From e57e1482a6c6e280065b929557f06fed2cd5624f Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 6 Aug 2011 15:52:50 -0400 Subject: [PATCH] sigh...*NOW* fix it for py3k so the next transformer doesn't squash it --- lib/sqlalchemy/util/langhelpers.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/sqlalchemy/util/langhelpers.py b/lib/sqlalchemy/util/langhelpers.py index 82f28f8ec1..11d4cdaf60 100644 --- a/lib/sqlalchemy/util/langhelpers.py +++ b/lib/sqlalchemy/util/langhelpers.py @@ -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 -- 2.47.3