From: Raul Tambre Date: Thu, 2 May 2019 17:23:56 +0000 (+0300) Subject: Fix use of 'is' operator for comparison X-Git-Tag: 2.11.0~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=888dc8d81a03db1fcd76adc4b2e23f9beec39b5d;p=thirdparty%2Fjinja.git Fix use of 'is' operator for comparison The 'is' operator is not meant to be used for comparisons. It currently working is an implementation detail of CPython. CPython 3.8 has added a SyntaxWarning for this. --- diff --git a/ext/inlinegettext.py b/ext/inlinegettext.py index cf4ed5e4..6ff10daf 100644 --- a/ext/inlinegettext.py +++ b/ext/inlinegettext.py @@ -32,7 +32,7 @@ class InlineGettext(Extension): paren_stack = 0 for token in stream: - if token.type is not 'data': + if token.type != 'data': yield token continue