From 6afdad916f5b7212a4d340a19300d917b799eb1e Mon Sep 17 00:00:00 2001 From: Menno Smits Date: Mon, 21 May 2012 22:41:19 +0100 Subject: [PATCH] Take care of Python 2/3 xrange/range difference --- imapclient/imapclient.py | 2 ++ imapclient/response_parser.py | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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 -- 2.43.0