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.
Files changed (51) hide show
  1. {dvc-objects-0.21.0/src/dvc_objects.egg-info → dvc-objects-0.21.2}/PKG-INFO +1 -1
  2. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/setup.cfg +1 -0
  3. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/base.py +29 -1
  4. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/generic.py +1 -1
  5. {dvc-objects-0.21.0 → dvc-objects-0.21.2/src/dvc_objects.egg-info}/PKG-INFO +1 -1
  6. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects.egg-info/requires.txt +1 -0
  7. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.cruft.json +0 -0
  8. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.gitattributes +0 -0
  9. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.github/dependabot.yml +0 -0
  10. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.github/workflows/release.yml +0 -0
  11. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.github/workflows/tests.yml +0 -0
  12. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.github/workflows/update-template.yaml +0 -0
  13. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.gitignore +0 -0
  14. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/.pre-commit-config.yaml +0 -0
  15. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/CODE_OF_CONDUCT.rst +0 -0
  16. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/CONTRIBUTING.rst +0 -0
  17. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/LICENSE +0 -0
  18. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/README.rst +0 -0
  19. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/noxfile.py +0 -0
  20. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/pyproject.toml +0 -0
  21. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/__init__.py +0 -0
  22. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/_tqdm.py +0 -0
  23. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/db.py +0 -0
  24. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/errors.py +0 -0
  25. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/executors.py +0 -0
  26. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/__init__.py +0 -0
  27. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/callbacks.py +0 -0
  28. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/errors.py +0 -0
  29. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/local.py +0 -0
  30. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/memory.py +0 -0
  31. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/path.py +0 -0
  32. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/scheme.py +0 -0
  33. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/system.py +0 -0
  34. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/fs/utils.py +0 -0
  35. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/obj.py +0 -0
  36. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/py.typed +0 -0
  37. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects/transfer.py +0 -0
  38. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects.egg-info/SOURCES.txt +0 -0
  39. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects.egg-info/dependency_links.txt +0 -0
  40. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects.egg-info/not-zip-safe +0 -0
  41. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/src/dvc_objects.egg-info/top_level.txt +0 -0
  42. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/__init__.py +0 -0
  43. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/conftest.py +0 -0
  44. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/fs/__init__.py +0 -0
  45. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/fs/test_callbacks.py +0 -0
  46. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/fs/test_localfs.py +0 -0
  47. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/fs/test_system.py +0 -0
  48. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/fs/test_utils.py +0 -0
  49. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/test_odb.py +0 -0
  50. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/test_reflink.py +0 -0
  51. {dvc-objects-0.21.0 → dvc-objects-0.21.2}/tests/test_transfer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dvc-objects
3
- Version: 0.21.0
3
+ Version: 0.21.2
4
4
  Summary: dvc objects
5
5
  Home-page: https://github.com/iterative/dvc-objects
6
6
  Maintainer-email: support@dvc.org
@@ -29,6 +29,7 @@ install_requires =
29
29
  funcy>=1.14
30
30
  fsspec>=2022.10.0
31
31
  typing-extensions>=3.7.4
32
+ packaging>=19
32
33
 
33
34
  [options.extras_require]
34
35
  tests =
@@ -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
@@ -302,7 +302,7 @@ def transfer(
302
302
  batch_size=batch_size,
303
303
  on_error=on_error,
304
304
  )
305
- continue
305
+ return
306
306
  try:
307
307
  _try_links(
308
308
  links,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dvc-objects
3
- Version: 0.21.0
3
+ Version: 0.21.2
4
4
  Summary: dvc objects
5
5
  Home-page: https://github.com/iterative/dvc-objects
6
6
  Maintainer-email: support@dvc.org
@@ -3,6 +3,7 @@ shortuuid>=0.5.0
3
3
  funcy>=1.14
4
4
  fsspec>=2022.10.0
5
5
  typing-extensions>=3.7.4
6
+ packaging>=19
6
7
 
7
8
  [dev]
8
9
  pytest==7.2.0
File without changes
File without changes
File without changes
File without changes
File without changes