diff --git a/pyproject.toml b/pyproject.toml index b10577a..ef5fc7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,8 +26,6 @@ dependencies = [ "shortuuid>=0.5.0", "funcy>=1.14", "fsspec>=2022.10.0", - "typing-extensions>=3.7.4", - "packaging>=19", ] [project.urls] @@ -47,6 +45,7 @@ dev = [ "dvc-objects[tests]", "mypy==1.7.1", "types-tqdm", + "typing-extensions>=3.7.4", ] [tool.setuptools.packages.find] diff --git a/src/dvc_objects/fs/base.py b/src/dvc_objects/fs/base.py index affc733..4b31830 100644 --- a/src/dvc_objects/fs/base.py +++ b/src/dvc_objects/fs/base.py @@ -22,7 +22,6 @@ ) from fsspec.asyn import get_loop -from funcy import once_per_args from dvc_objects.executors import ThreadPoolExecutor, batch_coros from dvc_objects.utils import cached_property @@ -60,33 +59,6 @@ def __init__(self, link: str, fs: "FileSystem", path: str) -> None: ) -@once_per_args -def check_required_version( - pkg: str, dist: str = "dvc_objects", log_level=logging.WARNING -): - from importlib import metadata - - from packaging.requirements import InvalidRequirement, Requirement - - try: - reqs = { - r.name: r.specifier for r in map(Requirement, metadata.requires(dist) or []) - } - version = metadata.version(pkg) - except (metadata.PackageNotFoundError, InvalidRequirement): - return - - specifier = reqs.get(pkg) - if specifier and version and version not in specifier: - logger.log( - log_level, - "'%s%s' is required, but you have %r installed which is incompatible.", - pkg, - specifier, - version, - ) - - class FileSystem: sep = "/" @@ -176,7 +148,6 @@ def get_missing_deps(cls) -> List[str]: def _check_requires(self, **kwargs): from .scheme import Schemes - check_required_version(pkg="fsspec") missing = self.get_missing_deps() if not missing: return