|
7 | 7 | from dvc_http import HTTPFileSystem |
8 | 8 | from dvc_objects.executors import batch_coros |
9 | 9 | from dvc_objects.fs import localfs |
10 | | -from dvc_objects.fs.callbacks import DEFAULT_CALLBACK |
11 | 10 | from dvc_objects.fs.utils import as_atomic |
12 | 11 | from fsspec.asyn import sync_wrapper |
| 12 | +from fsspec.callbacks import DEFAULT_CALLBACK |
13 | 13 | from funcy import cached_property |
14 | 14 |
|
15 | 15 | from scmrepo.git.credentials import Credential, CredentialNotFoundError |
|
18 | 18 | from .pointer import Pointer |
19 | 19 |
|
20 | 20 | if TYPE_CHECKING: |
21 | | - from dvc_objects.fs.callbacks import Callback |
| 21 | + from fsspec.callbacks import Callback |
22 | 22 |
|
23 | 23 | from .storage import LFSStorage |
24 | 24 |
|
@@ -142,8 +142,10 @@ async def _download( |
142 | 142 | ): |
143 | 143 | async def _get_one(from_path: str, to_path: str, **kwargs): |
144 | 144 | with as_atomic(localfs, to_path, create_parents=True) as tmp_file: |
145 | | - with callback.branch(from_path, tmp_file, kwargs): |
146 | | - await self.httpfs._get_file(from_path, tmp_file, **kwargs) # pylint: disable=protected-access |
| 145 | + with callback.branched(from_path, tmp_file) as child: |
| 146 | + await self.httpfs._get_file( |
| 147 | + from_path, tmp_file, callback=child, **kwargs |
| 148 | + ) # pylint: disable=protected-access |
147 | 149 | callback.relative_update() |
148 | 150 |
|
149 | 151 | resp_data = await self._batch_request(objects, **kwargs) |
|
0 commit comments