]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Report that trace is *currently* only supported on linux in errors
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 7 Dec 2021 21:02:59 +0000 (22:02 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Tue, 7 Dec 2021 21:51:57 +0000 (22:51 +0100)
We will add support for other platforms, if others care.

psycopg/psycopg/pq/pq_ctypes.py
psycopg_c/psycopg_c/pq/pgconn.pyx

index f31ce1d01127746960edb4efe8a7e8831f094345..a4d2775b563d5accf16d4d0c30719d055869c54e 100644 (file)
@@ -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)
 
index c579311fe9257216305ec4a1c29da1cf1d940581..5526132c3b529415f998b1eb7ef2569eb18bc5ff 100644 (file)
@@ -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)