Skip to content

Commit 7039489

Browse files
authored
Upgrade cel-python to 0.4.0 and update usage (#2015)
* celpy fix * fix * update
1 parent 02b1e6f commit 7039489

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

requirements/requirements-examples.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protobuf
2323
azure-identity
2424
azure-keyvault-keys
2525
boto3
26-
cel-python>=0.1.5
26+
cel-python>=0.4.0
2727
google-auth
2828
google-api-core
2929
google-cloud-kms

requirements/requirements-rules.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
azure-identity
22
azure-keyvault-keys
33
boto3>=1.35
4-
cel-python>=0.1.5
4+
cel-python>=0.4.0
55
google-auth
66
google-api-core
77
google-cloud-kms
@@ -10,4 +10,4 @@ hvac
1010
jsonata-python
1111
# Dependency of cel-python. Use version 6 due to https://github.com/yaml/pyyaml/issues/601
1212
pyyaml>=6.0.0
13-
tink
13+
tink

src/confluent_kafka/schema_registry/rules/cel/cel_field_presence.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ def in_has() -> bool:
3535
class InterpretedRunner(celpy.InterpretedRunner):
3636
def evaluate(self, context):
3737
class Evaluator(celpy.Evaluator):
38-
def macro_has_eval(self, exprlist):
38+
def macro_has_eval(self, exprlist) -> celpy.celtypes.BoolType:
3939
_has_state.in_has = True
4040
result = super().macro_has_eval(exprlist)
4141
_has_state.in_has = False
4242
return result
4343

44-
e = Evaluator(ast=self.ast, activation=self.new_activation(context), functions=self.functions)
45-
value = e.evaluate()
44+
e = Evaluator(ast=self.ast, activation=self.new_activation())
45+
value = e.evaluate(context)
4646
return value

0 commit comments

Comments
 (0)