From: Daniele Varrazzo Date: Fri, 14 May 2021 21:18:38 +0000 (+0200) Subject: Fix a couple of imports as relative X-Git-Tag: 3.0~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fb4c7655da2b576f182e07a5ba249a8ae3d1c323;p=thirdparty%2Fpsycopg.git Fix a couple of imports as relative --- diff --git a/psycopg/psycopg/pq/_pq_ctypes.py b/psycopg/psycopg/pq/_pq_ctypes.py index 4faefe4b0..79d6d9a59 100644 --- a/psycopg/psycopg/pq/_pq_ctypes.py +++ b/psycopg/psycopg/pq/_pq_ctypes.py @@ -11,7 +11,7 @@ from ctypes import Structure, CFUNCTYPE, POINTER from ctypes import c_char, c_char_p, c_int, c_size_t, c_ubyte, c_uint, c_void_p from typing import List, Optional, Tuple -from psycopg.errors import NotSupportedError +from ..errors import NotSupportedError if sys.platform == "win32": libname = ctypes.util.find_library("libpq.dll") diff --git a/psycopg/psycopg/pq/misc.py b/psycopg/psycopg/pq/misc.py index c6d8a7ccd..965fb665e 100644 --- a/psycopg/psycopg/pq/misc.py +++ b/psycopg/psycopg/pq/misc.py @@ -58,7 +58,7 @@ def error_message(obj: Union[PGconn, PGresult], encoding: str = "utf8") -> str: bmsg = bmsg.split(b":", 1)[-1].strip() elif hasattr(obj, "error_message"): - from psycopg.encodings import py_codecs + from ..encodings import py_codecs # obj is a PGconn obj = cast(PGconn, obj)