From: Daniele Varrazzo Date: Tue, 7 Dec 2021 21:02:59 +0000 (+0100) Subject: Report that trace is *currently* only supported on linux in errors X-Git-Tag: pool-3.1~88^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a805c9626f56e3fdb488be267e215df7664e9c72;p=thirdparty%2Fpsycopg.git Report that trace is *currently* only supported on linux in errors We will add support for other platforms, if others care. --- 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)