fal 1.13.3__py3-none-any.whl → 1.13.4__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.13.3'
21
- __version_tuple__ = version_tuple = (1, 13, 3)
20
+ __version__ = version = '1.13.4'
21
+ __version_tuple__ = version_tuple = (1, 13, 4)
fal/app.py CHANGED
@@ -345,7 +345,25 @@ class App(BaseServable):
345
345
  async def provide_hints_headers(request, call_next):
346
346
  response = await call_next(request)
347
347
  try:
348
- response.headers["X-Fal-Runner-Hints"] = ",".join(self.provide_hints())
348
+ # make sure the hints can be encoded in latin-1, so we don't crash
349
+ # when serving.
350
+ # https://github.com/encode/starlette/blob/a766a58d14007f07c0b5782fa78cdc370b892796/starlette/datastructures.py#L568
351
+ hints = []
352
+ for hint in self.provide_hints():
353
+ try:
354
+ _ = hint.encode("latin-1")
355
+ hints.append(hint)
356
+ except UnicodeEncodeError:
357
+ from fastapi.logger import logger
358
+
359
+ logger.warning(
360
+ "Ignoring hint %s for %s because it can't be encoded in "
361
+ "latin-1",
362
+ hint,
363
+ self.__class__.__name__,
364
+ )
365
+
366
+ response.headers["X-Fal-Runner-Hints"] = ",".join(hints)
349
367
  except NotImplementedError:
350
368
  # This lets us differentiate between apps that don't provide hints
351
369
  # and apps that provide empty hints.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fal
3
- Version: 1.13.3
3
+ Version: 1.13.4
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,10 +1,10 @@
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=GwK4kZgtx2CVfLLI6BiywAgeTZLJmNUqgVGObzf1JRA,513
3
+ fal/_fal_version.py,sha256=PjPNf6HjvMHh44728cyV13E5eqdX78hsSVd0lhauNcY,513
4
4
  fal/_serialization.py,sha256=rD2YiSa8iuzCaZohZwN_MPEB-PpSKbWRDeaIDpTEjyY,7653
5
5
  fal/_version.py,sha256=EBGqrknaf1WygENX-H4fBefLvHryvJBBGtVJetaB0NY,266
6
6
  fal/api.py,sha256=dNl6c_CvoFqG5tGXcA6nH6zhuHUDQY3KKLZfNYAIGGo,45400
7
- fal/app.py,sha256=kHBe5QT7eeptMZ_X70vjPaeBG7Qv2u0a-mxvcEABHgQ,23402
7
+ fal/app.py,sha256=aRb8t-5QCrIPeKHY39yJ3231T5uHGZLhSurkRBtzyu8,24216
8
8
  fal/apps.py,sha256=pzCd2mrKl5J_4oVc40_pggvPtFahXBCdrZXWpnaEJVs,12130
9
9
  fal/config.py,sha256=mS38EIwjR6h2x5wdrTU5E2hubSZm6D35Qigjteg0RJk,2707
10
10
  fal/container.py,sha256=PM7e1RloTCexZ64uAv7sa2RSZxPI-X8KcxkdaZqEfjw,1914
@@ -134,8 +134,8 @@ openapi_fal_rest/models/workflow_node_type.py,sha256=-FzyeY2bxcNmizKbJI8joG7byRi
134
134
  openapi_fal_rest/models/workflow_schema.py,sha256=4K5gsv9u9pxx2ItkffoyHeNjBBYf6ur5bN4m_zePZNY,2019
135
135
  openapi_fal_rest/models/workflow_schema_input.py,sha256=2OkOXWHTNsCXHWS6EGDFzcJKkW5FIap-2gfO233EvZQ,1191
136
136
  openapi_fal_rest/models/workflow_schema_output.py,sha256=EblwSPAGfWfYVWw_WSSaBzQVju296is9o28rMBAd0mc,1196
137
- fal-1.13.3.dist-info/METADATA,sha256=utyInTbohqq3mhB6vu-QJ_57UBFK55w-yiOJ-MOJVX0,4062
138
- fal-1.13.3.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
139
- fal-1.13.3.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
140
- fal-1.13.3.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
141
- fal-1.13.3.dist-info/RECORD,,
137
+ fal-1.13.4.dist-info/METADATA,sha256=6Vywaor5_XGK16hsBOMv11jTrDqb964BNTqLNvh6ulk,4062
138
+ fal-1.13.4.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
139
+ fal-1.13.4.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
140
+ fal-1.13.4.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
141
+ fal-1.13.4.dist-info/RECORD,,
File without changes