summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-22 06:36:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-01-22 06:36:58 +0000
commitfaa4e9a466ea6c602dc225ed5dc3725611aa70c0 (patch)
treed7fca2d6b8916c83bb4b9aa0b58c26ebc786a63e
parentReleasing debian version 3.3.0-1. (diff)
downloadpgcli-faa4e9a466ea6c602dc225ed5dc3725611aa70c0.tar.xz
pgcli-faa4e9a466ea6c602dc225ed5dc3725611aa70c0.zip
Merging upstream version 3.3.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--changelog.rst12
-rw-r--r--pgcli/__init__.py2
-rw-r--r--pgcli/main.py21
-rw-r--r--setup.py4
4 files changed, 19 insertions, 20 deletions
diff --git a/changelog.rst b/changelog.rst
index 7ce5132..d4bbd39 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -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:
---------
diff --git a/pgcli/__init__.py b/pgcli/__init__.py
index 88c513e..ff04168 100644
--- a/pgcli/__init__.py
+++ b/pgcli/__init__.py
@@ -1 +1 @@
-__version__ = "3.3.0"
+__version__ = "3.3.1"
diff --git a/pgcli/main.py b/pgcli/main.py
index 5395f67..e4a2ee3 100644
--- a/pgcli/main.py
+++ b/pgcli/main.py
@@ -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
diff --git a/setup.py b/setup.py
index 68260e0..0cbd192 100644
--- a/setup.py
+++ b/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",
]