@@ -9,14 +9,15 @@ class AbstractConnectionPool:
9
9
maxconn : Any
10
10
closed : bool
11
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 : ...
12
17
13
- class SimpleConnectionPool (AbstractConnectionPool ):
14
- getconn : Any
15
- putconn : Any
16
- closeall : Any
18
+ class SimpleConnectionPool (AbstractConnectionPool ): ...
17
19
18
20
class ThreadedConnectionPool (AbstractConnectionPool ):
19
- def __init__ ( self , minconn , maxconn , * args , ** kwargs ) -> None : ...
20
- def getconn ( self , key : Any | None = ...): ...
21
+ # This subclass has a default value for conn which doesn't exist
22
+ # in the SimpleConnectionPool class, nor in the documentation
21
23
def putconn (self , conn : Any | None = ..., key : Any | None = ..., close : bool = ...) -> None : ...
22
- def closeall (self ) -> None : ...
0 commit comments