Skip to content

Add guidance for grpcio and protobuf versions for gRPC API packages #361

Open
@ninad-kamat

Description

@ninad-kamat

Description of the modifications

There seems to be no guidance on specifying runtime versions of grpcio and protobuf for gRPC API packages for PyAnsys libraries. The grpc runtime is a crucial thing if more than one library needs to be used at runtime. Generally, we use the widest possible range and PyPrimeMesh was using grpcio>=1.26.0 and protobuf>3.12.2, <4 for a long time. However, this turned out to be inaccurate. The current ansys-tools-protoc-helper generates files for protobuf==3.19.3 using grpcio-tools=1.44.0. The generated files have errors when you try and load them into protobuf==3.18.1 which is present in Workbench installation for 2023R2. The error happens at runtime and not during pip install command as the protobuf requirement is very forgiving.

The PyAnsys developer documentation can provide guidelines on what grpcio and protobuf versions should be used at runtime. At the time of writing this, I propose that to be grpcio~=1.46. and protobuf~=3.19 inline with what is being followed in development for 2024R1.

This will be crucial and the future versions of protobuf are going to get even more confusing for support with editions and protoc versions

https://protobuf.dev/support/version-support/
https://protobuf.dev/support/cross-version-runtime-guarantee/

Useful links and references

https://dev.docs.pyansys.com/how-to/grpc-api-packages.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions