Note: Not sure if the logic2-automation Issues are viewed often, so I’m posting this here as a duplicate of a ticket I made just in case: Issue #50 · saleae/logic2-automation
- Edit: It looks like the GitHub issue has been seen based on the following comment . I’ll keep this ticket posted in case users want a more direct/dedicated ticket related to the issue though.
Issue
Issue Description
When importing the saleae.automation
package, users encounter a warning message about protobuf version incompatibility:
Protobuf gencode version 5.29.0 is exactly one major version older than the runtime version 6.30.1 at saleae/grpc/saleae.proto.
Technical Details
-
Generated Files: The
saleae/grpc/saleae.proto
files were generated usinggrpcio-tools
, which specifies a dependency constraint of5.26.1 <= protobuf < 6.0dev
. This results in generated code with version5.29.0
. -
Runtime Version: The package’s dependency specification in the pyproject.toml file only requires protobuf to be greater than version
3.5.0.post1
without an upper bound. This allows pip to install the latest protobuf version (6.30.1
at time of writing), creating a major version mismatch. -
Warning Trigger: The version mismatch causes a warning to be logged whenever the package is imported.
Impact
Currently, this issue only produces a warning message when importing the package. However, future protobuf releases may break compatibility entirely, potentially rendering the package unusable.
Steps to Reproduce
-
Create a Python virtual environment:
python -m venv .venv
-
Install the Saleae Logic 2 automation package:
pip install logic2-automation
-
Run a Python script that imports the package:
from saleae import automation
Recommended Solution
- Add
grpcio-tools>=1.71.0
or some other version to the list of general dependencies. This will allow pip to see the additional constraint and avoid installing a protobuf version that is too high.
Other Solutions
- Pin the protobuf runtime dependency to match the gencode version (5.29.0) in the package’s dependencies.
- Update dependency constraints to prevent installing protobuf 6.x+ until compatibility is resolved.
- Update the build process to use a newer version of
grpcio-tools
that supports protobuf 6.x.