mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-10 02:17:59 +00:00
fix ImportError on python 3.8
This commit is contained in:
parent
81215a83a4
commit
6ab6343ae7
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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'
|
||||||
|
|
Loading…
Reference in a new issue