Skip to content

Commit 70c6fad

Browse files
authored
Merge branch 'main' into async-compat
2 parents feb60db + 12d3f8f commit 70c6fad

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • ext/dapr-ext-workflow/dapr/ext/workflow/_durabletask

ext/dapr-ext-workflow/dapr/ext/workflow/_durabletask/client.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,11 @@ def __enter__(self):
175175
return self
176176

177177
def __exit__(self, exc_type, exc, tb):
178-
try:
179-
self.close()
180-
finally:
181-
return False
178+
# close() is best-effort and swallows its own errors, so a plain call is safe here.
179+
# Returning False (i.e., not suppressing the original exception) is the same behavior
180+
# as the previous try/finally, without the `return in finally` SyntaxWarning on Python 3.14+.
181+
self.close()
182+
return False
182183

183184
def close(self) -> None:
184185
"""Close the underlying gRPC channel."""

0 commit comments

Comments
 (0)