From: Daniele Varrazzo Date: Wed, 30 Jun 2021 16:04:42 +0000 (+0100) Subject: More terse import error of the requested implementation X-Git-Tag: 3.0.dev1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b0eb6b9c2099565f816b017cbb1a2a3f77d16b2;p=thirdparty%2Fpsycopg.git More terse import error of the requested implementation --- diff --git a/psycopg/psycopg/pq/__init__.py b/psycopg/psycopg/pq/__init__.py index 74c279b92..50773d92e 100644 --- a/psycopg/psycopg/pq/__init__.py +++ b/psycopg/psycopg/pq/__init__.py @@ -51,11 +51,11 @@ def import_from_libpq() -> None: def handle_error(name: str, e: Exception) -> None: if not impl: - msg = f"error importing '{name}' wrapper: {e}" + msg = f"couldn't import psycopg '{name}' implementation: {e}" logger.debug(msg) attempts.append(msg) else: - msg = f"error importing requested '{name}' wrapper: {e}" + msg = f"couldn't import requested psycopg '{name}' implementation: {e}" raise ImportError(msg) from e # The best implementation: fast but requires the system libpq installed @@ -89,7 +89,7 @@ def import_from_libpq() -> None: Escaping = module.Escaping PGcancel = module.PGcancel elif impl: - raise ImportError(f"requested pq impementation '{impl}' unknown") + raise ImportError(f"requested psycopg impementation '{impl}' unknown") else: sattempts = "\n".join(f"- {attempt}" for attempt in attempts) raise ImportError(