dvc-objects 0.21.0__tar.gz → 0.21.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dvc-objects-0.21.0/src/dvc_objects.egg-info → dvc-objects-0.21.2}/PKG-INFO +1 -1
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/setup.cfg +1 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/base.py +29 -1
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/generic.py +1 -1
- {dvc-objects-0.21.0 → dvc-objects-0.21.2/src/dvc_objects.egg-info}/PKG-INFO +1 -1
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects.egg-info/requires.txt +1 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.cruft.json +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.gitattributes +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.github/dependabot.yml +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.github/workflows/release.yml +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.github/workflows/tests.yml +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.github/workflows/update-template.yaml +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.gitignore +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.pre-commit-config.yaml +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/CODE_OF_CONDUCT.rst +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/CONTRIBUTING.rst +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/LICENSE +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/README.rst +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/noxfile.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/pyproject.toml +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/__init__.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/_tqdm.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/db.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/errors.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/executors.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/__init__.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/callbacks.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/errors.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/local.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/memory.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/path.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/scheme.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/system.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/utils.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/obj.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/py.typed +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/transfer.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects.egg-info/SOURCES.txt +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects.egg-info/dependency_links.txt +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects.egg-info/not-zip-safe +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects.egg-info/top_level.txt +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/__init__.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/conftest.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/fs/__init__.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/fs/test_callbacks.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/fs/test_localfs.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/fs/test_system.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/fs/test_utils.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/test_odb.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/test_reflink.py +0 -0
- {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/test_transfer.py +0 -0
|
@@ -22,7 +22,7 @@ from typing import (
|
|
|
22
22
|
)
|
|
23
23
|
|
|
24
24
|
from fsspec.asyn import get_loop
|
|
25
|
-
from funcy import cached_property
|
|
25
|
+
from funcy import cached_property, once_per_args
|
|
26
26
|
|
|
27
27
|
from ..executors import ThreadPoolExecutor, batch_coros
|
|
28
28
|
from .callbacks import DEFAULT_CALLBACK, Callback
|
|
@@ -58,6 +58,33 @@ class LinkError(OSError):
|
|
|
58
58
|
)
|
|
59
59
|
|
|
60
60
|
|
|
61
|
+
@once_per_args
|
|
62
|
+
def check_required_version(
|
|
63
|
+
pkg: str, dist: str = "dvc_objects", log_level=logging.WARNING
|
|
64
|
+
):
|
|
65
|
+
from importlib import metadata
|
|
66
|
+
|
|
67
|
+
from packaging.requirements import InvalidRequirement, Requirement
|
|
68
|
+
|
|
69
|
+
try:
|
|
70
|
+
reqs = {
|
|
71
|
+
r.name: r.specifier for r in map(Requirement, metadata.requires(dist) or [])
|
|
72
|
+
}
|
|
73
|
+
version = metadata.version(pkg)
|
|
74
|
+
except (metadata.PackageNotFoundError, InvalidRequirement):
|
|
75
|
+
return
|
|
76
|
+
|
|
77
|
+
specifier = reqs.get(pkg)
|
|
78
|
+
if specifier and version and version not in specifier:
|
|
79
|
+
logger.log(
|
|
80
|
+
log_level,
|
|
81
|
+
"'%s%s' is required, but you have %r installed which is incompatible.",
|
|
82
|
+
pkg,
|
|
83
|
+
specifier,
|
|
84
|
+
version,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
61
88
|
class FileSystem:
|
|
62
89
|
sep = "/"
|
|
63
90
|
|
|
@@ -142,6 +169,7 @@ class FileSystem:
|
|
|
142
169
|
def _check_requires(self, **kwargs):
|
|
143
170
|
from .scheme import Schemes
|
|
144
171
|
|
|
172
|
+
check_required_version(pkg="fsspec")
|
|
145
173
|
missing = self.get_missing_deps()
|
|
146
174
|
if not missing:
|
|
147
175
|
return
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|