How to integrate with protobuf 3.15.3?
Thanks for the great work!
I was using protobuf 3.15.3 and encountered the following error message.
'const struct google::protobuf::python::PyProto_API' has no member named 'DescriptorPool_FromPool'
I checked https://github.com/protocolbuffers/protobuf/blob/v3.15.3/python/google/protobuf/proto_api.h and found there is no such an API in protobuf 3.15.3. Is is possible to integrate the project with the given version? Thanks.
Indeed, this API has been added to version 3.18.0. You need this version of protobuf to compile pybind11_protobuf as is.
But, it appears that this call is only needed to support custom descriptor pools: usually, internal Python structures have not been set up in this case. You could try removing the 5 lines around the call to DescriptorPool_FromPool. If your messages come from a standard pb2 module, this won't make a difference.
@dongqixu If you need to keep using versions prior to 3.18.0, could you please try out #ifdef around the 5 lines pointed out by @amauryfa and post the diff here? I'll apply that to our internal version, which then gets exported back here.