From: Armin Ronacher Date: Tue, 3 Jan 2017 18:33:25 +0000 (+0100) Subject: Changelog and __rsub__ handling X-Git-Tag: 2.9~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebed13eb2b0995d015ddcaacca72fadc829b09e6;p=thirdparty%2Fjinja.git Changelog and __rsub__ handling --- diff --git a/CHANGES b/CHANGES index 776af694..2356fc95 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,8 @@ Version 2.9 - Support attribute fallback for old-style classes in 2.x. - Support toplevel set statements in extend situations. - Restored behavior of Cycler for Python 3 users. +- Subtraction now follows the same behavior as other operators on undefined + values. Version 2.8.2 ------------- diff --git a/jinja2/runtime.py b/jinja2/runtime.py index 876d69f3..28fde6db 100644 --- a/jinja2/runtime.py +++ b/jinja2/runtime.py @@ -508,7 +508,7 @@ class Undefined(object): __mod__ = __rmod__ = __pos__ = __neg__ = __call__ = \ __getitem__ = __lt__ = __le__ = __gt__ = __ge__ = __int__ = \ __float__ = __complex__ = __pow__ = __rpow__ = __sub__ = \ - _fail_with_undefined_error + __rsub__ = _fail_with_undefined_error def __eq__(self, other): return type(self) is type(other)