@@ -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 }
@@ -298,13 +292,7 @@ def __enter__(self) -> "Connection":
298292 return self
299293
300294 def __exit__ (self , exc_type , exc_value , traceback ):
301- try :
302- self .close ()
303- except BaseException as e :
304- logger .warning (f"Exception during connection close in __exit__: { e } " )
305- if exc_type is None :
306- raise
307- return False
295+ self .close ()
308296
309297 def __del__ (self ):
310298 if self .open :
@@ -427,14 +415,7 @@ def __enter__(self) -> "Cursor":
427415 return self
428416
429417 def __exit__ (self , exc_type , exc_value , traceback ):
430- try :
431- logger .debug ("Cursor context manager exiting, calling close()" )
432- self .close ()
433- except BaseException as e :
434- logger .warning (f"Exception during cursor close in __exit__: { e } " )
435- if exc_type is None :
436- raise
437- return False
418+ self .close ()
438419
439420 def __iter__ (self ):
440421 if self .active_result_set :
@@ -765,9 +746,6 @@ def execute(
765746
766747 :returns self
767748 """
768- logger .debug (
769- "Cursor.execute(operation=%s, parameters=%s)" , operation , parameters
770- )
771749
772750 param_approach = self ._determine_parameter_approach (parameters )
773751 if param_approach == ParameterApproach .NONE :
0 commit comments