Skip to content

Commit 9be643e

Browse files
committed
FIX: Fix isinstance check when using uvloop
1 parent 3c2b028 commit 9be643e

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
- Upgraded `databento-dbn` to 0.61.0:
77
- Added `MatchAlgorithm` variant `Allocation`
88

9+
#### Bug fixes
10+
- Fixed an issue where the `Live` client would throw a `TypeError` when connecting
11+
using `uvloop`
12+
913
## 0.79.0 - 2026-06-02
1014

1115
#### Enhancements

databento/live/protocol.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,9 @@ def connection_made(self, transport: asyncio.BaseTransport) -> None:
190190
191191
"""
192192
logger.debug("established connection to gateway")
193-
if not isinstance(transport, asyncio.Transport):
194-
raise TypeError("Connection does not support read-write operations.")
195-
self.__transport = transport
193+
if not hasattr(transport, "write"):
194+
raise TypeError("Connection does not support write operations.")
195+
self.__transport = transport # type: ignore [assignment]
196196
return super().connection_made(transport)
197197

198198
def connection_lost(self, exc: Exception | None) -> None:

0 commit comments

Comments
 (0)