diff -r bf5f777260a6 -r 21b0534faebc eric6/ThirdParty/Pygments/pygments/lexers/special.py --- a/eric6/ThirdParty/Pygments/pygments/lexers/special.py Tue Apr 21 19:44:19 2020 +0200 +++ b/eric6/ThirdParty/Pygments/pygments/lexers/special.py Tue Apr 21 19:47:10 2020 +0200 @@ -5,15 +5,16 @@ Special lexers. - :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re +from io import BytesIO from pygments.lexer import Lexer from pygments.token import Token, Error, Text -from pygments.util import get_choice_opt, text_type, BytesIO +from pygments.util import get_choice_opt __all__ = ['TextLexer', 'RawTokenLexer'] @@ -35,6 +36,7 @@ def analyse_text(text): return TextLexer.priority + _ttype_cache = {} line_re = re.compile(b'.*?\n') @@ -63,7 +65,7 @@ Lexer.__init__(self, **options) def get_tokens(self, text): - if isinstance(text, text_type): + if isinstance(text, str): # raw token stream never has any non-ASCII characters text = text.encode('ascii') if self.compress == 'gz':