diff options
author | 赖信涛 <laixintao@users.noreply.github.com> | 2020-04-06 11:56:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-05 20:56:31 -0700 |
commit | b6e2a229e5f122a9efa31666dee7965621eff031 (patch) | |
tree | 999e6c244bd8171a61771e3312fe41a89d7429f7 | |
parent | 93c14f844ee33e4d47ae07688f0e5ca7219df7de (diff) |
upgrade prompt-toolit to 3.0 (#1149)
* upgrade prompt-toolit to 3.0
fix: https://github.com/dbcli/pgcli/issues/1148
related:
https://github.com/prompt-toolkit/python-prompt-toolkit/issues/886
in order to make the `behave` test pass, I have to:
- extend timeout for database connection test.
- extend timeout for basic command expect.
- extend timeout for features/steps/crud_table.py:: see data selected.
- disable cpr for features but "run the cli"
* [ci] disable CPR for all behave tests.
* bugfix: remove duplicated prompt expect.
* [ci] delete CPR env setting.
* Revert "[ci] delete CPR env setting."
This reverts commit fe4d5b565e01be6237b6df646429d26eaa0c6d92.
* revert the extending timeout back.
* [ci] test when didn't disable CPR.
* Revert "[ci] test when didn't disable CPR."
This reverts commit d379b1e736dcc6623ba53fc3d4e6f095fd3e8344.
-rw-r--r-- | changelog.rst | 1 | ||||
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | tests/features/environment.py | 1 | ||||
-rw-r--r-- | tests/features/steps/basic_commands.py | 1 |
4 files changed, 3 insertions, 2 deletions
diff --git a/changelog.rst b/changelog.rst index 9972583a..d638e53d 100644 --- a/changelog.rst +++ b/changelog.rst @@ -19,6 +19,7 @@ Internal: * Drop Python2.7, 3.4, 3.5 support. (Thanks: `laixintao`_) * Support Python3.8. (Thanks: `laixintao`_) * Fix dead link in development guide. (Thanks: `BrownShibaDog`_) +* Upgrade python-prompt-toolkit to v3.0. (Thanks: `laixintao`_) 2.2.0: @@ -9,7 +9,7 @@ install_requirements = [ "pgspecial>=1.11.8", "click >= 4.1", "Pygments >= 2.0", # Pygments has to be Capitalcased. WTF? - "prompt_toolkit>=2.0.6,<3.0.0", + "prompt_toolkit>=3.0.0,<4.0.0", "psycopg2 >= 2.8", "sqlparse >=0.3.0,<0.4", "configobj >= 5.0.6", diff --git a/tests/features/environment.py b/tests/features/environment.py index 4e7e601e..049c2f23 100644 --- a/tests/features/environment.py +++ b/tests/features/environment.py @@ -20,6 +20,7 @@ def before_all(context): os.environ["PAGER"] = "cat" os.environ["EDITOR"] = "ex" os.environ["VISUAL"] = "ex" + os.environ["PROMPT_TOOLKIT_NO_CPR"] = "1" context.package_root = os.path.abspath( os.path.dirname(os.path.dirname(os.path.dirname(__file__))) diff --git a/tests/features/steps/basic_commands.py b/tests/features/steps/basic_commands.py index 0c42ae0e..52e432a6 100644 --- a/tests/features/steps/basic_commands.py +++ b/tests/features/steps/basic_commands.py @@ -91,7 +91,6 @@ def step_send_partial_select_command(context): @then("we see error message") def step_see_error_message(context): wrappers.expect_exact(context, 'column "a" does not exist', timeout=2) - wrappers.wait_prompt(context) @when("we send source command") |