From 2ccfac1a651ff35cd243cd272b2202ae1ccd5740 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 5 Sep 2015 12:20:05 -0400 Subject: Refs #23913 -- Removed support for a single equals sign in {% if %} tag. Per deprecation timeline. --- django/template/smartif.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'django') diff --git a/django/template/smartif.py b/django/template/smartif.py index 36c76cb5e6..906350897d 100644 --- a/django/template/smartif.py +++ b/django/template/smartif.py @@ -1,17 +1,13 @@ """ Parser and utilities for the smart 'if' tag """ -import warnings - -from django.utils.deprecation import RemovedInDjango110Warning - - # Using a simple top down parser, as described here: # http://effbot.org/zone/simple-top-down-parsing.htm. # 'led' = left denotation # 'nud' = null denotation # 'bp' = binding power (left = lbp, right = rbp) + class TokenBase(object): """ Base class for operators and literals, mainly for debugging and for throwing @@ -102,8 +98,6 @@ OPERATORS = { 'not': prefix(8, lambda context, x: not x.eval(context)), 'in': infix(9, lambda context, x, y: x.eval(context) in y.eval(context)), 'not in': infix(9, lambda context, x, y: x.eval(context) not in y.eval(context)), - # This should be removed in Django 1.10: - '=': infix(10, lambda context, x, y: x.eval(context) == y.eval(context)), '==': infix(10, lambda context, x, y: x.eval(context) == y.eval(context)), '!=': infix(10, lambda context, x, y: x.eval(context) != y.eval(context)), '>': infix(10, lambda context, x, y: x.eval(context) > y.eval(context)), @@ -178,11 +172,6 @@ class IfParser(object): except (KeyError, TypeError): return self.create_var(token) else: - if token == '=': - warnings.warn( - "Operator '=' is deprecated and will be removed in Django 1.10. Use '==' instead.", - RemovedInDjango110Warning, stacklevel=2 - ) return op() def next_token(self): -- cgit v1.3