From cb33676fb9cf830c918ee61e09b532fa4aff60a1 Mon Sep 17 00:00:00 2001 From: Sergey Bronnikov Date: Wed, 25 Nov 2020 11:21:20 +0300 Subject: [PATCH 1/2] test: make print calls compatible with Python 3.x In a Python 3 'print' becomes a function, see [1]. Patch makes print calls compatible with Python 3. 1. https://docs.python.org/3/whatsnew/3.0.html#print-is-a-function --- test/cluster-py/multi.test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cluster-py/multi.test.py b/test/cluster-py/multi.test.py index 9cc42413..0db520b0 100644 --- a/test/cluster-py/multi.test.py +++ b/test/cluster-py/multi.test.py @@ -18,11 +18,11 @@ def check_connection(con): try: s = con.space('test') - print s.select() + print(s.select()) except NetworkError: - print 'NetworkError !' + print('NetworkError !') except Exception as e: - print e + print(e) # Start instances From 7a870fa9fbd30ddf99a35ad7a9746085d4049184 Mon Sep 17 00:00:00 2001 From: Sergey Bronnikov Date: Wed, 25 Nov 2020 11:33:41 +0300 Subject: [PATCH 2/2] make exec call compatible with Python 3.x exec was a statement in Python 2.x [1] and it has been converted to a function in Python 3.x [2], change introduced in version 3.0 [3]. 1. https://docs.python.org/2/reference/simple_stmts.html#exec 2. https://docs.python.org/3/library/functions.html#exec 3. https://docs.python.org/3/whatsnew/3.0.html --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 9606067f..91da1f1b 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -21,7 +21,7 @@ # Read package version without importing it for line in open(os.path.join(os.path.dirname(os.path.abspath('.')), "tarantool", "__init__.py")): if line.startswith("__version__"): - exec line + exec(line) break # -- General configuration -----------------------------------------------------