dvc-objects 1.4.5__tar.gz → 1.4.7__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-1.4.5/src/dvc_objects.egg-info → dvc-objects-1.4.7}/PKG-INFO +1 -1
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/generic.py +9 -1
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/utils.py +5 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7/src/dvc_objects.egg-info}/PKG-INFO +1 -1
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/.cruft.json +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/.gitattributes +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/.github/dependabot.yml +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/.github/workflows/release.yml +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/.github/workflows/tests.yml +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/.github/workflows/update-template.yaml +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/.gitignore +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/.pre-commit-config.yaml +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/CODE_OF_CONDUCT.rst +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/CONTRIBUTING.rst +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/LICENSE +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/README.rst +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/noxfile.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/pyproject.toml +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/setup.cfg +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/__init__.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/_tqdm.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/db.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/errors.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/executors.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/__init__.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/base.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/callbacks.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/errors.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/local.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/memory.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/path.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/scheme.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/fs/system.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/obj.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/py.typed +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/transfer.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects/utils.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects.egg-info/SOURCES.txt +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects.egg-info/dependency_links.txt +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects.egg-info/requires.txt +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/src/dvc_objects.egg-info/top_level.txt +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/__init__.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/benchmarks/test_fs.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/conftest.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/fs/__init__.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/fs/test_callbacks.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/fs/test_localfs.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/fs/test_system.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/fs/test_utils.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/test_odb.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/test_reflink.py +0 -0
- {dvc-objects-1.4.5 → dvc-objects-1.4.7}/tests/test_transfer.py +0 -0
|
@@ -2,6 +2,7 @@ import asyncio
|
|
|
2
2
|
import errno
|
|
3
3
|
import logging
|
|
4
4
|
import os
|
|
5
|
+
import sys
|
|
5
6
|
from contextlib import suppress
|
|
6
7
|
from functools import wraps
|
|
7
8
|
from typing import TYPE_CHECKING, Any, Callable, List, Optional, Union
|
|
@@ -11,7 +12,7 @@ from fsspec.asyn import get_loop
|
|
|
11
12
|
from ..executors import ThreadPoolExecutor, batch_coros
|
|
12
13
|
from .callbacks import DEFAULT_CALLBACK
|
|
13
14
|
from .local import LocalFileSystem, localfs
|
|
14
|
-
from .utils import as_atomic
|
|
15
|
+
from .utils import as_atomic, umask
|
|
15
16
|
|
|
16
17
|
if TYPE_CHECKING:
|
|
17
18
|
from .base import AnyFSPath, FileSystem
|
|
@@ -60,6 +61,13 @@ def _link(
|
|
|
60
61
|
|
|
61
62
|
func = getattr(to_fs, link)
|
|
62
63
|
func(from_path, to_path)
|
|
64
|
+
if (
|
|
65
|
+
link == "reflink"
|
|
66
|
+
and sys.platform == "darwin"
|
|
67
|
+
and isinstance(from_fs, LocalFileSystem)
|
|
68
|
+
):
|
|
69
|
+
# NOTE: reflink on macos also clones src permissions
|
|
70
|
+
os.chmod(to_path, 0o666 & ~umask)
|
|
63
71
|
|
|
64
72
|
|
|
65
73
|
def copy(
|
|
@@ -20,6 +20,8 @@ if TYPE_CHECKING:
|
|
|
20
20
|
|
|
21
21
|
logger = logging.getLogger(__name__)
|
|
22
22
|
|
|
23
|
+
umask = os.umask(0)
|
|
24
|
+
os.umask(umask)
|
|
23
25
|
|
|
24
26
|
LOCAL_CHUNK_SIZE = 2**20 # 1 MB
|
|
25
27
|
COPY_PBAR_MIN_SIZE = 2**30 # 1 GB
|
|
@@ -189,6 +191,9 @@ def copyfile(
|
|
|
189
191
|
|
|
190
192
|
try:
|
|
191
193
|
system.reflink(src, dest)
|
|
194
|
+
if sys.platform == "darwin":
|
|
195
|
+
# NOTE: reflink on macos also clones src permissions
|
|
196
|
+
os.chmod(dest, 0o666 & ~umask)
|
|
192
197
|
return
|
|
193
198
|
except OSError:
|
|
194
199
|
pass
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|