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

Usage of gRPC channel options is not compatible with Python 3.8 #49

Closed
mschmengler-vmray opened this issue Mar 7, 2024 · 0 comments · Fixed by #50
Closed

Usage of gRPC channel options is not compatible with Python 3.8 #49

mschmengler-vmray opened this issue Mar 7, 2024 · 0 comments · Fixed by #50
Assignees
Labels
bug Something isn't working

Comments

@mschmengler-vmray
Copy link

When using the gRPC Client, the optional parameter channel_options is available to pass gRPC-channel related options to the client.

As of version 0.10.4 of the Cerbos SDK, the processing of these options uses the Python-3.9 operator |= for dicts.
This makes it currently impossible to use the gRPC channel_options with a Python-3.8 codebase and kinda also breaks the intended compatibility with Python 3.8 in general.

In cerbos/sdk/_sync/_grpc.py, line 126, the statement options |= channel_options should be replaced with options.update(channel_options) or something equivalent.

Also consider to update the docs not to use "grpc.service_config" in the channel_options, because dict.update() overrides existing keys, and "grpc.service_config" is already being used by the Cerbos SDK.

@mschmengler-vmray mschmengler-vmray changed the title Usage gRPC channel options is not compatible with Python3.8 Usage of gRPC channel options is not compatible with Python 3.8 Mar 7, 2024
@Sambigeara Sambigeara self-assigned this Mar 7, 2024
@Sambigeara Sambigeara added the bug Something isn't working label Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants