fix ImportError on python 3.8

This commit is contained in:
Izalia Mae 2024-01-29 04:26:54 -05:00
parent 81215a83a4
commit 6ab6343ae7
2 changed files with 8 additions and 2 deletions

View file

@ -3,14 +3,18 @@ from __future__ import annotations
import tinysql import tinysql
import typing import typing
from importlib.resources import files as pkgfiles
from .config import get_default_value from .config import get_default_value
from .connection import Connection from .connection import Connection
from .schema import VERSIONS, migrate_0 from .schema import VERSIONS, migrate_0
from .. import logger as logging from .. import logger as logging
try:
from importlib.resources import files as pkgfiles
except ImportError:
from importlib_resources import files as pkgfiles
if typing.TYPE_CHECKING: if typing.TYPE_CHECKING:
from .config import Config from .config import Config

View file

@ -4,3 +4,5 @@ cachetools>=5.2.0
click>=8.1.2 click>=8.1.2
pyyaml>=6.0 pyyaml>=6.0
tinysql@https://git.barkshark.xyz/barkshark/tinysql/archive/0.2.2a.tar.gz tinysql@https://git.barkshark.xyz/barkshark/tinysql/archive/0.2.2a.tar.gz
importlib_resources==6.1.1;python_version<'3.9'