Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

mypy presubmit fails with types-protobuf==5.x #642

Copy link
Copy link

Description

@parthea
Issue body actions

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.
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

type: processA process-related concern. May include testing, release, or the like.A process-related concern. May include testing, release, or the like.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.