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
|
||||
================
|
||||
|
||||
Features:
|
||||
---------
|
||||
|
||||
3.3.1 (2022/01/18)
|
||||
==================
|
||||
|
||||
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)
|
||||
================
|
||||
==================
|
||||
|
||||
Features:
|
||||
---------
|
||||
|
|
|
@ -1 +1 @@
|
|||
__version__ = "3.3.0"
|
||||
__version__ = "3.3.1"
|
||||
|
|
|
@ -549,6 +549,17 @@ class PGCli:
|
|||
- uninstall keyring: pip uninstall keyring
|
||||
- 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:
|
||||
|
||||
try:
|
||||
|
@ -562,16 +573,6 @@ class PGCli:
|
|||
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):
|
||||
# Prompt for a password after 1st attempt to connect
|
||||
# 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 = [
|
||||
"pgspecial>=1.11.8",
|
||||
"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
|
||||
# see: https://github.com/dbcli/pgcli/pull/1197
|
||||
"prompt_toolkit>=2.0.6,<4.0.0",
|
||||
|
@ -16,7 +16,7 @@ install_requirements = [
|
|||
"sqlparse >=0.3.0,<0.5",
|
||||
"configobj >= 5.0.6",
|
||||
"pendulum>=2.1.0",
|
||||
"cli_helpers[styles] >= 2.0.0",
|
||||
"cli_helpers[styles] >= 2.2.1",
|
||||
]
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue