Closed ivarec closed 9 months ago
I'll patch this up and will add a 1.12.1. I won't bother with updates for 1.11.X and earlier however. The SDK can be used with previous versions of Dapr Runtime, so no concerns there.
Fixed in 1.12.1
https://github.com/dapr/python-sdk/releases/tag/v1.12.1
Should be available via PyPI in a few minutes. Build job here: https://github.com/dapr/python-sdk/actions/runs/7008586040
Expected Behavior
I'm getting this error in my logs when an asyncio
DaprClient
exists anasync with
block:I haven't perceived any other side effects, but I haven't tested much. Maybe there is a resource leak.
Dapr version: 1.12.0 SDK version: 1.12.0 Python version: 3.9
Actual Behavior
To have
DaprClient
correctly manage the lifecycle of the channel and close it upon exiting theasync with
block.Steps to Reproduce the Problem
Just create an asyncio
DaprClient
and use it in anasync with
block.Also, I've noticed that the bug appears to be caused by this method on
./dapr/aio/clients/grpc/client.py
, line 172:There seems to be a missing
await
onself._channel.close()
.Release Note
RELEASE NOTE: