Remove usage of deprecated operatorPrecedence and remove duplicate operators
"operatorPrecedence" has been deprecated, and it will be dropped in a future release. (see http://pythonhosted.org/pyparsing/pyparsing-module.html#operatorPrecedence) Operators "like" "in" operators are already included earlier in the list Change-Id: If84d79e0b8c4620a99233c768c33a9dd43fc551f
This commit is contained in:
parent
f5588d7520
commit
c5779e4dc2
@ -1109,7 +1109,7 @@ class QueryStringSearchAttrFilter(object):
|
||||
uninary_operators = ("not", )
|
||||
binary_operator = (u">=", u"<=", u"!=", u">", u"<", u"=", u"==", u"eq",
|
||||
u"ne", u"lt", u"gt", u"ge", u"le", u"in", u"like", u"≠",
|
||||
u"≥", u"≤", u"like" "in")
|
||||
u"≥", u"≤")
|
||||
multiple_operators = (u"and", u"or", u"∧", u"∨")
|
||||
|
||||
operator = pyparsing.Regex(u"|".join(binary_operator))
|
||||
@ -1135,7 +1135,7 @@ class QueryStringSearchAttrFilter(object):
|
||||
quoted_string | in_list)
|
||||
condition = pyparsing.Group(comparison_term + operator + comparison_term)
|
||||
|
||||
expr = pyparsing.operatorPrecedence(condition, [
|
||||
expr = pyparsing.infixNotation(condition, [
|
||||
("not", 1, pyparsing.opAssoc.RIGHT, ),
|
||||
("and", 2, pyparsing.opAssoc.LEFT, ),
|
||||
("∧", 2, pyparsing.opAssoc.LEFT, ),
|
||||
|
Loading…
Reference in New Issue
Block a user