gapic-generator-python icon indicating copy to clipboard operation
gapic-generator-python copied to clipboard

Remove usage of `google.protobuf.__version__`. Use `importlib.metadata.version('protobuf')` instead

Open parthea opened this issue 4 months ago • 0 comments

google.protobuf.__version__ is used in this code base.

https://github.com/search?q=repo%3Agoogleapis%2Fgapic-generator-python%20google.protobuf.version&type=code

It's possible that this is the cause of https://github.com/googleapis/google-cloud-python/issues/13974. We should switch to importlib.metadata.version('protobuf') instead

>>> importlib.metadata.version('protobuf')
'6.30.2'

parthea avatar Aug 21 '25 21:08 parthea