Bug - Protobuf Version Incompatibility in Saleae Automation Package

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 using grpcio-tools, which specifies a dependency constraint of 5.26.1 <= protobuf < 6.0dev. This results in generated code with version 5.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

  1. Create a Python virtual environment:

    python -m venv .venv
    
  2. Install the Saleae Logic 2 automation package:

    pip install logic2-automation
    
  3. 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

  1. Pin the protobuf runtime dependency to match the gencode version (5.29.0) in the package’s dependencies.
  2. Update dependency constraints to prevent installing protobuf 6.x+ until compatibility is resolved.
  3. Update the build process to use a newer version of grpcio-tools that supports protobuf 6.x.

@ccarrmcmahon Thanks for the reminder! We’ll track all issue reports for this in the Bug Report post you made below.

I ended up adding the report from the other user into that post as well. We’ll provide all updates we have through that Issue Post.

I’m glad to hear that there are no immediate issues at the moment besides the warning message. Having said that, if you find that anything breaks because of it, feel free to provide any updates you have in your issue post linked above!

Perfect, thanks for doing that! Sorry for the duplicate post, I just wanted to make sure it was captured. I assumed the repo wasn’t being maintained since the released version doesn’t match that on PyPI and there hasn’t been much activity.

Anyway, as you said, it’s not a big deal; especially after I figured out that I could just specify an updated package version in my dependency list. I saw that you were already doing this in your toml file, but only for wheel builds which is what hinted me into the issue.

Thanks for the update :slight_smile: