mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-29 20:34:31 +02:00
fix: defer plugin entrypoint loading until runtime
Fixes simonw/sqlite-utils#713
This commit is contained in:
parent
8d74ffc932
commit
974fe2f82f
3 changed files with 11 additions and 4 deletions
|
|
@ -40,7 +40,7 @@ from typing import (
|
|||
Tuple,
|
||||
)
|
||||
import uuid
|
||||
from sqlite_utils.plugins import pm
|
||||
from sqlite_utils.plugins import ensure_plugins_loaded, pm
|
||||
|
||||
try:
|
||||
from sqlite_dump import iterdump # type: ignore[import-not-found]
|
||||
|
|
@ -382,6 +382,7 @@ class Database:
|
|||
self._registered_functions: set = set()
|
||||
self.use_counts_table = use_counts_table
|
||||
if execute_plugins:
|
||||
ensure_plugins_loaded()
|
||||
pm.hook.prepare_connection(conn=self.conn)
|
||||
self.strict = strict
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue