Skip to content

Commit b9b241b

Browse files
committed
Fix: modify the typing of allowed_events_in_packet
1 parent 0feea62 commit b9b241b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: pymysqlreplication/binlogstream.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
from pymysql.cursors import Cursor, DictCursor
99
from pymysql.connections import Connection, MysqlPacket
1010

11+
from . import event
1112
from .constants.BINLOG import TABLE_MAP_EVENT, ROTATE_EVENT, FORMAT_DESCRIPTION_EVENT
1213
from .event import (
13-
QueryEvent, RotateEvent, FormatDescriptionEvent,
14+
BinLogEvent, QueryEvent, RotateEvent, FormatDescriptionEvent,
1415
XidEvent, GtidEvent, StopEvent, XAPrepareEvent,
1516
BeginLoadQueryEvent, ExecuteLoadQueryEvent,
1617
HeartbeatLogEvent, NotImplementedEvent, MariadbGtidEvent,
@@ -212,7 +213,7 @@ def __init__(self, connection_settings: Dict, server_id: int,
212213

213214
# We can't filter on packet level TABLE_MAP and rotate event because
214215
# we need them for handling other operations
215-
self.__allowed_events_in_packet: FrozenSet[str] = frozenset(
216+
self.__allowed_events_in_packet: FrozenSet[Type[BinLogEvent]] = frozenset(
216217
[TableMapEvent, RotateEvent]).union(self.__allowed_events)
217218

218219
self.__server_id: int = server_id

0 commit comments

Comments
 (0)