Skip to content

Commit e8ccaa1

Browse files
john-bodleyJohn Bodley
andauthored
fix: Updating prompt-toolkit (#231)
Co-authored-by: John Bodley <[email protected]>
1 parent 498efca commit e8ccaa1

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pydruid/console.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import sys
44
from urllib import parse
55

6-
from prompt_toolkit import AbortAction, prompt
7-
from prompt_toolkit.contrib.completers import WordCompleter
6+
from prompt_toolkit import prompt
7+
from prompt_toolkit.completion.word_completer import WordCompleter
88
from prompt_toolkit.history import FileHistory
99
from pygments.lexers import SqlLexer
1010
from pygments.style import Style
@@ -174,9 +174,8 @@ def main():
174174
completer=sql_completer,
175175
style=DocumentStyle,
176176
history=history,
177-
on_abort=AbortAction.RETRY,
178177
)
179-
except EOFError:
178+
except (EOFError, KeyboardInterrupt):
180179
break # Control-D pressed.
181180

182181
# run query

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"pandas": ["pandas"],
99
"async": ["tornado"],
1010
"sqlalchemy": ["sqlalchemy"],
11-
"cli": ["pygments", "prompt_toolkit", "tabulate"],
11+
"cli": ["pygments", "prompt_toolkit>=2.0.0", "tabulate"],
1212
}
1313

1414
with io.open("README.md", encoding="utf-8") as f:

0 commit comments

Comments
 (0)