MCPcopy Create free account
hub / github.com/tox-dev/filelock / connect

Function connect

tests/sqlite/test_transactions_connection.py:109–127  ·  view source on GitHub ↗
(
        database: str,
        *,
        check_same_thread: bool,
        factory: type[sqlite3.Connection],
        cached_statements: int,
        timeout: float,
        uri: bool = False,
    )

Source from the content-addressed store, hash-verified

107 statements: list[str] = []
108
109 def connect(
110 database: str,
111 *,
112 check_same_thread: bool,
113 factory: type[sqlite3.Connection],
114 cached_statements: int,
115 timeout: float,
116 uri: bool = False,
117 ) -> sqlite3.Connection:
118 connection = real_connect(
119 database,
120 check_same_thread=check_same_thread,
121 factory=factory,
122 cached_statements=cached_statements,
123 timeout=timeout,
124 uri=uri,
125 )
126 connection.set_trace_callback(statements.append)
127 return connection
128
129 mocker.patch("sqlite3.connect", side_effect=connect, autospec=True)
130 with ReadWriteLock(lock_file, is_singleton=False).read_lock():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected