* fixing test_config.py to work on windows
* Getting rid of odd characters in wrappager.py
* added a space to a comment to try to kick the github workflow.
Co-authored-by: Eric Young <YoungEricR@JohnDeere.com>
1. `class A(object)` can be written as `class A:`
2. replace `dict([…])` and `set([…])` with `{…}`
3. use f-strings or compact `.format`
4. use `yield from` instead of `yield` in a `for` loop
5. import `mock` from `unittest`
6. expect `OSError` instead of `IOError` or `select` error
7. use Python3 defaults for file reading or `super()`
8. remove redundant parenthesis (keep those in tuples though)
9. shorten set intersection instead of creating lists
10. backslashes in strings do not have to be escaped if prepended with `r`
* 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 fe4d5b565e.
* revert the extending timeout back.
* [ci] test when didn't disable CPR.
* Revert "[ci] test when didn't disable CPR."
This reverts commit d379b1e736.
* deprecate Python2.7.
So we can use latest version of prompt-toolit.
Relate: https://github.com/dbcli/pgcli/pull/1149
* black format, remove 2.7 support.
* using version py35 for black.
* Revert "black format, remove 2.7 support."
This reverts commit 4b6d0496cc.
* deprecated py27 using black.
* remove 2.7 from travis.
* update setup.py: delete python 2.7 support.
* Added changes to remove the prompt on >1000 rows queries
* Reformatted with black
* Changed comment on row_limit parameter
* Added contribution to changelog and name to AUTHORS
* Refactored test to reflect new functionality
* Removed argument
* Removed debug echo statement
* Reformatted with black
* Added changes to remove the prompt on >1000 rows queries
* Reformatted with black
* Changed comment on row_limit parameter
* Added contribution to changelog and name to AUTHORS
* Refactored test to reflect new functionality
* Removed argument
* Removed debug echo statement
* Reformatted with black
* Added missing issue numbers in changelog
* Reformatted code using black
* added black to develop guide
* no need for pep8radius.
* changelog.
* Add pre-commit checkbox.
* Add pre-commit to dev reqs.
* Add pyproject.toml for black.
* Pre-commit config.
* Add black to travis and dev reqs.
* Install and run black in travis.
* Remove black from dev reqs.
* Lower black target version.
* Re-format with black.
* Switch to psycopg2 parse_dsn instead of urlparse
* Added wronglink to contributors and updated changelog
* Fix test codestyle
* Support for PGPORT customization in tests
* Support for PGPORT customization in tests
* Refactored PGExecute init and moved short_host generation to object property
* Fix test util codestyle
* Fix local tests run
* Store PGExecute initial params in _conn_params and added PGExecute.copy method
* Fix codestyle
* Added docstring to PGExecute.copy() method
* Cherry-picked prompt-toolkit 2.0 changes.
* Increase help timeout.
* Missed one.
* Fixes editor command.
* Expect exact to fix named query error.
* Unicode is non-optional with ptk 2.0.
* Unicode literals all the things (almost).
* PEP8.
* Change how we swap completers.
* By default, bottom toolbar styles are reversed. We don't want that.
* Adapt styles to 2.0.
* The future is now. Switch to ptk 2.0 style names.
* PEP8.
* Flag for enable_open_in_editor.
* add class:prompt to prompt
* Removed workaround for #668. Some renaming.
* use pgcli.completer instead of app.current_buffer.completer
* enable_system_prompt=True like old prompt toolkit
* keep search_ignore_case enabled (was ignore_case)
* fix closing parenthese
* keep marking class:continuation token for continuation
* capture KeyboardInterrupt manually
AbortAction has been removed in Prompt_toolkit 2.0
* replace C-J with enter, add more comments
* reversed ([...]) to [(...)] (oops)
* pep8 fixes
* Does Vi mode have to be applied to session every time?
* (workaround) also enable vi_mode after edit command
* Fixed test errors after rebasing on master.
"\pset pager" has three possible values: "always", "on", and "off".
pgcli previously treated all non-"off" values as "always". This change
implements the expected behavior, which is to use the pager when the
output is larger than the terminal height (See \pset pager in
https://www.postgresql.org/docs/9.2/static/app-psql.html). Pgcli adds to
this by also using the pager when the output is wider than the terminal
width.
Fixes#813