1
0
Fork 0
Commit Graph

296 Commits

Author SHA1 Message Date
Igor Kim b994c75701
Update python version from 2.7 to 3.8 in Dockerfile (#1181)
* Update python version from 2.7 to 3.8 in Dockerfile

* Update AUTHORS and changelog.rst
2020-05-11 09:51:23 -07:00
pmav99 bcb0c8bce7
Add support for using pspg as the pager. (#1173)
* Stop printing "status" when table_format is "csv"

* Use the "unix" dialect on *nix for CSV output.

* Use a pager when `pspg` has been configured with CSV "table_format".

Fix #1102
2020-04-23 10:17:40 -07:00
Amjith Ramanujam 3071de14f5 Update changelog for the compact output. 2020-04-18 19:08:07 -07:00
Stephano Paraskeva 936475258d
show_bottom_toolbar - Feature to Show/Hide Toolbar (#1170)
* adds ternary to decide whether bottom_toolbar is shown based on config value

* runs black format

* adds name to authors

* modifies changelog.rst

* removes change in changelog.rst

* formats config

* removes unused variable, adds change to changelog

* changes default back to true

* removed reference to var
2020-04-17 22:58:13 -07:00
g.denis f3ac559844
Add pg_service.conf handling (#1155)
* add parse_service_info

* added tests

* changelog + AUTHORS

* py35
2020-04-17 14:52:19 -07:00
Irina Truong 63b87ba3a8
New release 3.0.0. (#1165) 2020-04-10 15:14:56 -07:00
赖信涛 b6e2a229e5
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 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.
2020-04-05 20:56:31 -07:00
赖信涛 e9874e2f96
python3.8: add travis test and setup.py class. (#1157) 2020-03-18 09:11:10 -07:00
g.denis 0f3d4602ef
Fix: Unable to drop previously connected-to database (#1152)
* close connections + added to authors + changelog

* check conn exists
2020-03-12 13:45:59 -07:00
赖信涛 bc7a5d0100
Drop Python3.5. (#1154)
* Drop Python3.5.

* delete 3.5 from setup.py

* fix black format. Using python3.7 for development now.

* black target to py36
2020-03-11 13:58:13 -07:00
赖信涛 fd77549754
Deprecate Python2.7. (#1153)
* 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.
2020-03-09 20:14:51 -07:00
lazydba247 91263c37b9
Add Support for partitioned tables. (#1145)
* partitioned tables: add support

Starting from 9.6+ relkind has new members (more info here: https://www.postgresql.org/docs/12/catalog-pg-class.html)

* Update AUTHORS

* Update changelog.rst

* foreign tables: add support

Starting from 9.6+ relkind has new members (more info here: https://www.postgresql.org/docs/12/catalog-pg-class.html)
2020-02-13 14:24:37 -08:00
赖信涛 8fe316e537 Drop Python 3.4 support (#1141)
* remove python3.4 support.

Python 3.4 has reached end-of-life.
https://www.python.org/downloads/release/python-340/

* drop maximun version of pytest

* update changelog

* add laixintao to contributors, delete py34 from tox
2020-01-15 22:45:16 -08:00
George Thomas 77a361966a Fix warning raised for using `is not` to compare string literal (#1139)
Using `is not` for comparing string literals raises warning that != should be
used.

Fixes #1138
2020-01-14 20:56:07 -08:00
Amjith Ramanujam c74bfe37ac
Merge branch 'master' into main-file 2020-01-07 06:55:17 -08:00
BrownShibaDog eb2718ba05 Add my name to changelog. 2020-01-03 08:50:34 +09:00
BrownShibaDog cc27ec3b9a Add lines to changelog.rst. 2020-01-01 21:48:32 +09:00
Jonas Jelten bc66b85730 add main file to allow python3 -m pgcli execution 2019-12-19 00:18:14 +01:00
Amjith Ramanujam 901812a7bf
Merge pull request #1122 from TheJJ/prompt-colors
support ansi escape sequences for prompt colors
2019-12-08 19:19:43 -08:00
Irina Truong 51d4d4a04c
J bennet/release 2.2.0 (#1126)
* Changelog.

* Bump pgspecial.

* Restrict prompt_toolkit to <3.0.0.
2019-12-04 09:24:17 -08:00
Jonas Jelten 36605174a4 support ansi escape sequences for prompt colors 2019-11-25 22:51:15 +01:00
Irina Truong d758781858 Changelog. 2019-10-28 09:19:59 -07:00
Irina Truong 76133a3740 Changelog. 2019-10-26 13:22:54 -07:00
Amjith Ramanujam a713b5d08b
Merge pull request #1107 from owst/function_arg_completions_with_alias
Take account of table aliases when completing function args (#1048)
2019-10-16 20:57:19 -07:00
Owen Stephens 629a931aed fixup! fixup! Handle a multi-line query on Enter key-press (fixes #1031) 2019-10-16 22:26:25 +01:00
Owen Stephens 7f44748149 Handle a multi-line query on Enter key-press (fixes #1031)
Use a (conditional) Enter key-binding to force-handle a multi-line
buffer, rather than doing so by (conditionally) disabling the multiline
mode of prompt_toolkit.

This has the benefit of being more efficient (the multiline Condition
filter is called very often, which (due to the repeated query parsing)
causes editing to become slow with a large buffer that ends in a
semicolon), clearer in intent (we want to force-handle the query, rather
than (temporarily) disable multiline mode which indirectly forces the
buffer to be handled) and avoids a bug in multi-line history search
(issue #1031)
2019-10-13 01:07:57 +01:00
Owen Stephens b401b16d9a Take account of table aliases when completing function args (#1048) 2019-10-12 16:19:15 +01:00
Dick Marinus 67799b98ab add optional but default squash merge request to PULL_REQUEST_TEMPLATE (#1095) 2019-09-27 19:34:34 -07:00
Irina Truong 2e6ef5a84d Changelog. 2019-09-02 12:35:49 -07:00
Irina Truong b2ebe0e95c
Issue 1018 display first 1k rows (#1092)
* 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
2019-08-23 13:44:36 -07:00
Pedro Ferrari 19c3e0eeb8 Add key bindings to consistently move up and down in history (#1084) 2019-07-29 13:00:33 -07:00
Sebastian Janko f85642da67 Issue 1019 stacktrace on empty query (#1078)
* Added changes to skip empty queries

Empty queries consist of one or more semicolons

* Reformatted with black

* Added contribution to changelog and name to AUTHORS

* Black.
2019-07-12 17:24:39 -07:00
Irina Truong 10cc4ce2b9 Partial fix for #1058. (#1068) 2019-06-09 17:05:28 +02:00
Amjith Ramanujam f27ac1c110
Merge pull request #1064 from dbcli/amjith/slash-G
Add \G as a temporary way to use expanded mode.
2019-06-03 17:12:38 -07:00
Pablo 6d6ab3dab7 Add keybinding for alt-enter to introduce a line break (#1065)
* Add keybinding for alt-enter to introduce a line break.

* Update changelog.

* Added myself to AUTHORS file

* Fixed quote issue by pre-commit
2019-06-02 19:15:16 -07:00
Amjith Ramanujam d4f4cc317d Update changelog. 2019-06-02 17:59:31 -07:00
Irina Truong a2ed5e46d1
Changelog update before release. (#1062) 2019-05-30 17:10:15 -07:00
Alexander Zawadzki df4dd00585 README.rst: tidy up redundant instructions (#1061)
* README.rst: tidy up redundant instructions 

Remove the README section which detailed how to force `psycopg2` 2.7 dependency installation from source rather than binary.

`psycopg2` 2.7 would automatically favour installation from binary. A bug affecting some users made it desirable to have the option to install from source instead. The README detailed how to do this using pip's `--no-binary` option (nice!).

`psycopg2` 2.8 has now split the binary and source dependencies into different packages with different names (source: [psycopg2 docs](http://initd.org/psycopg/docs/install.html#change-in-binary-packages-between-psycopg-2-7-and-2-8)) which makes the `--no-binary` instructions redundant. To specify source/binary you now need to explicitly specify the desired package.

As of #1060, installing `pgcli` from pip will result in the installation of `psycopg2` 2.8 from source.

* README: additional instructions for psycopg2 2.7 users

Anyone limited to psycopg2 2.7 may still encounter some known issues when installing from binary.
Add a link to the README to acknowledge this, and help those users install it from source.

* Update changelog.rst

* Update AUTHORS

* Update changelog
2019-05-30 10:03:47 -07:00
Telmo "Trooper 8c597751fd Allow psycopg2 up to 2.8.2 (#1060)
* Allow psycopg2 up to 2.8.2

This fixes the issue with pgcli not working on Arch Linux, since the package `python2-psycopg2` is already on 2.8.2.

* Added name to 'AUTHORS' and contribution to 'changelog.rst' referring to #2de6266

* Allow for newer versions of psycopg2 to be used
2019-05-29 21:14:32 -07:00
Irina Truong 8cb7009bcd
black all the things. (#1049)
* 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.
2019-05-25 13:08:56 -07:00
Irina Truong 300febccdd Dsn parameters not always present. (#1054)
* Dsn parameters not always present.
2019-05-11 07:57:45 +02:00
Amjith Ramanujam fe1b202c55
Merge branch 'master' into pr1047 2019-05-06 11:11:47 -07:00
Amjith Ramanujam dc43430a9a Update changelog. 2019-05-06 07:29:48 -07:00
Irina Truong f1fc864281 changelog. 2019-05-04 07:33:28 -04:00
VVelox 1421da3c33
Update changelog.rst 2019-05-03 04:24:27 -05:00
zzl 6d1b653e24 lazy load keyring. (#1046)
fix issue: https://github.com/dbcli/pgcli/issues/1041
2019-05-01 08:53:55 -07:00
Irina Truong 3fd91012f2
More intelligent dsn format (#1045)
* Psycopg2 already has a method to format a dsn. We should use it. Fix for #1043.

* Changelog.

* pep8.
2019-04-28 15:06:01 -07:00
Irina Truong 9a53fe859a Possibly fix #1040. (#1042)
Fix #1040
2019-04-28 08:00:40 +02:00
raylu eef0e0d65c Allow application_name to be overridden (#1044)
* Allow application_name to be overridden

* Fixed broken link.

* Default password value is empty str?

* Make pep8 happier.
2019-04-27 21:25:19 -06:00
Nathan Vērzemnieks 4af4e33e31 Allow escape to switch to vi navigation mode (#1039) 2019-04-13 13:22:03 -07:00