source_info: resolve importlib_metadata compatibility issues

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2024-07-25 14:16:42 -04:00
parent 6f2c79f985
commit 8debbf8ba4
No known key found for this signature in database
GPG Key ID: 5A1EB336DFB4C71B
3 changed files with 4 additions and 5 deletions

View File

@ -13,10 +13,7 @@ import re
import json
import logging
from dataclasses import dataclass
if sys.version_info < (3, 8):
from importlib_metadata import Distribution, PathDistribution, PackageMetadata
else:
from importlib.metadata import Distribution, PathDistribution, PackageMetadata
from importlib_metadata import Distribution, PathDistribution, PackageMetadata
from .exceptions import ServerError
# Annotation imports

View File

@ -25,7 +25,8 @@ dependencies = [
"apprise==1.8.0",
"ldap3==2.9.1",
"python-periphery==2.4.1",
"importlib_metadata==6.7.0 ; python_version=='3.7'"
"importlib_metadata==6.7.0 ; python_version=='3.7'",
"importlib_metadata==8.2.0 ; python_version>='3.8'"
]
requires-python = ">=3.7"
readme = "README.md"

View File

@ -20,3 +20,4 @@ apprise==1.8.0
ldap3==2.9.1
python-periphery==2.4.1
importlib_metadata==6.7.0 ; python_version=='3.7'
importlib_metadata==8.2.0 ; python_version>='3.8'