diff --git a/aiotarantool_queue/queue.py b/aiotarantool_queue/queue.py index 619aaf1..6652fb8 100644 --- a/aiotarantool_queue/queue.py +++ b/aiotarantool_queue/queue.py @@ -7,7 +7,16 @@ import asyncio import aiotarantool -from tarantool.const import ENCODING_DEFAULT + +try: + # tarantool-python >= 0.6.1 + # + from tarantool.utils import ENCODING_DEFAULT +except ImportError: + # tarantool-python < 0.6.1 + # + from tarantool.const import ENCODING_DEFAULT + READY = "r" TAKEN = "t"