huggingface-hub 0.26.0rc0__py3-none-any.whl → 0.26.2__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 huggingface-hub might be problematic. Click here for more details.

@@ -46,7 +46,7 @@ import sys
46
46
  from typing import TYPE_CHECKING
47
47
 
48
48
 
49
- __version__ = "0.26.0.rc0"
49
+ __version__ = "0.26.2"
50
50
 
51
51
  # Alphabetical order of definitions is ensured in tests
52
52
  # WARNING: any comment added in this dictionary definition will be lost when
@@ -36,7 +36,7 @@ Usage:
36
36
 
37
37
  import subprocess
38
38
  from argparse import _SubParsersAction
39
- from typing import Optional
39
+ from typing import List, Optional
40
40
 
41
41
  from requests.exceptions import HTTPError
42
42
 
@@ -200,7 +200,7 @@ class AuthSwitchCommand(BaseUserCommand):
200
200
  except ValueError:
201
201
  print("Invalid input. Please enter a number or 'q' to quit.")
202
202
 
203
- def _select_token_name_tui(self, token_names: list[str]) -> Optional[str]:
203
+ def _select_token_name_tui(self, token_names: List[str]) -> Optional[str]:
204
204
  choices = [Choice(token_name, name=token_name) for token_name in token_names]
205
205
  try:
206
206
  return inquirer.select(
huggingface_hub/hf_api.py CHANGED
@@ -336,7 +336,8 @@ class BlobLfsInfo(dict):
336
336
 
337
337
  @dataclass
338
338
  class BlobSecurityInfo(dict):
339
- safe: bool
339
+ safe: bool # duplicate information with "status" field, keeping it for backward compatibility
340
+ status: str
340
341
  av_scan: Optional[Dict]
341
342
  pickle_import_scan: Optional[Dict]
342
343
 
@@ -656,10 +657,14 @@ class RepoFile:
656
657
  oid=last_commit["id"], title=last_commit["title"], date=parse_datetime(last_commit["date"])
657
658
  )
658
659
  self.last_commit = last_commit
659
- security = kwargs.pop("security", None)
660
+ security = kwargs.pop("securityFileStatus", None)
660
661
  if security is not None:
662
+ safe = security["status"] == "safe"
661
663
  security = BlobSecurityInfo(
662
- safe=security["safe"], av_scan=security["avScan"], pickle_import_scan=security["pickleImportScan"]
664
+ safe=safe,
665
+ status=security["status"],
666
+ av_scan=security["avScan"],
667
+ pickle_import_scan=security["pickleImportScan"],
663
668
  )
664
669
  self.security = security
665
670
 
@@ -769,6 +774,8 @@ class ModelInfo:
769
774
  List of spaces using the model.
770
775
  safetensors (`SafeTensorsInfo`, *optional*):
771
776
  Model's safetensors information.
777
+ security_repo_status (`Dict`, *optional*):
778
+ Model's security scan status.
772
779
  """
773
780
 
774
781
  id: str
@@ -797,6 +804,7 @@ class ModelInfo:
797
804
  siblings: Optional[List[RepoSibling]]
798
805
  spaces: Optional[List[str]]
799
806
  safetensors: Optional[SafeTensorsInfo]
807
+ security_repo_status: Optional[Dict]
800
808
 
801
809
  def __init__(self, **kwargs):
802
810
  self.id = kwargs.pop("id")
@@ -862,7 +870,7 @@ class ModelInfo:
862
870
  if safetensors
863
871
  else None
864
872
  )
865
-
873
+ self.security_repo_status = kwargs.pop("securityRepoStatus", None)
866
874
  # backwards compatibility
867
875
  self.lastModified = self.last_modified
868
876
  self.cardData = self.card_data
@@ -2484,7 +2492,7 @@ class HfApi:
2484
2492
  Whether to set a timeout for the request to the Hub.
2485
2493
  securityStatus (`bool`, *optional*):
2486
2494
  Whether to retrieve the security status from the model
2487
- repository as well.
2495
+ repository as well. The security status will be returned in the `security_repo_status` field.
2488
2496
  files_metadata (`bool`, *optional*):
2489
2497
  Whether or not to retrieve metadata for files in the repository
2490
2498
  (size, LFS metadata, etc). Defaults to `False`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: huggingface-hub
3
- Version: 0.26.0rc0
3
+ Version: 0.26.2
4
4
  Summary: Client library to download and publish models, datasets and other repos on the huggingface.co hub
5
5
  Home-page: https://github.com/huggingface/huggingface_hub
6
6
  Author: Hugging Face, Inc.
@@ -1,4 +1,4 @@
1
- huggingface_hub/__init__.py,sha256=OV4gdDzK7x3Nzzm-HzWON6NTyVOcOe5RBPTS1J7Qriw,35997
1
+ huggingface_hub/__init__.py,sha256=sIbMsG9xCYwthM45i9PiivGupn4uPd1AgjAsOERbH18,35993
2
2
  huggingface_hub/_commit_api.py,sha256=Y9eTaW4bYzxtrZsSniVtfeAuFafqx8x1ofMI5es8hvM,31057
3
3
  huggingface_hub/_commit_scheduler.py,sha256=nlJS_vnLb8i92NLrRwJX8Mg9QZ7f3kfLbLlQuEd5YjU,13647
4
4
  huggingface_hub/_inference_endpoints.py,sha256=wzjD8P68VpUDHzIDbXzFXsM2Y-aNVSAap7BXsZFuthk,16750
@@ -16,7 +16,7 @@ huggingface_hub/constants.py,sha256=WshhUKAs6kyoBPN1ek9Zsr2JY-bvjof69VJOfuu8tm4,
16
16
  huggingface_hub/errors.py,sha256=CbcLWbwQG5P1kReMUmCovPONciXmqLfTzAHXD-xJVDs,9276
17
17
  huggingface_hub/fastai_utils.py,sha256=o0BnmigoNP3H7Sf8w8bwuRaN-9FKlL6uoPawr4HSyjc,16647
18
18
  huggingface_hub/file_download.py,sha256=Y4ngJd_V37OCjJichBE0ZuHiP-Z_B4jaxgeeEGGJzXg,70630
19
- huggingface_hub/hf_api.py,sha256=J6c9P9YBmg3qy7GJVNGdoYTBMlrFmYVX8ynWJT1_eqs,439645
19
+ huggingface_hub/hf_api.py,sha256=p1lwufce0XsOjZ_OmXSSA0erHCAliyPMQi7pCYhDlvE,440149
20
20
  huggingface_hub/hf_file_system.py,sha256=2i88wje7OcYZPgMv_TRXHZso1D26wmY6Sj3ZL5BqICo,39163
21
21
  huggingface_hub/hub_mixin.py,sha256=H6gN5EBRn5A8zc6jHj1FpjGDLOar2M67wOssGkvin0M,37551
22
22
  huggingface_hub/inference_api.py,sha256=b4-NhPSn9b44nYKV8tDKXodmE4JVdEymMWL4CVGkzlE,8323
@@ -37,7 +37,7 @@ huggingface_hub/commands/scan_cache.py,sha256=CSXyIDCzOcxSFwIc_SqUC6J_TIc7uHXjrt
37
37
  huggingface_hub/commands/tag.py,sha256=0LNQZyK-WKi0VIL9i1xWzKxJ1ILw1jxMF_E6t2weJss,6288
38
38
  huggingface_hub/commands/upload.py,sha256=xMExm68YcR8R_dDRi3bcIC1qVCvRFRW7aP_AGxGZ1rc,13656
39
39
  huggingface_hub/commands/upload_large_folder.py,sha256=LKvzEmKeRatBLlnJF__b5jFBQ8bcM2KQgN_Pcf1X5hE,6128
40
- huggingface_hub/commands/user.py,sha256=imsUyvOD7ZF4YvKzBuuaX-Y8ytNv-xDD6ELdH4hHGfU,11162
40
+ huggingface_hub/commands/user.py,sha256=M6Ef045YcyV4mFCbLaTRPciQDC6xtV9MMheeen69D0E,11168
41
41
  huggingface_hub/commands/version.py,sha256=vfCJn7GO1m-DtDmbdsty8_RTVtnZ7lX6MJsx0Bf4e-s,1266
42
42
  huggingface_hub/inference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
43
  huggingface_hub/inference/_client.py,sha256=W34WHKnZq5FpY7zxTE9UNZtQZVmrjYCApZEozK-kIkA,146734
@@ -109,9 +109,9 @@ huggingface_hub/utils/insecure_hashlib.py,sha256=OjxlvtSQHpbLp9PWSrXBDJ0wHjxCBU-
109
109
  huggingface_hub/utils/logging.py,sha256=Cp03s0uEl3kDM9XHQW9a8GAoExODQ-e7kEtgMt-_To8,4728
110
110
  huggingface_hub/utils/sha.py,sha256=OFnNGCba0sNcT2gUwaVCJnldxlltrHHe0DS_PCpV3C4,2134
111
111
  huggingface_hub/utils/tqdm.py,sha256=jQiVYwRG78HK4_54u0vTtz6Kt9IMGiHy3ixbIn3h2TU,9368
112
- huggingface_hub-0.26.0rc0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
113
- huggingface_hub-0.26.0rc0.dist-info/METADATA,sha256=RggpUdwAedV3_bejO9s-AQKxNzdSUTFyxt3tl9CGKe8,13094
114
- huggingface_hub-0.26.0rc0.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
115
- huggingface_hub-0.26.0rc0.dist-info/entry_points.txt,sha256=Y3Z2L02rBG7va_iE6RPXolIgwOdwUFONyRN3kXMxZ0g,131
116
- huggingface_hub-0.26.0rc0.dist-info/top_level.txt,sha256=8KzlQJAY4miUvjAssOAJodqKOw3harNzuiwGQ9qLSSk,16
117
- huggingface_hub-0.26.0rc0.dist-info/RECORD,,
112
+ huggingface_hub-0.26.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
113
+ huggingface_hub-0.26.2.dist-info/METADATA,sha256=h9cDU1nJ7L3J4CI7nXZp4AOBb1JxgM58DU99ilZb1RY,13091
114
+ huggingface_hub-0.26.2.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
115
+ huggingface_hub-0.26.2.dist-info/entry_points.txt,sha256=Y3Z2L02rBG7va_iE6RPXolIgwOdwUFONyRN3kXMxZ0g,131
116
+ huggingface_hub-0.26.2.dist-info/top_level.txt,sha256=8KzlQJAY4miUvjAssOAJodqKOw3harNzuiwGQ9qLSSk,16
117
+ huggingface_hub-0.26.2.dist-info/RECORD,,