You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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 statementoptions |= channel_options
should be replaced withoptions.update(channel_options)
or something equivalent.Also consider to update the docs not to use "grpc.service_config" in the
channel_options
, becausedict.update()
overrides existing keys, and "grpc.service_config" is already being used by the Cerbos SDK.The text was updated successfully, but these errors were encountered: