diff --git a/dvc/dagascii.py b/dvc/dagascii.py index 60eb27e17..8faa2c882 100644 --- a/dvc/dagascii.py +++ b/dvc/dagascii.py @@ -1,6 +1,5 @@ import sys import math -import select from grandalf.graphs import Vertex, Edge, Graph from grandalf.layouts import SugiyamaLayout @@ -8,6 +7,8 @@ from grandalf.routing import route_with_lines, EdgeViewer class AsciiCanvas(object): + TIMEOUT = 1 + def __init__(self, cols, lines): assert cols > 1 assert lines > 1 @@ -64,7 +65,13 @@ class AsciiCanvas(object): # NOTE: get_event() doesn't block by itself, # so we have to do the blocking ourselves. - select.select([sys.stdin], [], [], None) + # + # NOTE: using formally private method while waiting for PR [1] + # to get merged. After that need to adjust asciimatics version + # requirements. + # + # [1] https://github.com/peterbrittain/asciimatics/pull/188 + screen._wait_for_input(self.TIMEOUT) event = screen.get_event() if not isinstance(event, KeyboardEvent): diff --git a/requirements.txt b/requirements.txt index a0922bbe0..daae76efe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,5 +22,5 @@ wheel>=0.31.1 futures>=3.2.0; python_version == "2.7" grandalf==0.6 pydot>=1.2.4 -asciimatics>=1.10.0 +asciimatics==1.10.0 distro>=1.3.0 diff --git a/setup.py b/setup.py index 708f83b5e..7f4a5e307 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ install_requires = [ "jsonpath-rw==1.4.0", "requests>=2.18.4", "grandalf==0.6", - "asciimatics>=1.10.0", + "asciimatics==1.10.0", "distro>=1.3.0", ]