From 94475e62833b5db67ca668b4b95390c4b35edd03 Mon Sep 17 00:00:00 2001 From: Dick Marinus Date: Sun, 11 Nov 2018 14:16:32 +0100 Subject: Require prompt_toolkit>=2.0.6. --- changelog.rst | 1 + pgcli/main.py | 9 +++------ setup.py | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/changelog.rst b/changelog.rst index 650599e1..4abcfc98 100644 --- a/changelog.rst +++ b/changelog.rst @@ -11,6 +11,7 @@ Internal: --------- * Clean up and add behave logging. (Thanks: `Dick Marinus`_) +* Require prompt_toolkit>=2.0.6. (Thanks: `Dick Marinus`_) 2.0.0: diff --git a/pgcli/main.py b/pgcli/main.py index ce3e88aa..5d6ff89f 100644 --- a/pgcli/main.py +++ b/pgcli/main.py @@ -529,13 +529,10 @@ class PGCli(object): raise RuntimeError(message) while True: try: - text = self.prompt_app.prompt( - default=sql, - vi_mode=self.vi_mode - ) + text = self.prompt_app.prompt(default=sql) break except KeyboardInterrupt: - sql = None + sql = "" editor_command = special.editor_command(text) return text @@ -633,7 +630,7 @@ class PGCli(object): try: while True: try: - text = self.prompt_app.prompt(vi_mode=self.vi_mode) + text = self.prompt_app.prompt() except KeyboardInterrupt: continue diff --git a/setup.py b/setup.py index 0985e87b..599c5c99 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ install_requirements = [ 'pgspecial>=1.11.2', 'click >= 4.1', 'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF? - 'prompt_toolkit>=2.0.0,<2.1.0', + 'prompt_toolkit>=2.0.6,<2.1.0', 'psycopg2 >= 2.7.4,<2.8', 'sqlparse >=0.2.2,<0.3.0', 'configobj >= 5.0.6', -- cgit v1.2.3