DeprecationWarning from google.protobuf
@lazarust Could you consider explicitly upgrading protobuf. You can find compatible versions on the official protobuf website [here](https://grpc.io/docs/protoc-installation/).  Kindly refer to [this](https://github.com/protocolbuffers/protobuf/issues/15077) issue as well for more information.
Thank you! Thanks for the response @sushreebarsa. I tried upgrading `protobuf` by running `pip install -U protobuf` and still get the same deprecation warning with protobuf 5.26.1. 

Is there something else I should do/could try? 

It also looks like tensorflow requires a version of `protobuf` that's < 5.0.0. Is 5.0 + support something that could be updated? @lazarust The error you're encountering is related to a deprecation warning in protobuf and its incompatibility with TensorFlow in your current environment. Kindly ensure you're upgrading protobuf and TensorFlow within the same virtual environment you're using for your project. This avoids conflicts with other projects that might have different dependency requirements. Another workaround could be downgrading protobuf to a version below 5.0.0 which is not ideal.
TensorFlow is yet to fully support protobuf versions above 5.0.

Thank you!   @sushreebarsa I've verified that I'm using tensorflow `2.16.1` and protobuf `4.25.3` (this is the newest protobuf supported by tensorflow from what I can tell). I'm still running into the DeprecationWarnings.

If it's not an easy fix since tensorflow doesn't support protobuf 5.0+, we can ignore those warnings for now. Unless you have a better idea? Hi, @lazarust ! Ignoring the warnings might seem like a quick solution. If downgrading protobuf or upgrading TensorFlow is not feasible, you can suppress the warnings. 
```
import warnings
warnings.filterwarnings("ignore", message=".*DeprecationWarning.*")


```

Please find the doc [here](https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/pip_package/setup.py) which has the supported protobuf versions mentioned in it.  Kindly stay updated with TF [releases](https://github.com/tensorflow/tensorflow/releases). 

Thank you! @sushreebarsa We've decided to just suppress the warnings for now until TensorFlow supports the new version of protobuf. Should I close this issue?  @lazarust Sure, you could move this issue to close status for now and stay updated for new [releases](https://github.com/tensorflow/tensorflow/releases). Thank you! Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/68194">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/68194">No</a>

### Issue type

Bug

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

tf 2.16.1

### Custom code

Yes

### OS platform and distribution

MacOS 14.4.1

### Mobile device

_No response_

### Python version

3.12.2

### Bazel version

_No response_

### GCC/compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current behavior?

When running a `pytest` that import tensorflow, I get the following DeprecrecationWarnings:

- `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`
- `Type google._upb._message.ScalarMapContainer uses PyType_Spec with a metaclass that has custom tp_new. This is deprecated and will no longer be allowed in Python 3.14`



### Standalone code to reproduce the issue

```shell
Since this happens specifically in a `pytest` and not when importing tensorflow via the shell I'm unsure how to replicate this, but I've attached the traceback.
```


### Relevant log output

```shell
import tensorflow as tf
../../../.virtualenvs/skops/lib/python3.12/site-packages/tensorflow/__init__.py:47: in <module>
    from tensorflow._api.v2 import __internal__
../../../.virtualenvs/skops/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/__init__.py:8: in <module>
    from tensorflow._api.v2.__internal__ import autograph
../../../.virtualenvs/skops/lib/python3.12/site-packages/tensorflow/_api/v2/__internal__/autograph/__init__.py:8: in <module>
    from tensorflow.python.autograph.core.ag_ctx import control_status_ctx # line: 34
../../../.virtualenvs/skops/lib/python3.12/site-packages/tensorflow/python/autograph/core/ag_ctx.py:21: in <module>
    from tensorflow.python.autograph.utils import ag_logging
../../../.virtualenvs/skops/lib/python3.12/site-packages/tensorflow/python/autograph/utils/__init__.py:17: in <module>
    from tensorflow.python.autograph.utils.context_managers import control_dependency_on_returns
../../../.virtualenvs/skops/lib/python3.12/site-packages/tensorflow/python/autograph/utils/context_managers.py:19: in <module>
    from tensorflow.python.framework import ops
../../../.virtualenvs/skops/lib/python3.12/site-packages/tensorflow/python/framework/ops.py:33: in <module>
    from tensorflow.core.framework import attr_value_pb2
../../../.virtualenvs/skops/lib/python3.12/site-packages/tensorflow/core/framework/attr_value_pb2.py:5: in <module>
    from google.protobuf.internal import builder as _builder
../../../.virtualenvs/skops/lib/python3.12/site-packages/google/protobuf/internal/builder.py:18: in <module>
    from google.protobuf.internal import python_message
../../../.virtualenvs/skops/lib/python3.12/site-packages/google/protobuf/internal/python_message.py:36: in <module>
    from google.protobuf import descriptor as descriptor_mod
../../../.virtualenvs/skops/lib/python3.12/site-packages/google/protobuf/descriptor.py:17: in <module>
    from google.protobuf.internal import api_implementation
../../../.virtualenvs/skops/lib/python3.12/site-packages/google/protobuf/internal/api_implementation.py:51: in <module>
    if _CanImport('google._upb._message'):
../../../.virtualenvs/skops/lib/python3.12/site-packages/google/protobuf/internal/api_implementation.py:41: in _CanImport
    mod = importlib.import_module(mod_name)
../../../.pyenv/versions/3.12.2/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
_______________________________________________________________________________________________________________________________________ ERROR collecting skops/io/tests/test_visualize.py ________________________________________________________________________________________________________________________________________
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.```
```
