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

testing/mock_spanner: failure with TypeError: unsupported operand type(s) for |: 'MessageMeta' and 'MessageMeta' #1277

Open
odeke-em opened this issue Dec 24, 2024 · 2 comments
Assignees
Labels
api: spanner Issues related to the googleapis/python-spanner API.

Comments

@odeke-em
Copy link
Contributor

After PR #1271 we get this error

tests/mockserver_tests/mock_server_test_base.py:19: in <module>
    from google.cloud.spanner_v1.testing.mock_spanner import (
google/cloud/spanner_v1/testing/mock_spanner.py:84: in <module>
    class SpannerServicer(spanner_grpc.SpannerServicer):
google/cloud/spanner_v1/testing/mock_spanner.py:190: in SpannerServicer
    self, request: ExecuteSqlRequest | ExecuteBatchDmlRequest
E   TypeError: unsupported operand type(s) for |: 'MessageMeta' and 'MessageMeta'

Perhaps the code was tested only for Python 3.10 and not Python 3.8?

Kindly cc-ing @olavloite

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Dec 24, 2024
@olavloite
Copy link
Contributor

Yes, those tests are only run with Python 3.12. See https://github.com/googleapis/python-spanner/blob/main/.github/workflows/mock_server_tests.yaml and

@nox.session(python=DEFAULT_MOCK_SERVER_TESTS_PYTHON_VERSION)

We could consider adding a runner for Python 3.10, but not for Python 3.8, as it is EOL.

@odeke-em
Copy link
Contributor Author

@olavloite sadly we still need to have even Python 3.7 support though it has been past EOL since forever. It is the reason why OpenTelemetry needs import guards per #1173 as per Google Cloud Client library expectations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API.
Projects
None yet
Development

No branches or pull requests

3 participants