1
0
Fork 0

Adding upstream version 3.3.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 19:59:26 +01:00
parent 0fde450255
commit 9804c00f84
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
4 changed files with 19 additions and 20 deletions

View file

@ -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:
---------

View file

@ -1 +1 @@
__version__ = "3.3.0"
__version__ = "3.3.1"

View file

@ -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

View file

@ -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",
]