MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _do_get

Method _do_get

lib/sqlalchemy/pool/impl.py:567–583  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

565 )
566
567 def _do_get(self) -> ConnectionPoolEntry:
568 if self._checked_out:
569 if self._checkout_traceback:
570 suffix = " at:\n%s" % "".join(
571 chop_traceback(self._checkout_traceback)
572 )
573 else:
574 suffix = ""
575 raise AssertionError("connection is already checked out" + suffix)
576
577 if not self._conn:
578 self._conn = self._create_connection()
579
580 self._checked_out = True
581 if self._store_traceback:
582 self._checkout_traceback = traceback.format_stack()
583 return self._conn

Callers

nothing calls this directly

Calls 3

chop_tracebackFunction · 0.85
joinMethod · 0.45
_create_connectionMethod · 0.45

Tested by

no test coverage detected