@@ -1795,7 +1795,7 @@ def __init__(self, att: iAttachment, dsn: str, dpb: bytes | None=None, sql_diale
1795
1795
self .__FIREBIRD_LIB__ = None
1796
1796
def __del__ (self ):
1797
1797
if not self .is_closed ():
1798
- warn (f"Connection ' { self . logging_id } ' disposed without prior close()" , ResourceWarning )
1798
+ warn (f"Connection disposed without prior close()" , ResourceWarning )
1799
1799
self ._close ()
1800
1800
self ._close_internals ()
1801
1801
self ._att .detach ()
@@ -2537,7 +2537,7 @@ def __exit__(self, exc_type, exc_value, traceback) -> None:
2537
2537
self .close ()
2538
2538
def __del__ (self ):
2539
2539
if self ._tra is not None :
2540
- warn (f"Transaction ' { self . logging_id } ' disposed while active" , ResourceWarning )
2540
+ warn (f"Transaction disposed while active" , ResourceWarning )
2541
2541
self ._finish ()
2542
2542
def __dead_con (self , obj : Connection ) -> None : # noqa: ARG002
2543
2543
self ._connection = None
@@ -2947,12 +2947,8 @@ def __exit__(self, exc_type, exc_value, traceback) -> None:
2947
2947
self .free ()
2948
2948
def __del__ (self ):
2949
2949
if self ._in_meta or self ._out_meta or self ._istmt :
2950
- warn (f"Statement ' { self . logging_id } ' disposed without prior free()" , ResourceWarning )
2950
+ warn (f"Statement disposed without prior free()" , ResourceWarning )
2951
2951
self .free ()
2952
- def __str__ (self ):
2953
- return f'{ self .logging_id } [{ self .sql } ]'
2954
- def __repr__ (self ):
2955
- return str (self )
2956
2952
def __dead_con (self , obj : Connection ) -> None : # noqa: ARG002
2957
2953
self ._connection = None
2958
2954
def __get_plan (self , * , detailed : bool ) -> str :
@@ -3085,10 +3081,8 @@ def __exit__(self, exc_type, exc_value, traceback) -> None:
3085
3081
self .close ()
3086
3082
def __del__ (self ):
3087
3083
if self ._blob is not None :
3088
- warn (f"BlobReader ' { self . logging_id } ' disposed without prior close()" , ResourceWarning )
3084
+ warn (f"BlobReader disposed without prior close()" , ResourceWarning )
3089
3085
self .close ()
3090
- def __repr__ (self ):
3091
- return f'{ self .logging_id } [size={ self .length } ]'
3092
3086
def flush (self ) -> None :
3093
3087
"""Does nothing.
3094
3088
"""
@@ -3292,7 +3286,7 @@ def __exit__(self, exc_type, exc_value, traceback) -> None:
3292
3286
self .close ()
3293
3287
def __del__ (self ):
3294
3288
if self ._result is not None or self ._stmt is not None or self .__blob_readers :
3295
- warn (f"Cursor ' { self . logging_id } ' disposed without prior close()" , ResourceWarning )
3289
+ warn (f"Cursor disposed without prior close()" , ResourceWarning )
3296
3290
self .close ()
3297
3291
def __next__ (self ):
3298
3292
if (row := self .fetchone ()) is not None :
@@ -5547,7 +5541,7 @@ def __exit__(self, exc_type, exc_value, traceback) -> None:
5547
5541
self .close ()
5548
5542
def __del__ (self ):
5549
5543
if self ._svc is not None :
5550
- warn (f"Server ' { self . logging_id } ' disposed without prior close()" , ResourceWarning )
5544
+ warn (f"Server disposed without prior close()" , ResourceWarning )
5551
5545
self .close ()
5552
5546
def __next__ (self ):
5553
5547
if (line := self .readline ()) is not None :
0 commit comments