thds.adls 4.1.20250703020842__py3-none-any.whl → 4.1.20250709174808__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/download.py CHANGED
@@ -320,6 +320,18 @@ def _excs_to_retry() -> ty.Callable[[Exception], bool]:
320
320
  )
321
321
 
322
322
 
323
+ def _log_nonfatal_hash_error_exc(exc: Exception, url: str) -> None:
324
+ """Azure exceptions are very noisy."""
325
+ msg = "Unable to set hash for %s: %s"
326
+ exception_txt = str(exc)
327
+ log, extra_txt = (
328
+ (logger.debug, type(exc).__name__)
329
+ if ("AuthorizationPermissionMismatch" in exception_txt or "ConditionNotMet" in exception_txt)
330
+ else (logger.warning, exception_txt)
331
+ )
332
+ log(msg, url, extra_txt)
333
+
334
+
323
335
  @_dl_scope.bound
324
336
  def download_or_use_verified(
325
337
  fs_client: FileSystemClient,
@@ -362,7 +374,7 @@ def download_or_use_verified(
362
374
  assert file_properties
363
375
  dl_file_client.set_metadata(meta, **etag.match_etag(file_properties))
364
376
  except (HttpResponseError, ResourceModifiedError) as ex:
365
- logger.info(f"Unable to set Hash for {remote_key}: {ex}")
377
+ _log_nonfatal_hash_error_exc(ex, dl_file_client.url)
366
378
  return si.value.hit
367
379
  except AzureError as err:
368
380
  errors.translate_azure_error(fs_client, remote_key, err)
@@ -420,7 +432,7 @@ async def async_download_or_use_verified(
420
432
  await dl_file_client.set_metadata(meta, **etag.match_etag(file_properties)) # type: ignore[misc]
421
433
  # TODO - check above type ignore
422
434
  except (HttpResponseError, ResourceModifiedError) as ex:
423
- logger.info(f"Unable to set Hash for {remote_key}: {ex}")
435
+ _log_nonfatal_hash_error_exc(ex, dl_file_client.url)
424
436
  return si.value.hit
425
437
  except AzureError as err:
426
438
  errors.translate_azure_error(fs_client, remote_key, err)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thds.adls
3
- Version: 4.1.20250703020842
3
+ Version: 4.1.20250709174808
4
4
  Summary: ADLS tools
5
5
  Author-email: Trilliant Health <info@trillianthealth.com>
6
6
  License: MIT
@@ -7,7 +7,7 @@ thds/adls/conf.py,sha256=nTw3X1ilC3A_905jZH-rWXFsESeHAKQn5IghvfX2VIo,1991
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=GGq5Pn4r-8cX4bZItp4nnwWAAz7S07pzPoOegw0y5Fw,676
10
- thds/adls/download.py,sha256=u-ckaExnTMAVUlhMbnxM_urBggbZkgXMQSSfp1czPeQ,18350
10
+ thds/adls/download.py,sha256=WOpMXGUbWImBdkM4tSW7qnCbu7G_cRXKF5pFQVLPPxs,18772
11
11
  thds/adls/download_lock.py,sha256=tgT48l4C5_qmArGeq05gl7VlxT22dZBH2Xwxx0itE9o,3176
12
12
  thds/adls/errors.py,sha256=6cLg2E4SB8ic46PBzA3ynRH4b1oR8qRb07RBgKGJRxY,1783
13
13
  thds/adls/etag.py,sha256=ct7jpHhNFcKzbekn5rZ3m6DhjK48A7qOZGwDiHkc-pc,242
@@ -35,8 +35,8 @@ thds/adls/azcopy/upload.py,sha256=0l5FzV9IgZ2iQhm4eKZjTdw4SO17bHd8VnwcTev1lUs,27
35
35
  thds/adls/tools/download.py,sha256=CW2cWbCRdUqisVVVoqqvqk5Ved7pPGTkwnZj3uV0jy4,1587
36
36
  thds/adls/tools/ls.py,sha256=OgEaIfTK359twlZIj-A0AW_nv81Z6zi0b9Tw6OJJfWA,1083
37
37
  thds/adls/tools/upload.py,sha256=5WyWkpuVp2PETZ3O3ODlq8LXszSHU73ZMnIDZXPJdC8,442
38
- thds_adls-4.1.20250703020842.dist-info/METADATA,sha256=zWALY04Mrs1zZNpje2AyaiU-B6tN7La5ldtAbVEXxac,587
39
- thds_adls-4.1.20250703020842.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
- thds_adls-4.1.20250703020842.dist-info/entry_points.txt,sha256=uTqreT1AIwqJboMfLv5w6sviM8mNbAkln765gIjzoA4,152
41
- thds_adls-4.1.20250703020842.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
42
- thds_adls-4.1.20250703020842.dist-info/RECORD,,
38
+ thds_adls-4.1.20250709174808.dist-info/METADATA,sha256=-mRVDeTBKoaoIACUBVh0BokOp2jrVOM11eQLfSOP0E4,587
39
+ thds_adls-4.1.20250709174808.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
40
+ thds_adls-4.1.20250709174808.dist-info/entry_points.txt,sha256=uTqreT1AIwqJboMfLv5w6sviM8mNbAkln765gIjzoA4,152
41
+ thds_adls-4.1.20250709174808.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
42
+ thds_adls-4.1.20250709174808.dist-info/RECORD,,