Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,11 @@ 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 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

def close(self) -> None:
"""Close the underlying gRPC channel."""
Expand Down
Loading