5 class PoolError(psycopg2.Error): ...
7 class AbstractConnectionPool:
11 def __init__(self, minconn, maxconn, *args, **kwargs) -> None: ...
12 # getconn, putconn and closeall are officially documented as methods of the
13 # abstract base class, but in reality, they only exist on the children classes
14 def getconn(self, key: Any | None = ...): ...
15 def putconn(self, conn: Any, key: Any | None = ..., close: bool = ...) -> None: ...
16 def closeall(self) -> None: ...
18 class SimpleConnectionPool(AbstractConnectionPool): ...
20 class ThreadedConnectionPool(AbstractConnectionPool):
21 # This subclass has a default value for conn which doesn't exist
22 # in the SimpleConnectionPool class, nor in the documentation
23 def putconn(self, conn: Any | None = ..., key: Any | None = ..., close: bool = ...) -> None: ...