From 583673760431b054f8244473b09b29546e5125e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Can=20G=C3=BCney=20Aksakalli?= Date: Mon, 14 Jul 2025 23:41:49 +0200 Subject: [PATCH] rm python 2 compability MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Can Güney Aksakalli --- openlr/openlr_bytes_io.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/openlr/openlr_bytes_io.py b/openlr/openlr_bytes_io.py index f84b7ca..096f78a 100644 --- a/openlr/openlr_bytes_io.py +++ b/openlr/openlr_bytes_io.py @@ -23,7 +23,6 @@ from openlr.utils import j_round, sgn -PY2 = sys.version_info[0] == 2 DECA_MICRO_DEG_FACTOR = 100000.0 DISTANCE_PER_INTERVAL = 58.6 BEAR_SECTOR = 11.25 @@ -117,14 +116,6 @@ def int_to_bytes(val, size=3, signed=True): class OpenLRBytesIO(BytesIO): """In-memory binary stream for reading/writing OpenLR data""" - def read(self, size=-1): - """Python 2 compatibility for str -> bytes""" - bytes = super(OpenLRBytesIO, self).read(size) - if PY2: - return bytearray(bytes) - else: - return bytes - def read_status(self): """Reads status from the first byte: version & location type