Fixed the type signature for the :meth:`.PoolEvents.checkin` event to
indicate that the given :class:`.DBAPIConnection` argument may be ``None``
in the case where the connection has been invalidated.
Change-Id: I4c6f0cf999f2ffb730909e2688eb3b0794ecf2ab
--- /dev/null
+.. change::
+ :tags: bug, typing
+
+ Fixed the type signature for the :meth:`.PoolEvents.checkin` event to
+ indicate that the given :class:`.DBAPIConnection` argument may be ``None``
+ in the case where the connection has been invalidated.
def checkin(
self,
- dbapi_connection: DBAPIConnection,
+ dbapi_connection: Optional[DBAPIConnection],
connection_record: ConnectionPoolEntry,
) -> None:
"""Called when a connection returns to the pool.