MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / __aexit__

Method __aexit__

asyncpg/pool.py:1185–1194  ·  view source on GitHub ↗
(
        self,
        exc_type: Optional[Type[BaseException]] = None,
        exc_val: Optional[BaseException] = None,
        exc_tb: Optional[TracebackType] = None,
    )

Source from the content-addressed store, hash-verified

1183 return self.connection
1184
1185 async def __aexit__(
1186 self,
1187 exc_type: Optional[Type[BaseException]] = None,
1188 exc_val: Optional[BaseException] = None,
1189 exc_tb: Optional[TracebackType] = None,
1190 ) -> None:
1191 self.done = True
1192 con = self.connection
1193 self.connection = None
1194 await self.pool.release(con)
1195
1196 def __await__(self):
1197 self.done = True

Callers

nothing calls this directly

Calls 1

releaseMethod · 0.45

Tested by

no test coverage detected