Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ewoksutils/logging_utils/sqlite3.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sqlite3
import time
from typing import Any
from typing import Dict
Expand All @@ -7,6 +6,7 @@
from typing import Sequence

from .. import sqlite3_utils
from ..sqlite3_utils import sqlite3
from .connection import ConnectionHandler

Sqlite3RecordType = List[Any]
Expand Down
12 changes: 11 additions & 1 deletion src/ewoksutils/sqlite3_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import json
import re
import sqlite3
from contextlib import closing
from contextlib import contextmanager
from datetime import datetime
Expand All @@ -13,6 +12,17 @@
from typing import Optional
from typing import Union

try:
import sqlite3
except ImportError as exc:
raise ImportError(
"Python's sqlite3 module is required but is not available. "
"This usually means that the Python interpreter was built without SQLite "
"support. Install the SQLite development libraries required by your "
"operating system, then reinstall or rebuild Python and recreate the "
"virtual environment."
) from exc

from . import uri_utils
from .datetime_utils import fromisoformat

Expand Down
2 changes: 1 addition & 1 deletion src/ewoksutils/tests/test_logging_sqlite3.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import logging
import sqlite3
import threading
import time
from typing import Optional

from .. import sqlite3_utils
from ..logging_utils.sqlite3 import Sqlite3Handler
from ..sqlite3_utils import sqlite3

FIELD_TYPES = {"field1": 0, "field2": ""}

Expand Down
Loading