Skip to content

Commit 7e794a6

Browse files
committed
Fix for #33
1 parent 99ef4ea commit 7e794a6

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [1.10.1] - Unreleased
8+
9+
### Fixed
10+
11+
- #33 - SIGABRT on interface detach.
12+
713
## [1.10.0] - 2023-10-03
814

915
### Fixed

src/firebird/driver/interfaces.py

+8-7
Original file line numberDiff line numberDiff line change
@@ -1176,9 +1176,10 @@ def ping(self) -> None:
11761176
self._check()
11771177
def detach(self) -> None:
11781178
"Replaces `isc_detach_database()`. On success releases interface."
1179-
self.vtable.deprecatedDetach(self, self.status)
1180-
self._check()
1181-
self._refcnt -= 1
1179+
if self._refcnt:
1180+
self.vtable.deprecatedDetach(self, self.status)
1181+
self._check()
1182+
self._refcnt -= 1
11821183
def drop_database(self) -> None:
11831184
"Replaces `isc_drop_database()`. On success releases interface."
11841185
self.vtable.deprecatedDropDatabase(self, self.status)
@@ -1223,7 +1224,7 @@ def create_batch(self, transaction: iTransaction, stmt: str, dialect: int,
12231224

12241225
# IAttachment(5) : IAttachment(4)
12251226
class iAttachment(iAttachment_v4):
1226-
"Class that wraps IAttachment v4 interface for use from Python"
1227+
"Class that wraps IAttachment v5 interface for use from Python"
12271228
VERSION = 5
12281229
def detach(self) -> None:
12291230
"Replaces `isc_detach_database()`. On success releases interface."
@@ -1238,7 +1239,7 @@ def drop_database(self) -> None:
12381239

12391240
# IService(3) : ReferenceCounted
12401241
class iService_v3(iReferenceCounted):
1241-
"Class that wraps IService interface for use from Python"
1242+
"Class that wraps IService v3 interface for use from Python"
12421243
VERSION = 3
12431244
def detach(self) -> None:
12441245
"""Close attachment to services manager, on success releases interface.
@@ -1262,7 +1263,7 @@ def start(self, spb: bytes) -> None:
12621263

12631264
# IService(4) : IService(3)
12641265
class iService_v4(iService_v3):
1265-
"Class that wraps IService interface for use from Python"
1266+
"Class that wraps IService v4 interface for use from Python"
12661267
VERSION = 4
12671268
def detach(self) -> None:
12681269
"""Close attachment to services manager, on success releases interface.
@@ -1274,7 +1275,7 @@ def detach(self) -> None:
12741275

12751276
# IService(5) : IService(4)
12761277
class iService(iService_v4):
1277-
"Class that wraps IService interface for use from Python"
1278+
"Class that wraps IService v5 interface for use from Python"
12781279
VERSION = 5
12791280
def cancel(self) -> None:
12801281
"""Cancel wait of current `query()` call. Supported only for embedded connections.

0 commit comments

Comments
 (0)