thds.adls 3.1.20250227231052__py3-none-any.whl → 3.1.20250228005732__py3-none-any.whl
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.
Potentially problematic release.
This version of thds.adls might be problematic. Click here for more details.
- thds/adls/_upload.py +1 -1
- thds/adls/azcopy/download.py +1 -2
- thds/adls/download.py +6 -13
- thds/adls/file_properties.py +1 -1
- thds/adls/impl.py +5 -5
- thds/adls/sas_tokens.py +0 -2
- {thds_adls-3.1.20250227231052.dist-info → thds_adls-3.1.20250228005732.dist-info}/METADATA +1 -1
- {thds_adls-3.1.20250227231052.dist-info → thds_adls-3.1.20250228005732.dist-info}/RECORD +11 -11
- {thds_adls-3.1.20250227231052.dist-info → thds_adls-3.1.20250228005732.dist-info}/WHEEL +0 -0
- {thds_adls-3.1.20250227231052.dist-info → thds_adls-3.1.20250228005732.dist-info}/entry_points.txt +0 -0
- {thds_adls-3.1.20250227231052.dist-info → thds_adls-3.1.20250228005732.dist-info}/top_level.txt +0 -0
thds/adls/_upload.py
CHANGED
thds/adls/azcopy/download.py
CHANGED
|
@@ -178,8 +178,7 @@ async def async_fastpath(
|
|
|
178
178
|
except (subprocess.SubprocessError, FileNotFoundError):
|
|
179
179
|
logger.warning("Falling back to Python SDK for download")
|
|
180
180
|
|
|
181
|
-
reader = await dl_file_client.download_file(
|
|
182
|
-
# TODO - check above type ignore
|
|
181
|
+
reader = await dl_file_client.download_file(
|
|
183
182
|
max_concurrency=conf.DOWNLOAD_FILE_MAX_CONCURRENCY(),
|
|
184
183
|
connection_timeout=conf.CONNECTION_TIMEOUT(),
|
|
185
184
|
)
|
thds/adls/download.py
CHANGED
|
@@ -208,8 +208,7 @@ def _download_or_use_verified_cached_coroutine( # noqa: C901
|
|
|
208
208
|
# we don't know what we expect, so attempt to retrieve an
|
|
209
209
|
# expectation from ADLS itself.
|
|
210
210
|
file_properties = yield _IoRequest.FILE_PROPERTIES
|
|
211
|
-
md5b64 = _remote_md5b64(file_properties)
|
|
212
|
-
# TODO - check above type ignore
|
|
211
|
+
md5b64 = _remote_md5b64(file_properties)
|
|
213
212
|
|
|
214
213
|
def attempt_cache_hit() -> ty.Optional[_FileResult]:
|
|
215
214
|
if not md5b64:
|
|
@@ -260,8 +259,7 @@ def _download_or_use_verified_cached_coroutine( # noqa: C901
|
|
|
260
259
|
file_properties = yield _IoRequest.FILE_PROPERTIES
|
|
261
260
|
# no point in downloading if we've asked for hash X but ADLS only has hash Y.
|
|
262
261
|
with _verify_md5s_before_and_after_download(
|
|
263
|
-
_remote_md5b64(file_properties),
|
|
264
|
-
# TODO - check above type ignore
|
|
262
|
+
_remote_md5b64(file_properties),
|
|
265
263
|
md5b64,
|
|
266
264
|
fqn,
|
|
267
265
|
local_path,
|
|
@@ -295,7 +293,7 @@ def _prep_download_coroutine(
|
|
|
295
293
|
DataLakeFileClient,
|
|
296
294
|
]:
|
|
297
295
|
co = _download_or_use_verified_cached_coroutine(
|
|
298
|
-
AdlsFqn(
|
|
296
|
+
AdlsFqn(fs_client.account_name, fs_client.file_system_name, remote_key),
|
|
299
297
|
local_path,
|
|
300
298
|
md5b64=md5b64,
|
|
301
299
|
cache=cache,
|
|
@@ -308,8 +306,7 @@ def _set_md5_if_missing(
|
|
|
308
306
|
) -> ty.Optional[ContentSettings]:
|
|
309
307
|
if not file_properties or file_properties.content_settings.content_md5:
|
|
310
308
|
return None
|
|
311
|
-
file_properties.content_settings.content_md5 = b64decode(md5b64)
|
|
312
|
-
# TODO - check above type ignore
|
|
309
|
+
file_properties.content_settings.content_md5 = b64decode(md5b64)
|
|
313
310
|
return file_properties.content_settings
|
|
314
311
|
|
|
315
312
|
|
|
@@ -373,8 +370,7 @@ async def async_download_or_use_verified(
|
|
|
373
370
|
if co_request == _IoRequest.FILE_PROPERTIES:
|
|
374
371
|
if not file_properties:
|
|
375
372
|
# only fetch these if they haven't already been requested
|
|
376
|
-
file_properties = await dl_file_client.get_file_properties()
|
|
377
|
-
# TODO - check above type ignore
|
|
373
|
+
file_properties = await dl_file_client.get_file_properties()
|
|
378
374
|
co_request = co.send(file_properties)
|
|
379
375
|
elif isinstance(co_request, azcopy.download.DownloadRequest):
|
|
380
376
|
# coroutine is requesting download
|
|
@@ -388,10 +384,7 @@ async def async_download_or_use_verified(
|
|
|
388
384
|
try:
|
|
389
385
|
logger.info(f"Setting missing MD5 for {remote_key}")
|
|
390
386
|
assert file_properties
|
|
391
|
-
await dl_file_client.set_http_headers(
|
|
392
|
-
cs, **match_etag(file_properties)
|
|
393
|
-
)
|
|
394
|
-
# TODO - check above type ignore
|
|
387
|
+
await dl_file_client.set_http_headers(cs, **match_etag(file_properties))
|
|
395
388
|
except HttpResponseError as hre:
|
|
396
389
|
logger.info(f"Unable to set MD5 for {remote_key}: {hre}")
|
|
397
390
|
return si.value.hit
|
thds/adls/file_properties.py
CHANGED
|
@@ -9,7 +9,7 @@ from .global_client import get_global_blob_container_client, get_global_fs_clien
|
|
|
9
9
|
|
|
10
10
|
def is_directory(info: FileProperties) -> bool:
|
|
11
11
|
# from https://github.com/Azure/azure-sdk-for-python/issues/24814#issuecomment-1159280840
|
|
12
|
-
return str(info.
|
|
12
|
+
return str(info.metadata.get("hdi_isfolder", "")).lower() == "true"
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
def get_file_properties(fqn: AdlsFqn) -> FileProperties:
|
thds/adls/impl.py
CHANGED
|
@@ -14,6 +14,7 @@ from typing import (
|
|
|
14
14
|
AsyncIterator,
|
|
15
15
|
Awaitable,
|
|
16
16
|
Callable,
|
|
17
|
+
Dict,
|
|
17
18
|
Iterable,
|
|
18
19
|
List,
|
|
19
20
|
Mapping,
|
|
@@ -456,7 +457,7 @@ class ADLSFileSystem:
|
|
|
456
457
|
incl_subdirs: bool = False,
|
|
457
458
|
batch_size: Optional[int] = None,
|
|
458
459
|
recursive: bool = True,
|
|
459
|
-
path_filter: Optional[Callable[[
|
|
460
|
+
path_filter: Optional[Callable[[FileProperties], bool]] = None,
|
|
460
461
|
) -> List[FileProperties]:
|
|
461
462
|
"""Returns a list of `FileProperties` for files in a remote directory.
|
|
462
463
|
|
|
@@ -491,7 +492,7 @@ class ADLSFileSystem:
|
|
|
491
492
|
file_system_client: FileSystemClient,
|
|
492
493
|
remote_paths: Iterable[str],
|
|
493
494
|
batch_size: Optional[int] = None,
|
|
494
|
-
) -> List[
|
|
495
|
+
) -> List[Dict[str, Any]]:
|
|
495
496
|
"""Returns a list of `FileProperties` for each file in a list of remote file paths.
|
|
496
497
|
|
|
497
498
|
See :meth:`~ADLSFileSystem.get_files_info` for more details.
|
|
@@ -690,11 +691,10 @@ class ADLSFileSystem:
|
|
|
690
691
|
self, it: AsyncIterable[T], size: Optional[int] = None
|
|
691
692
|
) -> AsyncIterator[List[T]]:
|
|
692
693
|
"""Async batch generator"""
|
|
693
|
-
# TODO - look at type ignores here
|
|
694
694
|
batch_size = size if size is not None else self.default_batch_size
|
|
695
|
-
async with stream.chunks(it, batch_size).stream() as streamer:
|
|
695
|
+
async with stream.chunks(it, batch_size).stream() as streamer:
|
|
696
696
|
async for chunk in streamer:
|
|
697
|
-
yield chunk
|
|
697
|
+
yield chunk
|
|
698
698
|
|
|
699
699
|
def fetch_files(self, remote_paths: Union[Iterable[str], Mapping[str, Union[Path, str]]]):
|
|
700
700
|
return self._run(self._fetch_files, remote_paths)
|
thds/adls/sas_tokens.py
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
thds/adls/__init__.py,sha256=er14MoCC9PlJMxWVS4G1hAeMJItaJj4EAsrTZlvlb0M,797
|
|
2
2
|
thds/adls/_progress.py,sha256=ZzCHn_G7nHakioNFxdvoJZRr-jN6ymsp5JXf-iReROM,6580
|
|
3
|
-
thds/adls/_upload.py,sha256=
|
|
3
|
+
thds/adls/_upload.py,sha256=q6Sk0CRnNcAjUOUPiBj4CfO4tJD196SQY0lT25CTSE4,4364
|
|
4
4
|
thds/adls/abfss.py,sha256=ZRJOLjDuXmS4bIbQAQpQxWWWeu74N9NKEKCNfXQek80,726
|
|
5
5
|
thds/adls/cached_up_down.py,sha256=CEqg-Q9FB_fvgCsN0C_dn9CJqnEpnF0lA7gCdd9s6gg,2721
|
|
6
6
|
thds/adls/conf.py,sha256=q1SPrgb46NpobVzwt_Oyv71-BvsIbZLq9nRWS3LZjz0,1990
|
|
7
7
|
thds/adls/copy.py,sha256=jUWbGvTpb4B3yRGS0nhGSbDzqRPzUqYgH0z1lFRJB3k,6365
|
|
8
8
|
thds/adls/dbfs.py,sha256=pPAjbIZRKJsaXKQljDMUgqS_zy1yKeEZHGMueXbuv3g,2219
|
|
9
9
|
thds/adls/defaults.py,sha256=VxyaGz1gCcz2rGTR9acNRybbxGOYhTldvD_-SdGLBh0,652
|
|
10
|
-
thds/adls/download.py,sha256=
|
|
10
|
+
thds/adls/download.py,sha256=Vfd9DEHUmSKPKpKxf9WjkqAzZFZwIgjo4fgM5aIvW0g,16455
|
|
11
11
|
thds/adls/download_lock.py,sha256=_JZj-kjCUfHk9FvrmEuYpJYknmbam5eReFhGNDgzdLQ,2520
|
|
12
12
|
thds/adls/errors.py,sha256=B_rMsQvQnNmP_sf-x8kmGsv2vIeOh4G9kVbdNVyk350,1469
|
|
13
13
|
thds/adls/etag.py,sha256=ct7jpHhNFcKzbekn5rZ3m6DhjK48A7qOZGwDiHkc-pc,242
|
|
14
|
-
thds/adls/file_properties.py,sha256=
|
|
14
|
+
thds/adls/file_properties.py,sha256=JFkobkxcAaRGAh3TJ9mfc3X872gqrGuw4Xk_HSTj1sY,1582
|
|
15
15
|
thds/adls/fqn.py,sha256=0zHmHhBWN7GEfKRB3fBC1NVhaiIHHifBdCRanyT01X8,5822
|
|
16
16
|
thds/adls/global_client.py,sha256=f4VJw5y_Yh__8gQUcdSYTh1aU6iEPlauMchVirSAwDQ,3716
|
|
17
|
-
thds/adls/impl.py,sha256=
|
|
17
|
+
thds/adls/impl.py,sha256=x1nSqc8W4NeuX8-JGOp2MRkK8ff6GnelTWedGxPs-qY,42494
|
|
18
18
|
thds/adls/md5.py,sha256=qOX4_7WUj1QkbH_IwREcQNHvvZccOj-HpHZBfsKn1gY,1846
|
|
19
19
|
thds/adls/named_roots.py,sha256=7SLbAoQQpV_mrFZaUPjYoS-F9dxQxN5Hg4M3YPirF_w,751
|
|
20
20
|
thds/adls/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
21
21
|
thds/adls/ro_cache.py,sha256=F0uXol0t95mcRuBukNg3A7wt7XXQxpD5Sy09d9sl8f0,4825
|
|
22
|
-
thds/adls/sas_tokens.py,sha256=
|
|
22
|
+
thds/adls/sas_tokens.py,sha256=tO7uUh5EVp2F_NITzz1Vks78KCZwVxT7C0faLj8UJqA,1889
|
|
23
23
|
thds/adls/shared_credential.py,sha256=-x42aXoIM001KW59oS8PpuXQd4-F2vg-1gB6OMHlpk4,4602
|
|
24
24
|
thds/adls/source.py,sha256=1JYliDqafqpLewOQ2XMKp4T2WD7b5Rl7XYViyLYtzX8,2437
|
|
25
25
|
thds/adls/source_tree.py,sha256=CiyCwgItF186aOoYiICkWt2oMLGMD6v526HRi8XWHtM,2219
|
|
26
26
|
thds/adls/uri.py,sha256=pDH956p_VEHnjLLUnjWY6sGgRqksp9gdpc9KOW4gEP0,1205
|
|
27
27
|
thds/adls/azcopy/__init__.py,sha256=nTNbgz2GcEiGeswYbAgy4oPhivnzl_5crF3HqCdWWiw,31
|
|
28
|
-
thds/adls/azcopy/download.py,sha256=
|
|
28
|
+
thds/adls/azcopy/download.py,sha256=_I0smR2f9pu0xIiQC9C97Xb-GHMGwn5dqbEhz41H-qo,6548
|
|
29
29
|
thds/adls/resource/__init__.py,sha256=IZ7_aRf1b3jEp7wXOxqHop0gV2gUcf9SOLeEEjIWlCU,1669
|
|
30
30
|
thds/adls/resource/core.py,sha256=BVM91xsZ_B_CoGTc9DDD3FnGy8g6X-9eFpa86ZCzuZI,2717
|
|
31
31
|
thds/adls/resource/file_pointers.py,sha256=PLru_3lwut_ZvrX5Keu-wJkPOt5o7UGf-OOT4ixaXME,2049
|
|
@@ -33,8 +33,8 @@ thds/adls/resource/up_down.py,sha256=3uNlTvm2gVhSyYdQTBwsGecOgwtINQfINckR-awwV0Y
|
|
|
33
33
|
thds/adls/tools/download.py,sha256=vvBO8lSDl9oPugv75qpCkoemT9pOM9BV6yeExlkyG08,1594
|
|
34
34
|
thds/adls/tools/ls.py,sha256=OgEaIfTK359twlZIj-A0AW_nv81Z6zi0b9Tw6OJJfWA,1083
|
|
35
35
|
thds/adls/tools/upload.py,sha256=eMk4pdug1aCMPDDWpIE3Zoq77i5APp9Uuh-sVCCDNJE,493
|
|
36
|
-
thds_adls-3.1.
|
|
37
|
-
thds_adls-3.1.
|
|
38
|
-
thds_adls-3.1.
|
|
39
|
-
thds_adls-3.1.
|
|
40
|
-
thds_adls-3.1.
|
|
36
|
+
thds_adls-3.1.20250228005732.dist-info/METADATA,sha256=XcZ8jHlntoKpLBpnrrNtV1h_tAn8BR1A_ZOOGI37aJI,543
|
|
37
|
+
thds_adls-3.1.20250228005732.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
|
|
38
|
+
thds_adls-3.1.20250228005732.dist-info/entry_points.txt,sha256=uTqreT1AIwqJboMfLv5w6sviM8mNbAkln765gIjzoA4,152
|
|
39
|
+
thds_adls-3.1.20250228005732.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
|
|
40
|
+
thds_adls-3.1.20250228005732.dist-info/RECORD,,
|
|
File without changes
|
{thds_adls-3.1.20250227231052.dist-info → thds_adls-3.1.20250228005732.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{thds_adls-3.1.20250227231052.dist-info → thds_adls-3.1.20250228005732.dist-info}/top_level.txt
RENAMED
|
File without changes
|