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

fal/_fal_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '1.50.0'
32
- __version_tuple__ = version_tuple = (1, 50, 0)
31
+ __version__ = version = '1.50.2'
32
+ __version_tuple__ = version_tuple = (1, 50, 2)
33
33
 
34
34
  __commit_id__ = commit_id = None
fal/files.py CHANGED
@@ -224,6 +224,7 @@ class FalFileSystem(AbstractFileSystem):
224
224
  "POST",
225
225
  f"/files/file/url/{abs_rpath}",
226
226
  json={"url": url},
227
+ timeout=10 * 60, # 10 minutes in seconds
227
228
  )
228
229
  self.dircache.clear()
229
230
 
@@ -56,44 +56,21 @@ def _should_retry(exc: Exception) -> bool:
56
56
  return False
57
57
 
58
58
 
59
- class _RetryingRequestContext:
60
- def __init__(self, request: Request, kwargs: dict[str, Any]):
61
- self.request = request
62
- self.kwargs = kwargs
63
- self._cm: Any | None = None
64
- self._response: addinfourl | None = None
65
-
66
- def __enter__(self) -> addinfourl:
67
- def _enter_once() -> addinfourl:
68
- # Obtain the original context manager and explicitly enter it
69
- self._cm = _urlopen(self.request, **self.kwargs)
70
- return self._cm.__enter__()
71
-
72
- _enter_with_retry = retry(
73
- max_retries=MAX_ATTEMPTS,
74
- base_delay=BASE_DELAY,
75
- max_delay=MAX_DELAY,
76
- backoff_type="exponential",
77
- jitter=True,
78
- should_retry=_should_retry,
79
- )(_enter_once)
80
-
81
- self._response = _enter_with_retry()
82
- assert self._response is not None
83
- return self._response
84
-
85
- def __exit__(self, exc_type, exc_val, exc_tb) -> bool:
86
- if self._cm is not None:
87
- return self._cm.__exit__(exc_type, exc_val, exc_tb)
88
- return False
89
-
90
-
91
59
  @contextmanager
92
60
  def _maybe_retry_request(
93
61
  request: Request,
94
62
  **kwargs: Any,
95
63
  ) -> Generator[addinfourl, None, None]:
96
- with _RetryingRequestContext(request, kwargs) as response:
64
+ _urlopen_with_retry = retry(
65
+ max_retries=MAX_ATTEMPTS,
66
+ base_delay=BASE_DELAY,
67
+ max_delay=MAX_DELAY,
68
+ backoff_type="exponential",
69
+ jitter=True,
70
+ should_retry=_should_retry,
71
+ )(_urlopen)
72
+
73
+ with _urlopen_with_retry(request, **kwargs) as response:
97
74
  yield response
98
75
 
99
76
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fal
3
- Version: 1.50.0
3
+ Version: 1.50.2
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,6 +1,6 @@
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=_Pf-vbXKGGS2hP-Yx1JBi6Y-zBGNCXuwL2wRrnt_z_s,706
3
+ fal/_fal_version.py,sha256=EOMJ0LERvcMA3Kazf3zkj5IyGAQ5PWJvCNkg6dOhWUc,706
4
4
  fal/_serialization.py,sha256=2hPQhinTWinTTs2gDjPG6SxVCwkL_i6S8TfOSoCqLUs,7626
5
5
  fal/_version.py,sha256=1BbTFnucNC_6ldKJ_ZoC722_UkW4S9aDBSW9L0fkKAw,2315
6
6
  fal/app.py,sha256=mW7H2k41y4-BTEyvVmwTMEfVy2a5_ctAHTZEtQCn2ig,31061
@@ -8,7 +8,7 @@ fal/apps.py,sha256=pzCd2mrKl5J_4oVc40_pggvPtFahXBCdrZXWpnaEJVs,12130
8
8
  fal/config.py,sha256=1HRaOJFOAjB7fbQoEPCSH85gMvEEMIMPeupVWgrHVgU,3572
9
9
  fal/container.py,sha256=FTsa5hOW4ars-yV1lUoc0BNeIIvAZcpw7Ftyt3A4m_w,2000
10
10
  fal/file_sync.py,sha256=7urM-wEzijTJMddnprkq5wyGPS09Ywdk4UoWWCL9CTA,11977
11
- fal/files.py,sha256=9hA7mC3Xm794I-P2_YMf0QRebrnBIDz_kUnUd4O3BiQ,7904
11
+ fal/files.py,sha256=COLA4aPV5NKvLRJM9rMMVfwMn7bHs7HTVbI6ZNUFriA,7958
12
12
  fal/flags.py,sha256=QonyDM7R2GqfAB1bJr46oriu-fHJCkpUwXuSdanePWg,987
13
13
  fal/project.py,sha256=QgfYfMKmNobMPufrAP_ga1FKcIAlSbw18Iar1-0qepo,2650
14
14
  fal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -70,7 +70,7 @@ fal/toolkit/audio/audio.py,sha256=gt458h989iQ-EhQSH-mCuJuPBY4RneLJE05f_QWU1E0,57
70
70
  fal/toolkit/file/__init__.py,sha256=FbNl6wD-P0aSSTUwzHt4HujBXrbC3ABmaigPQA4hRfg,70
71
71
  fal/toolkit/file/file.py,sha256=_KCKmtmBkBIKD_gFOZALV10dCtOFZTC9MQw2qmdeevw,11013
72
72
  fal/toolkit/file/types.py,sha256=MMAH_AyLOhowQPesOv1V25wB4qgbJ3vYNlnTPbdSv1M,2304
73
- fal/toolkit/file/providers/fal.py,sha256=S1DjzKtM69IvHLhhID2Lf4atKiYBWLB4EVEiC52-x9g,48374
73
+ fal/toolkit/file/providers/fal.py,sha256=P9hm11uKVe6ilmL7CjFztBHswZEHOm4k-K4B36UZe6M,47543
74
74
  fal/toolkit/file/providers/gcp.py,sha256=DKeZpm1MjwbvEsYvkdXUtuLIJDr_UNbqXj_Mfv3NTeo,2437
75
75
  fal/toolkit/file/providers/r2.py,sha256=YqnYkkAo_ZKIa-xoSuDnnidUFwJWHdziAR34PE6irdI,3061
76
76
  fal/toolkit/file/providers/s3.py,sha256=EI45T54Mox7lHZKROss_O8o0DIn3CHP9k1iaNYVrxvg,2714
@@ -152,8 +152,8 @@ openapi_fal_rest/models/workflow_node_type.py,sha256=-FzyeY2bxcNmizKbJI8joG7byRi
152
152
  openapi_fal_rest/models/workflow_schema.py,sha256=4K5gsv9u9pxx2ItkffoyHeNjBBYf6ur5bN4m_zePZNY,2019
153
153
  openapi_fal_rest/models/workflow_schema_input.py,sha256=2OkOXWHTNsCXHWS6EGDFzcJKkW5FIap-2gfO233EvZQ,1191
154
154
  openapi_fal_rest/models/workflow_schema_output.py,sha256=EblwSPAGfWfYVWw_WSSaBzQVju296is9o28rMBAd0mc,1196
155
- fal-1.50.0.dist-info/METADATA,sha256=_lrQ7svffHYjyo3QCatmTJJuzm1FGuHrddF7IQw9_F8,4250
156
- fal-1.50.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
157
- fal-1.50.0.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
158
- fal-1.50.0.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
159
- fal-1.50.0.dist-info/RECORD,,
155
+ fal-1.50.2.dist-info/METADATA,sha256=FYbotfoD88F9PBA5MDz1NpDAr0bYWfTPWj9dNTrJ2Wo,4250
156
+ fal-1.50.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
157
+ fal-1.50.2.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
158
+ fal-1.50.2.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
159
+ fal-1.50.2.dist-info/RECORD,,
File without changes