Commit c1d53d2
Enhance Cursor close handling and context manager exception management to prevent server side resource leaks (#554)
* Enhance Cursor close handling and context manager exception management
* tests
* fmt
* Fix Cursor.close() to properly handle CursorAlreadyClosedError
* Remove specific test message from Cursor.close() error handling
* Improve error handling in connection and cursor context managers to ensure proper closure during exceptions, including KeyboardInterrupt. Add tests for nested cursor management and verify operation closure on server-side errors.
* add
* add
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>1 parent ff78b5f commit c1d53d2
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
221 | 230 | | |
222 | 231 | | |
223 | 232 | | |
| |||
0 commit comments