]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
fix: add missing interface for PGconn.protocol_version
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 5 Jul 2025 13:22:12 +0000 (15:22 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sat, 5 Jul 2025 13:43:30 +0000 (15:43 +0200)
psycopg/psycopg/errors.py
psycopg/psycopg/pq/abc.py

index 2dfc76090e2e404cc8379e7dfea8061e72e014a5..fe410fa67434f687218dd7f29dad1b0f758e6e25 100644 (file)
@@ -60,6 +60,7 @@ class FinishedPGconn:
 
     error_message: bytes = b""
     _encoding: str = "utf-8"
+    protocol_version: int = 0
     server_version: int = 0
 
     backend_pid: int = 0
index bf4ae12bb9cc1db4f67989965bb03dbb3486430c..5fbe112b95ca752ab57f27a23556bae48ff83191 100644 (file)
@@ -85,6 +85,9 @@ class PGconn(Protocol):
     @property
     def _encoding(self) -> str: ...
 
+    @property
+    def protocol_version(self) -> int: ...
+
     @property
     def server_version(self) -> int: ...