From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp34.i.mail.ru (smtp34.i.mail.ru [94.100.177.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 09F3645C304 for ; Tue, 15 Dec 2020 14:56:16 +0300 (MSK) References: From: Leonid Vasiliev Message-ID: <7ad65976-902f-8936-cb85-4232ff7ffce3@tarantool.org> Date: Tue, 15 Dec 2020 14:55:15 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 3/4] test: make convert to hex compatible with Python 3.x List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: sergeyb@tarantool.org, tarantool-patches@dev.tarantool.org, v.shpilevoy@tarantool.org, imun@tarantool.org Cc: alexander.turenko@tarantool.org Hi! Thank you for the patch. On 11.12.2020 11:42, Sergey Bronnikov via Tarantool-patches wrote: > From: Sergey Bronnikov > > Part of #5538 > --- > test/box-py/iproto.test.py | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/test/box-py/iproto.test.py b/test/box-py/iproto.test.py > index 25ead43c4..72400923c 100644 > --- a/test/box-py/iproto.test.py > +++ b/test/box-py/iproto.test.pyHi > @@ -191,7 +191,11 @@ for test in TESTS: > print("STR", size) > print("--") > for fmt in it: > - print("0x" + fmt.encode("hex"), "=>", end=" ") > + try: > + # Python 3 > + print("0x" + "hex".encode("utf-8").hex(), "=>", end=" ") Maybe fmt.encode("utf-8").hex()? Please, add a comment that describing the difference between python2 and python3 in this print. > + except AttributeError: > + print("0x" + fmt.encode("hex"), "=>", end=" ") > field = "*" * size > c._send_request(RawInsert(c, space_id, "\x91" + fmt + field)) > tuple = space.select(field)[0] >