Remove unused importlib.metadata for Python 3.7+ compatibility

This commit is contained in:
Mark Qvist 2023-05-11 20:18:28 +02:00
parent e54ef5a675
commit 494ebb29fb
6 changed files with 3 additions and 7 deletions

View File

@ -7,7 +7,7 @@ license = "MIT"
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.9"
python = "^3.7"
docopt = "^0.6.2"
rns = "^0.5.0" #{ git = "https://github.com/acehoss/Reticulum.git", branch = "feature/channel" } #{ path = "../Reticulum/", develop = true } #
tomli = "^2.0.1"

View File

@ -31,8 +31,8 @@ def _get_version():
import tomli
return tomli.load(open(os.path.join(os.path.dirname(module_dir), "pyproject.toml"), "rb"))["tool"]["poetry"]["version"]
except:
from importlib.metadata import version
return version(__package__)
return "0.0.0"
except:
return "0.0.0"

View File

@ -28,7 +28,6 @@ import asyncio
import base64
import enum
import functools
import importlib.metadata
import logging as __logging
import os
import queue

View File

@ -28,7 +28,6 @@ import asyncio
import base64
import enum
import functools
import importlib.metadata
import logging as __logging
import os
import queue

View File

@ -28,7 +28,6 @@ import asyncio
import base64
import enum
import functools
import importlib.metadata
import logging as __logging
import os
import queue

View File

@ -13,7 +13,6 @@ import os
def test_version():
# version = importlib.metadata.version(rnsh.__version__)
assert rnsh.__version__ != "0.0.0"
assert rnsh.__version__ != "0.0.1"