dvc-objects 5.1.0__tar.gz → 5.1.1__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 (52) hide show
  1. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/.github/workflows/tests.yml +7 -7
  2. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/.pre-commit-config.yaml +3 -3
  3. {dvc-objects-5.1.0/src/dvc_objects.egg-info → dvc_objects-5.1.1}/PKG-INFO +7 -5
  4. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/noxfile.py +4 -9
  5. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/pyproject.toml +5 -3
  6. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/db.py +1 -1
  7. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/executors.py +1 -1
  8. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/fs/base.py +11 -14
  9. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/fs/callbacks.py +1 -1
  10. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/fs/generic.py +5 -4
  11. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/fs/local.py +1 -1
  12. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/obj.py +1 -1
  13. {dvc-objects-5.1.0 → dvc_objects-5.1.1/src/dvc_objects.egg-info}/PKG-INFO +7 -5
  14. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects.egg-info/requires.txt +2 -2
  15. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/benchmarks/test_fs.py +3 -3
  16. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/.cruft.json +0 -0
  17. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/.gitattributes +0 -0
  18. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/.github/dependabot.yml +0 -0
  19. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/.github/workflows/release.yml +0 -0
  20. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/.github/workflows/update-template.yaml +0 -0
  21. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/.gitignore +0 -0
  22. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/CODE_OF_CONDUCT.rst +0 -0
  23. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/CONTRIBUTING.rst +0 -0
  24. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/LICENSE +0 -0
  25. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/README.rst +0 -0
  26. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/setup.cfg +0 -0
  27. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/__init__.py +0 -0
  28. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/compat.py +0 -0
  29. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/errors.py +0 -0
  30. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/fs/__init__.py +0 -0
  31. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/fs/errors.py +0 -0
  32. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/fs/memory.py +0 -0
  33. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/fs/scheme.py +0 -0
  34. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/fs/system.py +0 -0
  35. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/fs/utils.py +0 -0
  36. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/py.typed +0 -0
  37. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects/transfer.py +0 -0
  38. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects.egg-info/SOURCES.txt +0 -0
  39. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects.egg-info/dependency_links.txt +0 -0
  40. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/src/dvc_objects.egg-info/top_level.txt +0 -0
  41. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/__init__.py +0 -0
  42. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/benchmarks/__init__.py +0 -0
  43. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/conftest.py +0 -0
  44. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/fs/__init__.py +0 -0
  45. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/fs/test_callbacks.py +0 -0
  46. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/fs/test_generic.py +0 -0
  47. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/fs/test_localfs.py +0 -0
  48. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/fs/test_system.py +0 -0
  49. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/fs/test_utils.py +0 -0
  50. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/test_odb.py +0 -0
  51. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/test_reflink.py +0 -0
  52. {dvc-objects-5.1.0 → dvc_objects-5.1.1}/tests/test_transfer.py +0 -0
@@ -20,11 +20,10 @@ jobs:
20
20
  strategy:
21
21
  fail-fast: false
22
22
  matrix:
23
- os: [ubuntu-20.04, windows-latest, macos-latest]
24
- pyv: ['3.9', '3.10', '3.11', '3.12']
23
+ os: [ubuntu-latest, windows-latest, macos-latest]
24
+ pyv: ['3.9', '3.10', '3.11', '3.12', '3.13']
25
25
  include:
26
26
  - {os: ubuntu-latest, pyv: 'pypy3.9'}
27
- - {os: macos-14, pyv: '3.12'}
28
27
 
29
28
  steps:
30
29
  - name: Check out the repository
@@ -37,7 +36,8 @@ jobs:
37
36
  with:
38
37
  python-version: ${{ matrix.pyv }}
39
38
  cache: pip
40
- cache-dependency-path: setup.cfg
39
+ allow-prereleases: true
40
+ cache-dependency-path: pyproject.toml
41
41
 
42
42
  - name: Upgrade pip and nox
43
43
  run: |
@@ -45,14 +45,14 @@ jobs:
45
45
  pip --version
46
46
  nox --version
47
47
 
48
- - name: Lint code and check dependencies
49
- run: nox -s lint safety
48
+ - name: Lint code
49
+ run: nox -s lint
50
50
 
51
51
  - name: Run tests
52
52
  run: nox -s tests-${{ matrix.nox_pyv || matrix.pyv }} -- --cov-report=xml
53
53
 
54
54
  - name: Upload coverage report
55
- uses: codecov/codecov-action@v3.1.4
55
+ uses: codecov/codecov-action@v5
56
56
 
57
57
  - name: Run benchmarks
58
58
  run: nox -s bench
@@ -2,7 +2,7 @@ default_language_version:
2
2
  python: python3
3
3
  repos:
4
4
  - repo: https://github.com/pre-commit/pre-commit-hooks
5
- rev: v4.5.0
5
+ rev: v5.0.0
6
6
  hooks:
7
7
  - id: check-added-large-files
8
8
  - id: check-case-conflict
@@ -20,13 +20,13 @@ repos:
20
20
  - id: sort-simple-yaml
21
21
  - id: trailing-whitespace
22
22
  - repo: https://github.com/astral-sh/ruff-pre-commit
23
- rev: 'v0.2.2'
23
+ rev: 'v0.11.12'
24
24
  hooks:
25
25
  - id: ruff
26
26
  args: [--fix, --exit-non-zero-on-fix]
27
27
  - id: ruff-format
28
28
  - repo: https://github.com/codespell-project/codespell
29
- rev: v2.2.6
29
+ rev: v2.4.1
30
30
  hooks:
31
31
  - id: codespell
32
32
  additional_dependencies: ["tomli"]
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: dvc-objects
3
- Version: 5.1.0
3
+ Version: 5.1.1
4
4
  Summary: dvc objects - filesystem and object-db level abstractions to use in dvc and dvc-data
5
5
  Author-email: Iterative <support@dvc.org>
6
6
  License: Apache-2.0
@@ -11,14 +11,15 @@ Classifier: Programming Language :: Python :: 3.9
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
14
15
  Classifier: Development Status :: 4 - Beta
15
16
  Requires-Python: >=3.9
16
17
  Description-Content-Type: text/x-rst
17
18
  License-File: LICENSE
18
- Requires-Dist: funcy>=1.14; python_version < "3.12"
19
19
  Requires-Dist: fsspec>=2024.2.0
20
+ Requires-Dist: funcy>=1.14; python_version < "3.12"
20
21
  Provides-Extra: tests
21
- Requires-Dist: pytest<8,>=7; extra == "tests"
22
+ Requires-Dist: pytest<9,>=7; extra == "tests"
22
23
  Requires-Dist: pytest-sugar; extra == "tests"
23
24
  Requires-Dist: pytest-cov>=4.1.0; extra == "tests"
24
25
  Requires-Dist: pytest-mock; extra == "tests"
@@ -27,7 +28,8 @@ Requires-Dist: pytest-asyncio<1,>=0.23.2; extra == "tests"
27
28
  Requires-Dist: reflink; extra == "tests"
28
29
  Provides-Extra: dev
29
30
  Requires-Dist: dvc-objects[tests]; extra == "dev"
30
- Requires-Dist: mypy==1.8.0; extra == "dev"
31
+ Requires-Dist: mypy==1.16.0; extra == "dev"
32
+ Dynamic: license-file
31
33
 
32
34
  DVC objects
33
35
  ===========
@@ -1,4 +1,5 @@
1
1
  """Automation using nox."""
2
+
2
3
  import glob
3
4
  import os
4
5
 
@@ -11,7 +12,9 @@ locations = "src", "tests"
11
12
  pip_dev_flags = ["--use-pep517"] # reflink package is still missing wheels
12
13
 
13
14
 
14
- @nox.session(python=["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8", "pypy3.9"])
15
+ @nox.session(
16
+ python=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9"]
17
+ )
15
18
  def tests(session: nox.Session) -> None:
16
19
  session.install(".[tests]", *pip_dev_flags)
17
20
  session.run(
@@ -39,14 +42,6 @@ def lint(session: nox.Session) -> None:
39
42
  session.run("python", "-m", "mypy")
40
43
 
41
44
 
42
- @nox.session
43
- def safety(session: nox.Session) -> None:
44
- """Scan dependencies for insecure packages."""
45
- session.install(".[dev]", *pip_dev_flags)
46
- session.install("safety")
47
- session.run("safety", "check", "--full-report")
48
-
49
-
50
45
  @nox.session
51
46
  def build(session: nox.Session) -> None:
52
47
  session.install("build", "setuptools", "twine")
@@ -16,13 +16,14 @@ classifiers = [
16
16
  "Programming Language :: Python :: 3.10",
17
17
  "Programming Language :: Python :: 3.11",
18
18
  "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
19
20
  "Development Status :: 4 - Beta",
20
21
  ]
21
22
  requires-python = ">=3.9"
22
23
  dynamic = ["version"]
23
24
  dependencies = [
24
- "funcy>=1.14; python_version < '3.12'",
25
25
  "fsspec>=2024.2.0",
26
+ "funcy>=1.14; python_version < '3.12'",
26
27
  ]
27
28
 
28
29
  [project.urls]
@@ -31,7 +32,7 @@ Source = "https://github.com/iterative/dvc-objects"
31
32
 
32
33
  [project.optional-dependencies]
33
34
  tests = [
34
- "pytest<8,>=7",
35
+ "pytest>=7,<9",
35
36
  "pytest-sugar",
36
37
  "pytest-cov>=4.1.0",
37
38
  "pytest-mock",
@@ -41,7 +42,7 @@ tests = [
41
42
  ]
42
43
  dev = [
43
44
  "dvc-objects[tests]",
44
- "mypy==1.8.0",
45
+ "mypy==1.16.0",
45
46
  ]
46
47
 
47
48
  [tool.setuptools.packages.find]
@@ -101,6 +102,7 @@ module = [
101
102
 
102
103
  [tool.codespell]
103
104
  ignore-words-list = "cachable,"
105
+ skip = "CODE_OF_CONDUCT.rst"
104
106
 
105
107
  [tool.ruff]
106
108
  output-format = "full"
@@ -123,7 +123,7 @@ class ObjectDB:
123
123
  raise ObjectDBPermissionError("Cannot add to read-only ODB")
124
124
 
125
125
  if isinstance(data, bytes):
126
- fobj: "BinaryIO" = BytesIO(data)
126
+ fobj: BinaryIO = BytesIO(data)
127
127
  size: Optional[int] = len(data)
128
128
  else:
129
129
  fobj = data
@@ -86,7 +86,7 @@ async def batch_coros( # noqa: C901
86
86
  for fut in done:
87
87
  try:
88
88
  result = fut.result()
89
- except Exception as exc: # noqa: BLE001
89
+ except Exception as exc:
90
90
  if not return_exceptions:
91
91
  for pending_fut in pending:
92
92
  pending_fut.cancel()
@@ -310,8 +310,7 @@ class FileSystem:
310
310
  path: AnyFSPath,
311
311
  mode: Literal["r", "rt", "w"] = "r",
312
312
  **kwargs: Any,
313
- ) -> "TextIO":
314
- ...
313
+ ) -> "TextIO": ...
315
314
 
316
315
  def open(
317
316
  self,
@@ -429,8 +428,7 @@ class FileSystem:
429
428
  path: AnyFSPath,
430
429
  callback: fsspec.Callback = ...,
431
430
  batch_size: Optional[int] = ...,
432
- ) -> bool:
433
- ...
431
+ ) -> bool: ...
434
432
 
435
433
  @overload
436
434
  def exists(
@@ -438,8 +436,7 @@ class FileSystem:
438
436
  path: list[AnyFSPath],
439
437
  callback: fsspec.Callback = ...,
440
438
  batch_size: Optional[int] = ...,
441
- ) -> list[bool]:
442
- ...
439
+ ) -> list[bool]: ...
443
440
 
444
441
  def exists(
445
442
  self,
@@ -508,12 +505,14 @@ class FileSystem:
508
505
  return not (self.is_symlink(path) or self.is_hardlink(path))
509
506
 
510
507
  @overload
511
- def ls(self, path: AnyFSPath, detail: Literal[True], **kwargs) -> "Iterator[Entry]":
512
- ...
508
+ def ls(
509
+ self, path: AnyFSPath, detail: Literal[True], **kwargs
510
+ ) -> "Iterator[Entry]": ...
513
511
 
514
512
  @overload
515
- def ls(self, path: AnyFSPath, detail: Literal[False], **kwargs) -> Iterator[str]:
516
- ...
513
+ def ls(
514
+ self, path: AnyFSPath, detail: Literal[False], **kwargs
515
+ ) -> Iterator[str]: ...
517
516
 
518
517
  def ls(self, path, detail=False, **kwargs):
519
518
  return self.fs.ls(path, detail=detail, **kwargs)
@@ -575,8 +574,7 @@ class FileSystem:
575
574
  callback: fsspec.Callback = ...,
576
575
  batch_size: Optional[int] = ...,
577
576
  **kwargs,
578
- ) -> "Entry":
579
- ...
577
+ ) -> "Entry": ...
580
578
 
581
579
  @overload
582
580
  def info(
@@ -584,8 +582,7 @@ class FileSystem:
584
582
  path: list[AnyFSPath],
585
583
  callback: fsspec.Callback = ...,
586
584
  batch_size: Optional[int] = ...,
587
- ) -> list["Entry"]:
588
- ...
585
+ ) -> list["Entry"]: ...
589
586
 
590
587
  def info(self, path, callback=DEFAULT_CALLBACK, batch_size=None, **kwargs):
591
588
  if isinstance(path, str):
@@ -22,4 +22,4 @@ class CallbackStream:
22
22
 
23
23
 
24
24
  def wrap_file(file, callback: "fsspec.Callback") -> BinaryIO:
25
- return cast(BinaryIO, CallbackStream(file, callback))
25
+ return cast("BinaryIO", CallbackStream(file, callback))
@@ -116,7 +116,7 @@ def copy(
116
116
  return to_fs.put_file(
117
117
  fobj, to_p, size=size, callback=child, **put_file_kwargs
118
118
  )
119
- except Exception as exc: # noqa: BLE001
119
+ except Exception as exc:
120
120
  if on_error is not None:
121
121
  on_error(from_p, to_p, exc)
122
122
  else:
@@ -151,7 +151,7 @@ def _put( # noqa: C901
151
151
  return to_fs.put_file(
152
152
  from_path, to_path, callback=child, **put_file_kwargs
153
153
  )
154
- except Exception as exc: # noqa: BLE001
154
+ except Exception as exc:
155
155
  if on_error is not None:
156
156
  on_error(from_path, to_path, exc)
157
157
  else:
@@ -217,7 +217,7 @@ def _get( # noqa: C901
217
217
  return from_fs.get_file(
218
218
  from_path, tmp_file, callback=child, **get_file_kwargs
219
219
  )
220
- except Exception as exc: # noqa: BLE001
220
+ except Exception as exc:
221
221
  if on_error is not None:
222
222
  on_error(from_path, to_path, exc)
223
223
  else:
@@ -299,6 +299,7 @@ def _try_links(
299
299
  errno.ENOTTY,
300
300
  errno.ENOSYS,
301
301
  errno.EINVAL,
302
+ errno.EAGAIN,
302
303
  ):
303
304
  raise
304
305
  error = exc
@@ -375,7 +376,7 @@ def transfer( # noqa: PLR0912, C901
375
376
  on_error(from_p, to_p, exc)
376
377
  else:
377
378
  raise
378
- except Exception as exc: # noqa: BLE001
379
+ except Exception as exc:
379
380
  if on_error is not None:
380
381
  on_error(from_p, to_p, exc)
381
382
  else:
@@ -128,7 +128,7 @@ class FsspecLocalFileSystem(fsspec.AbstractFileSystem):
128
128
  raise
129
129
 
130
130
  def open(self, path, mode="r", encoding=None, **kwargs):
131
- return open(path, mode=mode, encoding=encoding) # noqa: SIM115
131
+ return open(path, mode=mode, encoding=encoding)
132
132
 
133
133
  def symlink(self, path1, path2):
134
134
  return self.fs.symlink(path1, path2)
@@ -5,7 +5,7 @@ if TYPE_CHECKING:
5
5
 
6
6
 
7
7
  class Object:
8
- __slots__ = ("path", "fs", "oid")
8
+ __slots__ = ("fs", "oid", "path")
9
9
 
10
10
  def __init__(
11
11
  self,
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: dvc-objects
3
- Version: 5.1.0
3
+ Version: 5.1.1
4
4
  Summary: dvc objects - filesystem and object-db level abstractions to use in dvc and dvc-data
5
5
  Author-email: Iterative <support@dvc.org>
6
6
  License: Apache-2.0
@@ -11,14 +11,15 @@ Classifier: Programming Language :: Python :: 3.9
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
14
15
  Classifier: Development Status :: 4 - Beta
15
16
  Requires-Python: >=3.9
16
17
  Description-Content-Type: text/x-rst
17
18
  License-File: LICENSE
18
- Requires-Dist: funcy>=1.14; python_version < "3.12"
19
19
  Requires-Dist: fsspec>=2024.2.0
20
+ Requires-Dist: funcy>=1.14; python_version < "3.12"
20
21
  Provides-Extra: tests
21
- Requires-Dist: pytest<8,>=7; extra == "tests"
22
+ Requires-Dist: pytest<9,>=7; extra == "tests"
22
23
  Requires-Dist: pytest-sugar; extra == "tests"
23
24
  Requires-Dist: pytest-cov>=4.1.0; extra == "tests"
24
25
  Requires-Dist: pytest-mock; extra == "tests"
@@ -27,7 +28,8 @@ Requires-Dist: pytest-asyncio<1,>=0.23.2; extra == "tests"
27
28
  Requires-Dist: reflink; extra == "tests"
28
29
  Provides-Extra: dev
29
30
  Requires-Dist: dvc-objects[tests]; extra == "dev"
30
- Requires-Dist: mypy==1.8.0; extra == "dev"
31
+ Requires-Dist: mypy==1.16.0; extra == "dev"
32
+ Dynamic: license-file
31
33
 
32
34
  DVC objects
33
35
  ===========
@@ -5,10 +5,10 @@ funcy>=1.14
5
5
 
6
6
  [dev]
7
7
  dvc-objects[tests]
8
- mypy==1.8.0
8
+ mypy==1.16.0
9
9
 
10
10
  [tests]
11
- pytest<8,>=7
11
+ pytest<9,>=7
12
12
  pytest-sugar
13
13
  pytest-cov>=4.1.0
14
14
  pytest-mock
@@ -44,9 +44,9 @@ def paths(original, links):
44
44
 
45
45
  def test_link(benchmark, paths, links, link):
46
46
  def setup():
47
- for link in links.iterdir():
48
- if link.is_file():
49
- link.unlink()
47
+ for lnk in links.iterdir():
48
+ if lnk.is_file():
49
+ lnk.unlink()
50
50
 
51
51
  def _link(paths):
52
52
  for src, path in paths:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes