From e53b2bebf51768eebf4c7445dbfc5f663374bfdd Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 3 Jul 2022 00:21:54 +0100 Subject: [PATCH] fix; drop check for libpq < 10 to use hostaddr Hostaddr has been always available (seen in 7.2 documentation...). --- psycopg/psycopg/_dns.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/psycopg/psycopg/_dns.py b/psycopg/psycopg/_dns.py index 2ac752bb0..710113843 100644 --- a/psycopg/psycopg/_dns.py +++ b/psycopg/psycopg/_dns.py @@ -23,7 +23,6 @@ except ImportError: "the module psycopg._dns requires the package 'dnspython' installed" ) -from . import pq from . import errors as e if TYPE_CHECKING: @@ -67,10 +66,6 @@ async def resolve_hostaddr_async(params: Dict[str, Any]) -> Dict[str, Any]: # Already resolved return params - if pq.version() < 100000: - # hostaddr not supported - return params - host_arg: str = params.get("host", os.environ.get("PGHOST", "")) if not host_arg: # Nothing to resolve -- 2.47.3