From f28e17c2fbd3a9208bc7c8aa860ce6f9a4d97ed9 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Mon, 2 Aug 2021 11:34:01 +0200 Subject: [PATCH] Fix returning connection params in get_parameters() with empty default "options" and "tty" were returned even if they were set to their default. --- psycopg/psycopg/conninfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psycopg/psycopg/conninfo.py b/psycopg/psycopg/conninfo.py index 3d665c94b..9dfff1339 100644 --- a/psycopg/psycopg/conninfo.py +++ b/psycopg/psycopg/conninfo.py @@ -170,7 +170,7 @@ class ConnectionInfo: defaults = { i.keyword: i.compiled for i in pq.Conninfo.get_defaults() - if i.compiled + if i.compiled is not None } # Not returned by the libq. Bug? Bet we're using SSH. defaults.setdefault(b"channel_binding", b"prefer") -- 2.47.3