From a805c9626f56e3fdb488be267e215df7664e9c72 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Tue, 7 Dec 2021 22:02:59 +0100 Subject: [PATCH] Report that trace is *currently* only supported on linux in errors We will add support for other platforms, if others care. --- psycopg/psycopg/pq/pq_ctypes.py | 2 +- psycopg_c/psycopg_c/pq/pgconn.pyx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/psycopg/psycopg/pq/pq_ctypes.py b/psycopg/psycopg/pq/pq_ctypes.py index f31ce1d01..a4d2775b5 100644 --- a/psycopg/psycopg/pq/pq_ctypes.py +++ b/psycopg/psycopg/pq/pq_ctypes.py @@ -611,7 +611,7 @@ class PGconn: def trace(self, fileno: int) -> None: if sys.platform != "linux": - raise e.NotSupportedError("only supported on Linux") + raise e.NotSupportedError("currently only supported on Linux") stream = impl.fdopen(fileno, b"w") impl.PQtrace(self._pgconn_ptr, stream) diff --git a/psycopg_c/psycopg_c/pq/pgconn.pyx b/psycopg_c/psycopg_c/pq/pgconn.pyx index c579311fe..5526132c3 100644 --- a/psycopg_c/psycopg_c/pq/pgconn.pyx +++ b/psycopg_c/psycopg_c/pq/pgconn.pyx @@ -508,7 +508,7 @@ cdef class PGconn: def trace(self, fileno: int) -> None: if sys.platform != "linux": - raise e.NotSupportedError("only supported on Linux") + raise e.NotSupportedError("currently only supported on Linux") stream = fdopen(fileno, b"w") libpq.PQtrace(self._pgconn_ptr, stream) -- 2.47.3