From 2b5b9f90857c9450616a83e6741472759e1e3d72 Mon Sep 17 00:00:00 2001 From: Akihiko Komada Date: Sat, 4 Apr 2026 15:18:34 +0900 Subject: [PATCH] fix: pin protobuf>=5.29.6,<6.0dev to prevent gencode/runtime version mismatch Fixes #54. grpcio-tools==1.68.0 resolves to protobuf 5.29.6. Without an explicit runtime constraint, pip may install a mismatched protobuf version causing "Detected incompatible Protobuf Gencode/Runtime versions" on import. Add protobuf>=5.29.6,<6.0dev to both setup.cfg install_requires (runtime) and pyproject.toml build-system requires (build-time), ensuring the proto files are generated and loaded with a compatible protobuf version. Signed-off-by: Akihiko Komada --- kuksa-client/pyproject.toml | 2 ++ kuksa-client/setup.cfg | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/kuksa-client/pyproject.toml b/kuksa-client/pyproject.toml index b7a8cdb..59d1018 100644 --- a/kuksa-client/pyproject.toml +++ b/kuksa-client/pyproject.toml @@ -2,6 +2,8 @@ requires = [ # Make sure to use the same exact version criteria in setup.cfg and update requirements.txt after changing "grpcio-tools==1.68.0", + # Explicit protobuf pin matching setup.cfg to avoid gencode/runtime version mismatch. Fixes #54. + "protobuf>=5.29.6,<6.0dev", "setuptools>=77", "setuptools-git-versioning", "wheel", diff --git a/kuksa-client/setup.cfg b/kuksa-client/setup.cfg index 4d28912..6e06c8b 100644 --- a/kuksa-client/setup.cfg +++ b/kuksa-client/setup.cfg @@ -29,6 +29,11 @@ install_requires = pygments >= 2.15 # Make sure to use the same version criteria in pyproject.toml and update requirements.txt after changing grpcio-tools == 1.68.0 + # Explicit protobuf pin: grpcio-tools 1.68.0 resolves to protobuf 5.29.x; the + # generated _pb2 files must be loaded by a compatible runtime version. + # Without this constraint, pip may install a mismatched version and raise + # "Detected incompatible Protobuf Gencode/Runtime versions". Fixes #54. + protobuf >= 5.29.6, < 6.0dev jsonpath-ng >= 1.5.3 packages = find: