diff --git a/sqlparse/lexer.py b/sqlparse/lexer.py index 5ada586..a053b08 100644 --- a/sqlparse/lexer.py +++ b/sqlparse/lexer.py @@ -16,7 +16,15 @@ from sqlparse import tokens from sqlparse.keywords import KEYWORDS, KEYWORDS_COMMON -from io import StringIO + +try: + # Python 3 + from io import BytesIO as StringIO +except (ImportError): + # Python 2 + from StringIO import StringIO + + import collections