Title: `mypy` presubmit fails with `types-protobuf==5.x` · Issue #642 · googleapis/python-api-core · GitHub
Open Graph Title: `mypy` presubmit fails with `types-protobuf==5.x` · Issue #642 · googleapis/python-api-core
X Title: `mypy` presubmit fails with `types-protobuf==5.x` · Issue #642 · googleapis/python-api-core
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_f...
Open Graph 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 ...
X 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 ...
Opengraph URL: https://github.com/googleapis/python-api-core/issues/642
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`mypy` presubmit fails with `types-protobuf==5.x`","articleBody":"The `mypy` [nox session](https://github.com/googleapis/python-api-core/blob/828ffe1d7b2edd36be5e852524adb7f5d1241770/noxfile.py#L175) fails with the [latest version](https://pypi.org/project/types-protobuf/5.26.0.20240422/) of `types-protobuf==5.26.0.20240422` and `types-protobuf==5.26.0.20240420`. This is related to [protobuf 5.x](https://pypi.org/project/protobuf/#history) which includes a breaking change compared with 4.x where `including_default_value_fields` is removed in `MessageToDict` : https://github.com/protocolbuffers/protobuf/commit/26995798757fbfef5cf6648610848e389db1fecf\r\n\r\n\r\nSee the stack trace below and [build log](https://github.com/googleapis/python-api-core/actions/runs/8859767950/job/24329889797?pr=634) from PR https://github.com/googleapis/python-api-core/pull/634\r\n```\r\nRun nox -s mypy\r\nnox \u003e Running session mypy\r\nnox \u003e Creating virtual environment (virtualenv) using python3.10 in .nox/mypy\r\nnox \u003e python -m pip install '.[grpc]' mypy\r\nnox \u003e python -m pip install types-setuptools types-requests 'types-protobuf!=4.24.0.20240106' types-mock types-dataclasses\r\nnox \u003e mypy google tests\r\nmypy.ini: [mypy]: python_version: Python 3.7 is not supported (must be 3.8 or higher)\r\ngoogle/api_core/operations_v1/transports/rest.py:187: error: Unexpected keyword argument \"including_default_value_fields\" for \"MessageToDict\" [call-arg]\r\n.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: \"MessageToDict\" defined here\r\ngoogle/api_core/operations_v1/transports/rest.py:200: error: Unexpected keyword argument \"including_default_value_fields\" for \"MessageToDict\" [call-arg]\r\n.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: \"MessageToDict\" defined here\r\ngoogle/api_core/operations_v1/transports/rest.py:268: error: Unexpected keyword argument \"including_default_value_fields\" for \"MessageToDict\" [call-arg]\r\n.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: \"MessageToDict\" defined here\r\ngoogle/api_core/operations_v1/transports/rest.py:281: error: Unexpected keyword argument \"including_default_value_fields\" for \"MessageToDict\" [call-arg]\r\n.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: \"MessageToDict\" defined here\r\ngoogle/api_core/operations_v1/transports/rest.py:342: error: Unexpected keyword argument \"including_default_value_fields\" for \"MessageToDict\" [call-arg]\r\n.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: \"MessageToDict\" defined here\r\ngoogle/api_core/operations_v1/transports/rest.py:355: error: Unexpected keyword argument \"including_default_value_fields\" for \"MessageToDict\" [call-arg]\r\n.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: \"MessageToDict\" defined here\r\ngoogle/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]\r\n.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: \"MessageToDict\" defined here\r\ngoogle/api_core/operations_v1/transports/rest.py:424: error: Unexpected keyword argument \"including_default_value_fields\" for \"MessageToDict\" [call-arg]\r\n.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: \"MessageToDict\" defined here\r\ngoogle/api_core/operations_v1/transports/rest.py:436: error: Unexpected keyword argument \"including_default_value_fields\" for \"MessageToDict\" [call-arg]\r\n.nox/mypy/lib/python3.10/site-packages/google-stubs/protobuf/json_format.pyi:23: note: \"MessageToDict\" defined here\r\nFound 9 errors in 1 file (checked 97 source files)\r\nnox \u003e Command mypy google tests failed with exit code 1\r\nnox \u003e Session mypy failed.\r\nError: Process completed with exit code 1.\r\n```","author":{"url":"https://github.com/parthea","@type":"Person","name":"parthea"},"datePublished":"2024-04-27T12:34:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/642/python-api-core/issues/642"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:66283962-ad04-9e00-1bd3-26afc7519f67 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E450:2D9FEB:6E0EDD:A1865A:6A4E0ED8 |
| html-safe-nonce | fc5fa3f8f5106bd9d28749bbd6e88948f6ab7090dd44204b59683624e2f3f7d0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDUwOjJEOUZFQjo2RTBFREQ6QTE4NjVBOjZBNEUwRUQ4IiwidmlzaXRvcl9pZCI6Ijk4MzA4MTAyMzI4NDU4MDA1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 896237607562d76cc56352b8c9f26d4f930c8b17a0347dc6829972485d362f27 |
| hovercard-subject-tag | issue:2266996988 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-api-core/642/issue_layout |
| twitter:image | https://opengraph.githubassets.com/316ff4911afa5cbe59133bac88b72f53243f3e01e19ef698fda12991c2c5d1f1/googleapis/python-api-core/issues/642 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/316ff4911afa5cbe59133bac88b72f53243f3e01e19ef698fda12991c2c5d1f1/googleapis/python-api-core/issues/642 |
| og:image:alt | 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 ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | parthea |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| turbo-cache-control | no-preview |
| go-import | github.com/googleapis/python-api-core git https://github.com/googleapis/python-api-core.git |
| octolytics-dimension-user_id | 16785467 |
| octolytics-dimension-user_login | googleapis |
| octolytics-dimension-repository_id | 226992456 |
| octolytics-dimension-repository_nwo | googleapis/python-api-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 226992456 |
| octolytics-dimension-repository_network_root_nwo | googleapis/python-api-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 51470c353b8a1f52a88d3e3cc2014b17ab8cc1ce |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width