Skip to content

Raise grpcio and protobuf floors with the generator bump in 0.2.0 #24

Open

Description

@pimlock

Summary

The generated stubs in src/openshell/_proto embed version gates from the tool that generated them. The pyproject.toml floors do not reflect those gates, and moving the generator forward tightens them. Raise the declared floors deliberately in 0.2.0 instead of by accident through a Dependabot bump.

Background

Found in #19 (Dependabot bump of grpcio-tools 1.78.0 to 1.85.1). Regenerating with 1.85.1 changes only version stamps in 15 files:

Committed (grpcio-tools 1.78.0) Regenerated (1.85.1)
GRPC_GENERATED_VERSION in *_pb2_grpc.py 1.78.0 1.85.1
ValidateProtobufRuntimeVersion in *_pb2.py 6.31.1 7.35.1

Effects:

  • The stubs raise at import when the installed grpcio is older than GRPC_GENERATED_VERSION. pyproject.toml declares grpcio>=1.60.
  • ValidateProtobufRuntimeVersion raises at import when the installed protobuf is older than the generator (compared as major, minor, patch). It does not reject a newer runtime, in protobuf 6.33.6 or 7.36.2. The committed stubs therefore load on protobuf 6.31.1 and up, including 7.x, even though pyproject.toml declares protobuf>=4.25. Regenerated stubs would load only on protobuf 7.35.1 and up, which breaks every 6.x user at import.
  • Protobuf 6.x is in maintenance until 31 Mar 2027 (https://protobuf.dev/support/version-support/), so a move to 7 is reasonable but not yet forced.

Proposed work for 0.2.0

  • Move the generator to the grpcio-tools / protobuf 7 line and regenerate src/openshell/_proto.
  • Set grpcio and protobuf floors in pyproject.toml to match what the stubs actually require. The protobuf>=4.25 floor is already inaccurate today, since the stubs need >=6.31.1.
  • Lift the Dependabot ignore for grpcio-tools (added until this lands).
  • Note the protobuf 6 drop in the release notes.
  • Review the types-protobuf>=6.32,<7 pin in the dev group.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions