From: Denis Laxalde Date: Fri, 5 Apr 2024 10:42:01 +0000 (+0200) Subject: docs: document the ALLOCATED ConnStatus value X-Git-Tag: 3.2.0~60^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F754%2Fhead;p=thirdparty%2Fpsycopg.git docs: document the ALLOCATED ConnStatus value --- diff --git a/docs/api/pq.rst b/docs/api/pq.rst index bbc34f704..a0d304c6e 100644 --- a/docs/api/pq.rst +++ b/docs/api/pq.rst @@ -148,6 +148,7 @@ Enumerations There are other values in this enum, but only `OK` and `BAD` are seen after a connection has been established. Other statuses might only be seen during the connection phase and are considered internal. + `ALLOCATED` is only expected to be returned by `PGcancelConn.status`. .. seealso:: :pq:`PQstatus()` and `PQcancelStatus()` return this value. diff --git a/psycopg/psycopg/pq/_enums.py b/psycopg/psycopg/pq/_enums.py index 1f6fcd48c..6b03b0621 100644 --- a/psycopg/psycopg/pq/_enums.py +++ b/psycopg/psycopg/pq/_enums.py @@ -32,6 +32,7 @@ class ConnStatus(IntEnum): CHECK_TARGET = auto() CHECK_STANDBY = auto() ALLOCATED = auto() # Only for cancel connections. + """Connection to the server hasn't been initiated yet.""" class PollingStatus(IntEnum):