Repository navigation
fix(python): require protobuf>=7.36.2 to match the checked-in gencode - #366
Merged
Merged
Conversation
spec_pb2.py is generated by protoc 7.36.2, and the protobuf runtime
rejects gencode newer than itself, so the previous lower bound
(">=6.33.1") allowed installs that fail at import time with
VersionError. Verified: reproduced the failure with protobuf 6.33.1,
and the full pytest suite (76 passed, 2 skipped) passes with the new
bound.
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.
What
python/kcl_lib/api/spec_pb2.pyis generated by protoc 7.36.2, butpyproject.tomldeclaredprotobuf>=6.33.1. The protobuf runtime refuses to load gencode newer than itself, so any user resolving to protobuf 6.x hit a hard failure at import time:Fix
Raise the lower bound to
>=7.36.2(no upper bound, as before).Verification
VersionErrorin the project venv with protobuf 6.33.1import kcl_lib.apisucceeds, full suitepytest tests/ -q→ 76 passed, 2 skipped