Description
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/