From 5193d49ae638bc277e524e3445e994848bd18945 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Fri, 7 Jan 2022 18:32:47 +0100 Subject: [PATCH] Don't overwrite the module of the psycopg.pq.pq_ctypes objects It might be useful to tell apart the C version from the python versions for debugging. The C versions don't do it, so they repr as: See #201. --- psycopg/psycopg/pq/pq_ctypes.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/psycopg/psycopg/pq/pq_ctypes.py b/psycopg/psycopg/pq/pq_ctypes.py index 83b288212..2639f758c 100644 --- a/psycopg/psycopg/pq/pq_ctypes.py +++ b/psycopg/psycopg/pq/pq_ctypes.py @@ -67,7 +67,6 @@ class PGconn: Python representation of a libpq connection. """ - __module__ = "psycopg.pq" __slots__ = ( "_pgconn_ptr", "notice_handler", @@ -729,7 +728,6 @@ class PGresult: Python representation of a libpq result. """ - __module__ = "psycopg.pq" __slots__ = ("_pgresult_ptr",) def __init__(self, pgresult_ptr: impl.PGresult_struct): @@ -860,7 +858,6 @@ class PGcancel: Created by `PGconn.get_cancel()`. """ - __module__ = "psycopg.pq" __slots__ = ("pgcancel_ptr",) def __init__(self, pgcancel_ptr: impl.PGcancel_struct): @@ -901,8 +898,6 @@ class Conninfo: Utility object to manipulate connection strings. """ - __module__ = "psycopg.pq" - @classmethod def get_defaults(cls) -> List[ConninfoOption]: opts = impl.PQconndefaults() @@ -956,8 +951,6 @@ class Escaping: Utility object to escape strings for SQL interpolation. """ - __module__ = "psycopg.pq" - def __init__(self, conn: Optional[PGconn] = None): self.conn = conn -- 2.47.3