fal 1.22.0__py3-none-any.whl → 1.23.0__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 fal might be problematic. Click here for more details.

fal/_fal_version.py CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.22.0'
21
- __version_tuple__ = version_tuple = (1, 22, 0)
20
+ __version__ = version = '1.23.0'
21
+ __version_tuple__ = version_tuple = (1, 23, 0)
fal/container.py CHANGED
@@ -19,6 +19,7 @@ class ContainerImage:
19
19
  builder: Optional[Builder] = field(default=None)
20
20
  compression: str = DEFAULT_COMPRESSION
21
21
  force_compression: bool = DEFAULT_FORCE_COMPRESSION
22
+ secrets: Dict[str, str] = field(default_factory=dict)
22
23
 
23
24
  def __post_init__(self) -> None:
24
25
  if self.registries:
@@ -51,4 +52,5 @@ class ContainerImage:
51
52
  "builder": self.builder,
52
53
  "compression": self.compression,
53
54
  "force_compression": self.force_compression,
55
+ "secrets": self.secrets,
54
56
  }
@@ -427,13 +427,22 @@ def clone_repository(
427
427
  if repo_name is None:
428
428
  repo_name = Path(https_url).stem
429
429
  if commit_hash:
430
+ if len(commit_hash) < 8:
431
+ raise ValueError(f"Commit hash '{commit_hash}' is too short.")
430
432
  repo_name += f"-{commit_hash[:8]}"
431
433
 
432
434
  local_repo_path = Path(target_dir) / repo_name # type: ignore[arg-type]
433
435
 
434
436
  if local_repo_path.exists():
435
- local_repo_commit_hash = _get_git_revision_hash(local_repo_path)
436
- if local_repo_commit_hash == commit_hash and not force:
437
+ local_repo_commit_hash = _git_rev_parse(local_repo_path, "HEAD")
438
+ full_commit_hash = (
439
+ _git_rev_parse(local_repo_path, commit_hash) if commit_hash else None
440
+ )
441
+ if (
442
+ full_commit_hash
443
+ and local_repo_commit_hash == full_commit_hash
444
+ and not force
445
+ ):
437
446
  if include_to_path:
438
447
  __add_local_path_to_sys_path(local_repo_path)
439
448
  return local_repo_path
@@ -516,12 +525,12 @@ def __add_local_path_to_sys_path(local_path: Path | str):
516
525
  sys.path.insert(0, local_path_str)
517
526
 
518
527
 
519
- def _get_git_revision_hash(repo_path: Path) -> str:
528
+ def _git_rev_parse(repo_path: Path, ref: str) -> str:
520
529
  import subprocess
521
530
 
522
531
  try:
523
532
  return subprocess.check_output(
524
- ["git", "rev-parse", "HEAD"],
533
+ ["git", "rev-parse", ref],
525
534
  cwd=repo_path,
526
535
  text=True,
527
536
  stderr=subprocess.STDOUT,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fal
3
- Version: 1.22.0
3
+ Version: 1.23.0
4
4
  Summary: fal is an easy-to-use Serverless Python Framework
5
5
  Author: Features & Labels <support@fal.ai>
6
6
  Requires-Python: >=3.8
@@ -1,13 +1,13 @@
1
1
  fal/__init__.py,sha256=wXs1G0gSc7ZK60-bHe-B2m0l_sA6TrFk4BxY0tMoLe8,784
2
2
  fal/__main__.py,sha256=4JMK66Wj4uLZTKbF-sT3LAxOsr6buig77PmOkJCRRxw,83
3
- fal/_fal_version.py,sha256=kabBVDEUDLijsKri4qrNeWMmy6rv5W4lO7kJYfMb9Mg,513
3
+ fal/_fal_version.py,sha256=5phfzDrMzuxkew7dkMe3AQHf5yuGHlEWJi5-3xyi6aM,513
4
4
  fal/_serialization.py,sha256=npXNsFJ5G7jzBeBIyVMH01Ww34mGY4XWhHpRbSrTtnQ,7598
5
5
  fal/_version.py,sha256=1BbTFnucNC_6ldKJ_ZoC722_UkW4S9aDBSW9L0fkKAw,2315
6
6
  fal/api.py,sha256=vTYWeKnNg3japot1vOV_JSk812aeB6a2Y7lC1ed-VmM,47277
7
7
  fal/app.py,sha256=pMf7P9iVEcw5HiFCYgSdHkjX6f-1SPe06EOwYH1ImGA,24079
8
8
  fal/apps.py,sha256=pzCd2mrKl5J_4oVc40_pggvPtFahXBCdrZXWpnaEJVs,12130
9
9
  fal/config.py,sha256=BEMH10B2bfWJ9yNawnLG6v3kBLnLmkhMe201EAODzs4,3124
10
- fal/container.py,sha256=OvR-Zq-NPbYFHTnw0SBUUFxr890Fgbe68J2kSJEpLOk,1905
10
+ fal/container.py,sha256=FTsa5hOW4ars-yV1lUoc0BNeIIvAZcpw7Ftyt3A4m_w,2000
11
11
  fal/files.py,sha256=1eOyrj1M0hTixZdbtQ1ogJqWpLd7UfiOt1Rxihnqh8g,3565
12
12
  fal/flags.py,sha256=QonyDM7R2GqfAB1bJr46oriu-fHJCkpUwXuSdanePWg,987
13
13
  fal/project.py,sha256=QgfYfMKmNobMPufrAP_ga1FKcIAlSbw18Iar1-0qepo,2650
@@ -73,7 +73,7 @@ fal/toolkit/image/nsfw_filter/inference.py,sha256=BhIPF_zxRLetThQYxDDF0sdx9VRwvu
73
73
  fal/toolkit/image/nsfw_filter/model.py,sha256=63mu8D15z_IosoRUagRLGHy6VbLqFmrG-yZqnu2vVm4,457
74
74
  fal/toolkit/image/nsfw_filter/requirements.txt,sha256=3Pmrd0Ny6QAeBqUNHCgffRyfaCARAPJcfSCX5cRYpbM,37
75
75
  fal/toolkit/utils/__init__.py,sha256=CrmM9DyCz5-SmcTzRSm5RaLgxy3kf0ZsSEN9uhnX2Xo,97
76
- fal/toolkit/utils/download_utils.py,sha256=sy1MNmYAELyBScSsG7QNxzOCCxFIPusol_RPhNyqZ_w,20191
76
+ fal/toolkit/utils/download_utils.py,sha256=0OtZoiLGQZUXlYG7MxiTSZgfT7L4qOxQIflvmbPcqSs,20501
77
77
  fal/toolkit/utils/endpoint.py,sha256=5EXoshA2PD_brjEfhNWAWasjqLOCRrjBnfhj6QGuMt8,782
78
78
  fal/toolkit/utils/retry.py,sha256=0pnKqs1Y2dADMAk2944FZr68ZL3wQC_5hqApfgyMf_8,1531
79
79
  fal/toolkit/video/__init__.py,sha256=YV0jWpuvoA_CDFQXhd3zOvilFLKH7DYARrbzR7hWhpE,35
@@ -141,8 +141,8 @@ openapi_fal_rest/models/workflow_node_type.py,sha256=-FzyeY2bxcNmizKbJI8joG7byRi
141
141
  openapi_fal_rest/models/workflow_schema.py,sha256=4K5gsv9u9pxx2ItkffoyHeNjBBYf6ur5bN4m_zePZNY,2019
142
142
  openapi_fal_rest/models/workflow_schema_input.py,sha256=2OkOXWHTNsCXHWS6EGDFzcJKkW5FIap-2gfO233EvZQ,1191
143
143
  openapi_fal_rest/models/workflow_schema_output.py,sha256=EblwSPAGfWfYVWw_WSSaBzQVju296is9o28rMBAd0mc,1196
144
- fal-1.22.0.dist-info/METADATA,sha256=1h6ZFhJJi6nYLhYDC8vY_rVsGkjd0SY6cwAjtoHU8v4,4085
145
- fal-1.22.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
146
- fal-1.22.0.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
147
- fal-1.22.0.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
148
- fal-1.22.0.dist-info/RECORD,,
144
+ fal-1.23.0.dist-info/METADATA,sha256=PK_7YpWltcIwUVpO_iPYg4zEhfyX6ZJuagR1pMbeNQE,4085
145
+ fal-1.23.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
146
+ fal-1.23.0.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
147
+ fal-1.23.0.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
148
+ fal-1.23.0.dist-info/RECORD,,
File without changes