Python pubsub wants to obtain the channel target for a gRPC request. They're currently doing it the following way:
channel = client.transport.publish._channel
channel.target().decode("utf8")
However, this broke when the underlying GAPIC implementation was updated to use an intercept channel. To summarize, the underlying type changed from _channel._UnaryUnaryMultiCallable to _interceptor._UnaryUnaryMultiCallable. The new type does not have the private property _channel directly exposed which breaks their code.
We've proposed the following workaround for now to unblock their release:
channel = client.transport.publish._thunk("")._channel
channel.target().decode("utf8")
Given that the solution above still uses a private API and can easily break, we're looking for a public API to get the channel target.
Python pubsub wants to obtain the channel target for a gRPC request. They're currently doing it the following way:
However, this broke when the underlying GAPIC implementation was updated to use an intercept channel. To summarize, the underlying type changed from _channel._UnaryUnaryMultiCallable to _interceptor._UnaryUnaryMultiCallable. The new type does not have the private property
_channeldirectly exposed which breaks their code.We've proposed the following workaround for now to unblock their release:
Given that the solution above still uses a private API and can easily break, we're looking for a public API to get the channel target.