@@ -217,12 +217,6 @@ def read(self) -> Optional[OAuthToken]:
217217 # use_cloud_fetch
218218 # Enable use of cloud fetch to extract large query results in parallel via cloud storage
219219
220- logger .debug (
221- "Connection.__init__(server_hostname=%s, http_path=%s)" ,
222- server_hostname ,
223- http_path ,
224- )
225-
226220 if access_token :
227221 access_token_kv = {"access_token" : access_token }
228222 kwargs = {** kwargs , ** access_token_kv }
@@ -297,13 +291,7 @@ def __enter__(self) -> "Connection":
297291 return self
298292
299293 def __exit__ (self , exc_type , exc_value , traceback ):
300- try :
301- self .close ()
302- except BaseException as e :
303- logger .warning (f"Exception during connection close in __exit__: { e } " )
304- if exc_type is None :
305- raise
306- return False
294+ self .close ()
307295
308296 def __del__ (self ):
309297 if self .open :
@@ -426,14 +414,7 @@ def __enter__(self) -> "Cursor":
426414 return self
427415
428416 def __exit__ (self , exc_type , exc_value , traceback ):
429- try :
430- logger .debug ("Cursor context manager exiting, calling close()" )
431- self .close ()
432- except BaseException as e :
433- logger .warning (f"Exception during cursor close in __exit__: { e } " )
434- if exc_type is None :
435- raise
436- return False
417+ self .close ()
437418
438419 def __iter__ (self ):
439420 if self .active_result_set :
@@ -764,9 +745,6 @@ def execute(
764745
765746 :returns self
766747 """
767- logger .debug (
768- "Cursor.execute(operation=%s, parameters=%s)" , operation , parameters
769- )
770748
771749 param_approach = self ._determine_parameter_approach (parameters )
772750 if param_approach == ParameterApproach .NONE :
0 commit comments