From 0998f1387ba5f74431d730944c4218e25c650d8d Mon Sep 17 00:00:00 2001 From: Dmitri Plotnikov Date: Thu, 22 Jan 2026 17:02:50 -0800 Subject: [PATCH] Remove dependency on pybind11_abseil:import_status_module PiperOrigin-RevId: 859834768 --- BUILD | 1 - py_cel_module.cc | 2 -- py_cel_test.py | 5 +++++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/BUILD b/BUILD index a3e94b1..13ecb8a 100644 --- a/BUILD +++ b/BUILD @@ -90,7 +90,6 @@ pybind_extension( "@com_google_cel_spec//proto/cel/expr:syntax_cc_proto", "@com_google_protobuf//:protobuf", "@pybind11_abseil//pybind11_abseil:absl_casters", - "@pybind11_abseil//pybind11_abseil:import_status_module", "@pybind11_abseil//pybind11_abseil:status_casters", ], ) diff --git a/py_cel_module.cc b/py_cel_module.cc index 776ca98..11bbd26 100644 --- a/py_cel_module.cc +++ b/py_cel_module.cc @@ -23,12 +23,10 @@ #include "py_cel_type.h" #include "py_cel_value.h" #include -#include "pybind11_abseil/import_status_module.h" namespace cel_python { PYBIND11_MODULE(py_cel, m) { - pybind11::google::ImportStatusModule(); m.doc() = "Python bindings for CEL."; PyCelArena::DefinePythonBindings(m); diff --git a/py_cel_test.py b/py_cel_test.py index 86a861a..6cc786c 100644 --- a/py_cel_test.py +++ b/py_cel_test.py @@ -94,6 +94,11 @@ def _eval( act = self.env.Activation(data) return expr.eval(act) + def testSyntaxError(self): + with self.assertRaises(Exception) as e: + self.env.compile("1 + ") + self.assertIn("Syntax error", str(e.exception)) + def testUnsetVar(self): res = self._eval("var_bool", {}) self.assertEqual(res.type(), cel.Type.ERROR)