Merging upstream version 3.3.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e08682783a
commit
757ac3d28d
4 changed files with 19 additions and 20 deletions
|
@ -1,17 +1,15 @@
|
||||||
TBD
|
3.3.1 (2022/01/18)
|
||||||
================
|
==================
|
||||||
|
|
||||||
Features:
|
|
||||||
---------
|
|
||||||
|
|
||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
* Prompt for password when -W is provided even if there is a password in keychain. Fixes #1307.
|
||||||
|
* Upgrade cli_helpers to 2.2.1
|
||||||
|
|
||||||
|
|
||||||
3.3.0 (2022/01/11)
|
3.3.0 (2022/01/11)
|
||||||
================
|
==================
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
---------
|
---------
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = "3.3.0"
|
__version__ = "3.3.1"
|
||||||
|
|
|
@ -549,6 +549,17 @@ class PGCli:
|
||||||
- uninstall keyring: pip uninstall keyring
|
- uninstall keyring: pip uninstall keyring
|
||||||
- disable keyring in our configuration: add keyring = False to [main]"""
|
- disable keyring in our configuration: add keyring = False to [main]"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Prompt for a password immediately if requested via the -W flag. This
|
||||||
|
# avoids wasting time trying to connect to the database and catching a
|
||||||
|
# no-password exception.
|
||||||
|
# If we successfully parsed a password from a URI, there's no need to
|
||||||
|
# prompt for it, even with the -W flag
|
||||||
|
if self.force_passwd_prompt and not passwd:
|
||||||
|
passwd = click.prompt(
|
||||||
|
"Password for %s" % user, hide_input=True, show_default=False, type=str
|
||||||
|
)
|
||||||
|
|
||||||
if not passwd and keyring:
|
if not passwd and keyring:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -562,16 +573,6 @@ class PGCli:
|
||||||
fg="red",
|
fg="red",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Prompt for a password immediately if requested via the -W flag. This
|
|
||||||
# avoids wasting time trying to connect to the database and catching a
|
|
||||||
# no-password exception.
|
|
||||||
# If we successfully parsed a password from a URI, there's no need to
|
|
||||||
# prompt for it, even with the -W flag
|
|
||||||
if self.force_passwd_prompt and not passwd:
|
|
||||||
passwd = click.prompt(
|
|
||||||
"Password for %s" % user, hide_input=True, show_default=False, type=str
|
|
||||||
)
|
|
||||||
|
|
||||||
def should_ask_for_password(exc):
|
def should_ask_for_password(exc):
|
||||||
# Prompt for a password after 1st attempt to connect
|
# Prompt for a password after 1st attempt to connect
|
||||||
# fails. Don't prompt if the -w flag is supplied
|
# fails. Don't prompt if the -w flag is supplied
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -8,7 +8,7 @@ description = "CLI for Postgres Database. With auto-completion and syntax highli
|
||||||
install_requirements = [
|
install_requirements = [
|
||||||
"pgspecial>=1.11.8",
|
"pgspecial>=1.11.8",
|
||||||
"click >= 4.1",
|
"click >= 4.1",
|
||||||
"Pygments>=2.0,<=2.11.1", # Pygments has to be Capitalcased. WTF?
|
"Pygments>=2.0", # Pygments has to be Capitalcased. WTF?
|
||||||
# We still need to use pt-2 unless pt-3 released on Fedora32
|
# We still need to use pt-2 unless pt-3 released on Fedora32
|
||||||
# see: https://github.com/dbcli/pgcli/pull/1197
|
# see: https://github.com/dbcli/pgcli/pull/1197
|
||||||
"prompt_toolkit>=2.0.6,<4.0.0",
|
"prompt_toolkit>=2.0.6,<4.0.0",
|
||||||
|
@ -16,7 +16,7 @@ install_requirements = [
|
||||||
"sqlparse >=0.3.0,<0.5",
|
"sqlparse >=0.3.0,<0.5",
|
||||||
"configobj >= 5.0.6",
|
"configobj >= 5.0.6",
|
||||||
"pendulum>=2.1.0",
|
"pendulum>=2.1.0",
|
||||||
"cli_helpers[styles] >= 2.0.0",
|
"cli_helpers[styles] >= 2.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue