From 8530c749afa546833cdf16cc2b5f46683a6a7611 Mon Sep 17 00:00:00 2001 From: jongwony Date: Thu, 14 Jan 2021 15:55:07 +0900 Subject: [PATCH 1/2] Removed byte2int, int2byte PyMySQL 1.0.0 removed pymysql.util --- pymysqlreplication/binlogstream.py | 7 +++---- pymysqlreplication/event.py | 8 +++----- pymysqlreplication/packet.py | 8 +++----- pymysqlreplication/row_event.py | 7 +++---- pymysqlreplication/tests/binlogfilereader.py | 3 +-- 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/pymysqlreplication/binlogstream.py b/pymysqlreplication/binlogstream.py index 7d9d3121..4e9537fa 100644 --- a/pymysqlreplication/binlogstream.py +++ b/pymysqlreplication/binlogstream.py @@ -6,7 +6,6 @@ from pymysql.constants.COMMAND import COM_BINLOG_DUMP, COM_REGISTER_SLAVE from pymysql.cursors import DictCursor -from pymysql.util import int2byte from .packet import BinLogPacketWrapper from .constants.BINLOG import TABLE_MAP_EVENT, ROTATE_EVENT @@ -109,7 +108,7 @@ def encoded(self, server_id, master_id=0): MAX_STRING_LEN = 257 # one byte for length + 256 chars return (struct.pack(' Date: Thu, 14 Jan 2021 17:15:58 +0900 Subject: [PATCH 2/2] byte character to int --- pymysqlreplication/tests/binlogfilereader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymysqlreplication/tests/binlogfilereader.py b/pymysqlreplication/tests/binlogfilereader.py index 75a35729..6ed22388 100644 --- a/pymysqlreplication/tests/binlogfilereader.py +++ b/pymysqlreplication/tests/binlogfilereader.py @@ -112,7 +112,7 @@ def __init__(self, header): '''Initialize the Event with the event header''' unpacked = struct.unpack('