提交 448ca8a4 编写于 作者: M minqiyang

Move LinkChecker from requirements to Dockerfile

Move six.moves.queue to Queue
上级 95e2d286
...@@ -80,7 +80,7 @@ RUN pip install pre-commit 'ipython==5.3.0' && \ ...@@ -80,7 +80,7 @@ RUN pip install pre-commit 'ipython==5.3.0' && \
pip install opencv-python pip install opencv-python
#For docstring checker #For docstring checker
RUN pip install pylint pytest astroid isort RUN pip install pylint pytest astroid isort LinkChecker
COPY ./python/requirements.txt /root/ COPY ./python/requirements.txt /root/
RUN pip install -r /root/requirements.txt RUN pip install -r /root/requirements.txt
......
...@@ -20,7 +20,7 @@ __all__ = [ ...@@ -20,7 +20,7 @@ __all__ = [
from threading import Thread from threading import Thread
import subprocess import subprocess
from six.moves import queue from six.moves.queue import Queue
import itertools import itertools
import random import random
import zlib import zlib
...@@ -190,7 +190,7 @@ def buffered(reader, size): ...@@ -190,7 +190,7 @@ def buffered(reader, size):
def data_reader(): def data_reader():
r = reader() r = reader()
q = queue(maxsize=size) q = Queue(maxsize=size)
t = Thread( t = Thread(
target=read_worker, args=( target=read_worker, args=(
r, r,
...@@ -293,8 +293,8 @@ def xmap_readers(mapper, reader, process_num, buffer_size, order=False): ...@@ -293,8 +293,8 @@ def xmap_readers(mapper, reader, process_num, buffer_size, order=False):
out_queue.put(end) out_queue.put(end)
def xreader(): def xreader():
in_queue = queue(buffer_size) in_queue = Queue(buffer_size)
out_queue = queue(buffer_size) out_queue = Queue(buffer_size)
out_order = [0] out_order = [0]
# start a read worker in a thread # start a read worker in a thread
target = order_read_worker if order else read_worker target = order_read_worker if order else read_worker
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册