googleapis / google-cloud-python

Google Cloud Client Library for Python
https://googleapis.github.io/google-cloud-python/
Apache License 2.0
4.73k stars 1.51k forks source link

DeprecationWarning for google._upb._message.MessageMapContainer utilization #12560

Open piercefreeman opened 2 months ago

piercefreeman commented 2 months ago

The latest version of recaptchaenterprise_v1==1.19.0 throws a DeprecationWarning on the construction of protobuf messages. This was caused by an upstream protobuf issue that has subsequently been fixed and published. https://github.com/protocolbuffers/protobuf/issues/15077 https://github.com/protocolbuffers/protobuf/pull/15999

Is there a technical constraint that limits the recaptcha enterprise protobuf from being bumped to support 5.x.x? https://github.com/googleapis/google-cloud-python/blob/main/packages/google-cloud-recaptcha-enterprise/setup.py#L49

DeprecationWarning: Type google._upb._message.MessageMapContainer uses PyType_Spec with a metaclass that has custom tp_new. This is deprecated and will no longer be allowed in Python 3.14.

The above exception was the direct cause of the following exception:
../../.pyenv/versions/3.12.0/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)

...

../../Library/Caches/pypoetry/virtualenvs/myproject-qiF08Gag-py3.12/lib/python3.12/site-packages/common_auth/dependencies/core.py:27: in <module>
    from google.cloud.recaptchaenterprise_v1 import (
../../Library/Caches/pypoetry/virtualenvs/myproject-qiF08Gag-py3.12/lib/python3.12/site-packages/google/cloud/recaptchaenterprise_v1/__init__.py:21: in <module>
    from .services.recaptcha_enterprise_service import (
../../Library/Caches/pypoetry/virtualenvs/myproject-qiF08Gag-py3.12/lib/python3.12/site-packages/google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/__init__.py:16: in <module>
    from .async_client import RecaptchaEnterpriseServiceAsyncClient
../../Library/Caches/pypoetry/virtualenvs/myproject-qiF08Gag-py3.12/lib/python3.12/site-packages/google/cloud/recaptchaenterprise_v1/services/recaptcha_enterprise_service/async_client.py:31: in <module>
    from google.api_core import exceptions as core_exceptions
../../Library/Caches/pypoetry/virtualenvs/myproject-qiF08Gag-py3.12/lib/python3.12/site-packages/google/api_core/exceptions.py:29: in <module>
    from google.rpc import error_details_pb2
../../Library/Caches/pypoetry/virtualenvs/myproject-qiF08Gag-py3.12/lib/python3.12/site-packages/google/rpc/error_details_pb2.py:20: in <module>
    from google.protobuf import descriptor as _descriptor
../../Library/Caches/pypoetry/virtualenvs/myproject-qiF08Gag-py3.12/lib/python3.12/site-packages/google/protobuf/descriptor.py:17: in <module>
    from google.protobuf.internal import api_implementation
../../Library/Caches/pypoetry/virtualenvs/myproject-qiF08Gag-py3.12/lib/python3.12/site-packages/google/protobuf/internal/api_implementation.py:51: in <module>
    if _CanImport('google._upb._message'):
../../Library/Caches/pypoetry/virtualenvs/myproject-qiF08Gag-py3.12/lib/python3.12/site-packages/google/protobuf/internal/api_implementation.py:41: in _CanImport
    mod = importlib.import_module(mod_name)
../../.pyenv/versions/3.12.0/lib/python3.12/importlib/__init__.py:90: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
E   SystemError: <class 'DeprecationWarning'> returned a result with an exception set
vchudnov-g commented 2 months ago

Thanks for reporting this! We are currently in the process of adding support for protobuf 5, but have to deal with some technical issues first. See the issue in the client library generator. We'll keep this issue updated as we make progress.