From 9d07167ad110caa0f405537df14014280f948b04 Mon Sep 17 00:00:00 2001 From: Samantha Coyle Date: Mon, 1 Jun 2026 09:01:34 -0500 Subject: [PATCH 1/2] style: rm warning for python 3.14 Signed-off-by: Samantha Coyle --- .../dapr/ext/workflow/_durabletask/client.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/_durabletask/client.py b/ext/dapr-ext-workflow/dapr/ext/workflow/_durabletask/client.py index 72fcb2f89..d92a311ea 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/_durabletask/client.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/_durabletask/client.py @@ -168,10 +168,12 @@ def __enter__(self): return self def __exit__(self, exc_type, exc, tb): - try: - self.close() - finally: - return False + # close() is best-effort and swallows its own errors, so a plain call safe here. + # Returning False — i.e. not suppressing the original exception - + # is the same behavior as the previous try/finally, without + # the `return in finally` SyntaxWarning on Python 3.14+. + self.close() + return False def close(self) -> None: """Close the underlying gRPC channel.""" From effb63e289665401a9d5e5c35629a135b60011ef Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 1 Jun 2026 09:11:58 -0500 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sam --- .../dapr/ext/workflow/_durabletask/client.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ext/dapr-ext-workflow/dapr/ext/workflow/_durabletask/client.py b/ext/dapr-ext-workflow/dapr/ext/workflow/_durabletask/client.py index d92a311ea..29f77da9f 100644 --- a/ext/dapr-ext-workflow/dapr/ext/workflow/_durabletask/client.py +++ b/ext/dapr-ext-workflow/dapr/ext/workflow/_durabletask/client.py @@ -168,10 +168,9 @@ def __enter__(self): return self def __exit__(self, exc_type, exc, tb): - # close() is best-effort and swallows its own errors, so a plain call safe here. - # Returning False — i.e. not suppressing the original exception - - # is the same behavior as the previous try/finally, without - # the `return in finally` SyntaxWarning on Python 3.14+. + # close() is best-effort and swallows its own errors, so a plain call is safe here. + # Returning False (i.e., not suppressing the original exception) is the same behavior + # as the previous try/finally, without the `return in finally` SyntaxWarning on Python 3.14+. self.close() return False