From: Menno Smits Date: Mon, 21 May 2012 21:41:19 +0000 (+0100) Subject: Take care of Python 2/3 xrange/range difference X-Git-Tag: 0.10~2^2~21^2~38 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=6afdad916f5b7212a4d340a19300d917b799eb1e;p=imapclient.git Take care of Python 2/3 xrange/range difference --- diff --git a/imapclient/imapclient.py b/imapclient/imapclient.py index be35cc7..0966469 100644 --- a/imapclient/imapclient.py +++ b/imapclient/imapclient.py @@ -19,6 +19,8 @@ except ImportError: from . import imap_utf7 from .fixed_offset import FixedOffset +from .six import moves +xrange = moves.xrange __all__ = ['IMAPClient', 'DELETED', 'SEEN', 'ANSWERED', 'FLAGGED', 'DRAFT', 'RECENT'] diff --git a/imapclient/response_parser.py b/imapclient/response_parser.py index 07eafc1..9b841a9 100644 --- a/imapclient/response_parser.py +++ b/imapclient/response_parser.py @@ -6,7 +6,7 @@ Parsing for IMAP command responses with focus on FETCH responses as returned by imaplib. -Intially inspired by http://effbot.org/zone/simple-iterator-parser.htm +Initially inspired by http://effbot.org/zone/simple-iterator-parser.htm """ #TODO more exact error reporting @@ -14,7 +14,8 @@ Intially inspired by http://effbot.org/zone/simple-iterator-parser.htm import sys from datetime import datetime -from .six import advance_iterator +from .six import advance_iterator, moves +xrange = moves.xrange from .fixed_offset import FixedOffset from .response_lexer import TokenSource