fix: pin protobuf>=5.29.6,<6.0dev to prevent gencode/runtime version mismatch#57
Open
aki1770-del wants to merge 1 commit intoeclipse-kuksa:mainfrom
Open
Conversation
…mismatch Fixes eclipse-kuksa#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. Co-Authored-By: Claude and aki1770-del <aki1770@gmail.com>
Contributor
|
Possible duplicate of #55 (that also has been lying around for too long....) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Fixes #54. Installing
kuksa-clientviapip install kuksa-clientfails with:The root cause:
grpcio-tools==1.68.0requiresprotobuf>=5.26.1but does not pin a maximum.pipmay resolve to a protobuf version that is incompatible with the.proto-generated_pb2.pyfiles included in the package. In the reported case, protobuf 5.27.3 was installed at build time and 5.29.x at runtime — the version check in_pb2.pyfails.Fix
Add explicit
protobuf >= 5.29.6, < 6.0devconstraint to:setup.cfginstall_requires— ensures the runtime installs a compatible versionpyproject.tomlbuild-system.requires— ensures the build generates_pb2.pyfiles with the same protobuf versionThe
<6.0devupper bound follows the establishedgrpcio/grpcio-toolspattern of excluding the next major (which has breaking generated code changes). The lower bound matchesgrpcio-tools==1.68.0's resolvedprotobuf==5.29.6.No API changes
This is a dependency metadata fix only. No Python source files change.
AI-assisted — authored with Claude, reviewed by Komada.