diff --git a/beta/api/coincheck/vncoincheck.py b/beta/api/coincheck/vncoincheck.py index a1920380..9f823b62 100644 --- a/beta/api/coincheck/vncoincheck.py +++ b/beta/api/coincheck/vncoincheck.py @@ -10,7 +10,7 @@ import hmac import time from datetime import datetime from time import time, sleep , mktime -from Queue import Queue, Empty +from queue import Queue, Empty from threading import Thread import urllib import websocket diff --git a/beta/api/korbit/vnkorbit.py b/beta/api/korbit/vnkorbit.py index 41d83c24..2c1d945b 100644 --- a/beta/api/korbit/vnkorbit.py +++ b/beta/api/korbit/vnkorbit.py @@ -11,7 +11,7 @@ import hmac import time from datetime import datetime from time import time, sleep , mktime -from Queue import Queue, Empty +from queue import Queue, Empty from threading import Thread import urllib import websocket diff --git a/beta/api/zaif/vnzaif.py b/beta/api/zaif/vnzaif.py index ffd46980..48404ec7 100644 --- a/beta/api/zaif/vnzaif.py +++ b/beta/api/zaif/vnzaif.py @@ -10,7 +10,7 @@ import hmac import time from datetime import datetime from time import time, sleep , mktime -from Queue import Queue, Empty +from queue import Queue, Empty from threading import Thread import urllib diff --git a/beta/gateway/coincheckGateway/coincheckGateway.py b/beta/gateway/coincheckGateway/coincheckGateway.py index 96ce0b67..b5269764 100644 --- a/beta/gateway/coincheckGateway/coincheckGateway.py +++ b/beta/gateway/coincheckGateway/coincheckGateway.py @@ -9,7 +9,7 @@ import json from datetime import datetime from copy import copy from threading import Condition -from Queue import Queue +from queue import Queue from threading import Thread import json diff --git a/beta/gateway/korbitGateway/korbitGateway.py b/beta/gateway/korbitGateway/korbitGateway.py index 07928757..d566e2b7 100644 --- a/beta/gateway/korbitGateway/korbitGateway.py +++ b/beta/gateway/korbitGateway/korbitGateway.py @@ -9,7 +9,7 @@ import json from datetime import datetime from copy import copy from threading import Condition -from Queue import Queue +from queue import Queue from threading import Thread import json diff --git a/beta/gateway/zbGateway/zbGateway.py b/beta/gateway/zbGateway/zbGateway.py index 839cea06..d7935c37 100644 --- a/beta/gateway/zbGateway/zbGateway.py +++ b/beta/gateway/zbGateway/zbGateway.py @@ -10,7 +10,7 @@ from datetime import datetime from time import sleep from copy import copy from threading import Condition -from Queue import Queue +from queue import Queue from threading import Thread from time import sleep diff --git a/beta/quantos/app/jaqsService/jrpc_server.py b/beta/quantos/app/jaqsService/jrpc_server.py index a80edda3..7c03adf7 100644 --- a/beta/quantos/app/jaqsService/jrpc_server.py +++ b/beta/quantos/app/jaqsService/jrpc_server.py @@ -1,6 +1,6 @@ from __future__ import print_function import zmq -import Queue +import queue import threading import msgpack import snappy @@ -37,7 +37,7 @@ class JRpcServer : self._should_close = False self._send_lock = threading.Lock() - self._callback_queue = Queue.Queue() + self._callback_queue = queue.Queue() self._ctx = zmq.Context() self._pull_sock = self._ctx.socket(zmq.PULL) @@ -121,7 +121,7 @@ class JRpcServer : r = self._callback_queue.get(timeout = 1) if r : r() - except Queue.Empty as e: + except queue.Empty as e: pass except Exception as e: diff --git a/beta/quantos/tkproGateway/DataApi/jrpc_py.py b/beta/quantos/tkproGateway/DataApi/jrpc_py.py index da3cd059..4b7cb060 100644 --- a/beta/quantos/tkproGateway/DataApi/jrpc_py.py +++ b/beta/quantos/tkproGateway/DataApi/jrpc_py.py @@ -9,10 +9,7 @@ import zmq import time import random -try: - import queue -except ImportError: - import queue as queue +import queue import threading import msgpack import snappy diff --git a/beta/quantos/tkproGateway/TradeApi/jrpc_py.py b/beta/quantos/tkproGateway/TradeApi/jrpc_py.py index 5d9ff0af..a7091f0a 100644 --- a/beta/quantos/tkproGateway/TradeApi/jrpc_py.py +++ b/beta/quantos/tkproGateway/TradeApi/jrpc_py.py @@ -10,10 +10,7 @@ from builtins import * import zmq -try: - import queue -except ImportError: - import queue as queue +import queue import threading import msgpack import snappy diff --git a/vnpy/api/lbank/vnlbank.py b/vnpy/api/lbank/vnlbank.py index 1d04ecf6..c24160cd 100644 --- a/vnpy/api/lbank/vnlbank.py +++ b/vnpy/api/lbank/vnlbank.py @@ -8,7 +8,7 @@ import json import traceback import requests -from Queue import Queue, Empty +from queue import Queue, Empty from threading import Thread from multiprocessing.dummy import Pool from time import time diff --git a/vnpy/trader/app/dataRecorder/drEngine.py b/vnpy/trader/app/dataRecorder/drEngine.py index dee29801..8a84305f 100644 --- a/vnpy/trader/app/dataRecorder/drEngine.py +++ b/vnpy/trader/app/dataRecorder/drEngine.py @@ -13,7 +13,7 @@ import copy import traceback from collections import OrderedDict from datetime import datetime, timedelta, time -from Queue import Queue, Empty +from queue import Queue, Empty from threading import Thread from pymongo.errors import DuplicateKeyError