Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
parthea opened this issue Apr 27, 2024 · 0 comments · May be fixed by #644
Open

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

parthea opened this issue Apr 27, 2024 · 0 comments · May be fixed by #644
Assignees
Labels
type: process A process-related concern. May include testing, release, or the like.

Comments

@parthea
Copy link
Collaborator

parthea commented Apr 27, 2024

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.
@parthea parthea added the type: process A process-related concern. May include testing, release, or the like. label Apr 27, 2024
@parthea parthea linked a pull request Apr 27, 2024 that will close this issue
parthea added a commit to renovate-bot/python-api-core that referenced this issue Apr 27, 2024
parthea added a commit that referenced this issue Apr 29, 2024
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* See https://github.com/googleapis/synthtool/pull/1910/files

* fix artifact name

* remove space

* See #642

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: process A process-related concern. May include testing, release, or the like.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants