From 97aeffa9f58ec18af74172500ec2bb4c674f0af3 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Mon, 22 Nov 2021 13:14:55 -0800 Subject: [PATCH] replace deprecated pyparsing method pyparsing renamed a method used to define the operator precedence hierarchy [1]. The method's behavior was preserved although opt-in override enhancements to the paranthesis were introduced. Needed-by: https://review.opendev.org/818614/ [1] https://github.com/pyparsing/pyparsing/commit/ab2f220dd26ead73ce5bf496db85c07810e458f4 Change-Id: I759aa5eec7dd52b3dba10a389efa27c5956991b9 --- cinder/scheduler/evaluator/evaluator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/scheduler/evaluator/evaluator.py b/cinder/scheduler/evaluator/evaluator.py index 81b0ca3f8fe..39c8cad0aa2 100644 --- a/cinder/scheduler/evaluator/evaluator.py +++ b/cinder/scheduler/evaluator/evaluator.py @@ -237,7 +237,7 @@ def _def_parser(): oneOf = pyparsing.oneOf opAssoc = pyparsing.opAssoc - operatorPrecedence = pyparsing.operatorPrecedence + infixNotation = pyparsing.infixNotation Word = pyparsing.Word integer = Word(nums) @@ -257,7 +257,7 @@ def _def_parser(): negateop = oneOf('NOT not !') operand.setParseAction(EvalConstant) - expr = operatorPrecedence(operand, [ + expr = infixNotation(operand, [ (fn, 1, opAssoc.RIGHT, EvalFunction), ("^", 2, opAssoc.RIGHT, EvalPowerOp), (signop, 1, opAssoc.RIGHT, EvalSignOp),