Skip to content

Commit 95e81fb

Browse files
committed
fix the byte2int import in tests.
1 parent 79716a5 commit 95e81fb

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

pymysqlreplication/row_event.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs)
593593
column_types = list(self.packet.read(self.column_count))
594594
self.packet.read_length_coded_binary()
595595
for i in range(0, len(column_types)):
596-
column_type = column_types[i]
596+
column_type = int(column_types[i])
597597
try:
598598
column_schema = self.column_schemas[ordinal_pos_loc]
599599

@@ -617,7 +617,7 @@ def __init__(self, from_packet, event_size, table_map, ctl_connection, **kwargs)
617617
'COLUMN_TYPE': 'BLOB', # we don't know what it is, so let's not do anything with it.
618618
'COLUMN_KEY': '',
619619
}
620-
col = Column(int(column_type), column_schema, from_packet)
620+
col = Column(column_type, column_schema, from_packet)
621621
self.columns.append(col)
622622

623623
self.table_obj = Table(self.column_schemas, self.table_id, self.schema,

pymysqlreplication/tests/binlogfilereader.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'''Read binlog files'''
22
import struct
33

4-
from pymysql.util import byte2int
4+
from six import byte2int
55
from pymysqlreplication import constants
66
from pymysqlreplication.event import FormatDescriptionEvent
77
from pymysqlreplication.event import QueryEvent

pymysqlreplication/tests/test_data_type.py

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
else:
99
import unittest
1010

11+
import json
1112
from decimal import Decimal
1213

1314
from pymysqlreplication.tests import base

0 commit comments

Comments
 (0)