Skip to content

fix(python): require protobuf>=7.36.2 to match the checked-in gencode - #366

Merged
Peefy merged 1 commit into
mainfrom
fix/python-protobuf-lower-bound
Sep 29, 2026
Merged

Peefy merged 1 commit into
mainfrom
fix/python-protobuf-lower-bound

Conversation

@Peefy

@Peefy Peefy commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

What

python/kcl_lib/api/spec_pb2.py is generated by protoc 7.36.2, but pyproject.toml declared protobuf>=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:

VersionError: Detected incompatible Protobuf Gencode/Runtime versions when loading spec.proto: gencode 7.36.2 runtime 6.33.1

Fix

Raise the lower bound to >=7.36.2 (no upper bound, as before).

Verification

  • Reproduced the VersionError in the project venv with protobuf 6.33.1
  • After the bump: import kcl_lib.api succeeds, full suite pytest tests/ -q → 76 passed, 2 skipped

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.
@Peefy
Peefy merged commit 6c21ea9 into main Sep 29, 2026
10 of 12 checks passed
@Peefy
Peefy deleted the fix/python-protobuf-lower-bound branch September 29, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant