MCPcopy Index your code
hub / github.com/python/cpython / cx_limit

Function cx_limit

Lib/test/test_sqlite3/util.py:18–23  ·  view source on GitHub ↗
(cx, category=sqlite3.SQLITE_LIMIT_SQL_LENGTH, limit=128)

Source from the content-addressed store, hash-verified

16# Temporarily limit a database connection parameter
17@contextlib.contextmanager
18def cx_limit(cx, category=sqlite3.SQLITE_LIMIT_SQL_LENGTH, limit=128):
19 try:
20 _prev = cx.setlimit(category, limit)
21 yield limit
22 finally:
23 cx.setlimit(category, _prev)
24
25
26def with_tracebacks(exc, regex="", name="", msg_regex=""):

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…