Closed
Description
The mypy
nox session fails with the latest version of types-protobuf==5.26.0.20240422
and types-protobuf==5.26.0.20240420
. This is related to protobuf 5.x which includes a breaking change compared with 4.x where including_default_value_fields
is removed in MessageToDict
: protocolbuffers/protobuf@2699579
See the stack trace below and build log from PR #634
Run nox -s mypy
nox > Running session mypy
nox > Creating virtual environment (virtualenv) using python3.10 in .nox/mypy
nox > python -m pip install '.[grpc]' mypy
nox > python -m pip install types-setuptools types-requests 'types-protobuf!=4.24.0.20240106' types-mock types-dataclasses
nox > mypy google tests
mypy.ini: [mypy]: python_version: Python 3.7 is not supported (must be 3.8 or higher)
google/api_core/operations_v1/transports/rest.py:187: error: Unexpected keyword argument "including_default_value_fields" for "MessageToDict" [call-arg]
.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: "MessageToDict" defined here
google/api_core/operations_v1/transports/rest.py:200: error: Unexpected keyword argument "including_default_value_fields" for "MessageToDict" [call-arg]
.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: "MessageToDict" defined here
google/api_core/operations_v1/transports/rest.py:268: error: Unexpected keyword argument "including_default_value_fields" for "MessageToDict" [call-arg]
.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: "MessageToDict" defined here
google/api_core/operations_v1/transports/rest.py:281: error: Unexpected keyword argument "including_default_value_fields" for "MessageToDict" [call-arg]
.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: "MessageToDict" defined here
google/api_core/operations_v1/transports/rest.py:342: error: Unexpected keyword argument "including_default_value_fields" for "MessageToDict" [call-arg]
.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: "MessageToDict" defined here
google/api_core/operations_v1/transports/rest.py:355: error: Unexpected keyword argument "including_default_value_fields" for "MessageToDict" [call-arg]
.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: "MessageToDict" defined here
google/api_core/operations_v1/transports/rest.py:4[14](https://github.com/googleapis/python-api-core/actions/runs/8859767950/job/24329889797?pr=634#step:5:15): error: Unexpected keyword argument "including_default_value_fields" for "MessageToDict" [call-arg]
.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: "MessageToDict" defined here
google/api_core/operations_v1/transports/rest.py:424: error: Unexpected keyword argument "including_default_value_fields" for "MessageToDict" [call-arg]
.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: "MessageToDict" defined here
google/api_core/operations_v1/transports/rest.py:436: error: Unexpected keyword argument "including_default_value_fields" for "MessageToDict" [call-arg]
.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: "MessageToDict" defined here
Found 9 errors in 1 file (checked 97 source files)
nox > Command mypy google tests failed with exit code 1
nox > Session mypy failed.
Error: Process completed with exit code 1.