From f6b732c652e0b5a600ff0d3f60c6a34173d8d6a5 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Tue, 8 Nov 2022 18:09:54 +0100 Subject: [PATCH] MAINT: remove python 3.4 branch (#1061) --- jupyter_server/base/zmqhandlers.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/jupyter_server/base/zmqhandlers.py b/jupyter_server/base/zmqhandlers.py index 252bbba0de..91d0f12c8d 100644 --- a/jupyter_server/base/zmqhandlers.py +++ b/jupyter_server/base/zmqhandlers.py @@ -4,7 +4,6 @@ import json import re import struct -import sys from typing import Optional, no_type_check from urllib.parse import urlparse @@ -42,8 +41,6 @@ def serialize_binary_message(msg): # don't modify msg or buffer list in-place msg = msg.copy() buffers = list(msg.pop("buffers")) - if sys.version_info < (3, 4): - buffers = [x.tobytes() for x in buffers] bmsg = json.dumps(msg, default=json_default).encode("utf8") buffers.insert(0, bmsg) nbufs = len(buffers)