File tree 4 files changed +9
-13
lines changed
4 files changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ classifiers = [
22
22
requires-python = " >=3.8"
23
23
dynamic = [" version" ]
24
24
dependencies = [
25
- " funcy>=1.14" ,
25
+ " funcy>=1.14; python_version < '3.12' " ,
26
26
" fsspec>=2022.10.0" ,
27
27
]
28
28
@@ -169,8 +169,8 @@ parametrize-names-type = "csv"
169
169
170
170
[tool .ruff .lint .flake8-tidy-imports ]
171
171
[tool .ruff .lint .flake8-tidy-imports .banned-api ]
172
- "funcy.cached_property" = {msg = " use `from dvc_objects.utils import cached_property` instead." }
173
- "functools.cached_property" = {msg = " use `from dvc_objects.utils import cached_property` instead." }
172
+ "funcy.cached_property" = {msg = " use `from dvc_objects.compat import cached_property` instead." }
173
+ "functools.cached_property" = {msg = " use `from dvc_objects.compat import cached_property` instead." }
174
174
175
175
[tool .ruff .lint .flake8-type-checking ]
176
176
strict = true
Original file line number Diff line number Diff line change
1
+ import sys
1
2
from typing import TYPE_CHECKING
2
3
3
- if TYPE_CHECKING :
4
+ if sys . version_info >= ( 3 , 12 ) or TYPE_CHECKING :
4
5
from functools import cached_property # noqa: TID251
5
6
else :
6
7
from funcy import cached_property # noqa: TID251
Original file line number Diff line number Diff line change 29
29
import fsspec
30
30
from fsspec .asyn import get_loop
31
31
32
+ from dvc_objects .compat import cached_property
32
33
from dvc_objects .executors import ThreadPoolExecutor , batch_coros
33
- from dvc_objects .utils import cached_property
34
34
35
35
from .callbacks import (
36
36
DEFAULT_CALLBACK ,
Original file line number Diff line number Diff line change 1
1
import logging
2
2
import os
3
3
import shutil
4
- import threading
5
4
6
5
import fsspec
7
- from funcy import wrap_prop
8
-
9
- from dvc_objects .utils import cached_property
10
6
11
7
from . import system
12
8
from .base import FileSystem
@@ -185,10 +181,9 @@ class LocalFileSystem(FileSystem):
185
181
PARAM_PATH = "path"
186
182
TRAVERSE_PREFIX_LEN = 2
187
183
188
- @wrap_prop (threading .Lock ()) # type: ignore[misc]
189
- @cached_property
190
- def fs (self ):
191
- return FsspecLocalFileSystem (** self .config )
184
+ def __init__ (self , fs = None , ** kwargs ):
185
+ fs = fs or FsspecLocalFileSystem (** kwargs )
186
+ super ().__init__ (fs , ** kwargs )
192
187
193
188
def getcwd (self ):
194
189
return os .getcwd ()
You can’t perform that action at this time.
0 commit comments