modal 0.68.44__py3-none-any.whl → 0.68.45__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.
modal/_runtime/asgi.py CHANGED
@@ -26,6 +26,7 @@ class LifespanManager:
26
26
  shutdown: asyncio.Future
27
27
  queue: asyncio.Queue
28
28
  has_run_init: bool = False
29
+ lifespan_supported: bool = False
29
30
 
30
31
  def __init__(self, asgi_app, state):
31
32
  self.asgi_app = asgi_app
@@ -46,6 +47,7 @@ class LifespanManager:
46
47
  await self.ensure_init()
47
48
 
48
49
  async def receive():
50
+ self.lifespan_supported = True
49
51
  return await self.queue.get()
50
52
 
51
53
  async def send(message):
@@ -63,16 +65,21 @@ class LifespanManager:
63
65
  try:
64
66
  await self.asgi_app({"type": "lifespan", "state": self.state}, receive, send)
65
67
  except Exception as e:
68
+ if not self.lifespan_supported:
69
+ logger.info(f"ASGI lifespan task exited before receiving any messages with exception:\n{e}")
70
+ self.startup.set_result(None)
71
+ self.shutdown.set_result(None)
72
+ return
73
+
66
74
  logger.error(f"Error in ASGI lifespan task: {e}")
67
75
  if not self.startup.done():
68
76
  self.startup.set_exception(ExecutionError("ASGI lifespan task exited startup"))
69
77
  if not self.shutdown.done():
70
78
  self.shutdown.set_exception(ExecutionError("ASGI lifespan task exited shutdown"))
71
79
  else:
72
- if not self.startup.done():
73
- self.startup.set_result("ASGI Lifespan protocol is probably not supported by this library")
74
- if not self.shutdown.done():
75
- self.shutdown.set_result("ASGI Lifespan protocol is probably not supported by this library")
80
+ logger.info("ASGI Lifespan protocol is probably not supported by this library")
81
+ self.startup.set_result(None)
82
+ self.shutdown.set_result(None)
76
83
 
77
84
  async def lifespan_startup(self):
78
85
  await self.ensure_init()
modal/client.pyi CHANGED
@@ -26,7 +26,7 @@ class _Client:
26
26
  _stub: typing.Optional[modal_proto.api_grpc.ModalClientStub]
27
27
 
28
28
  def __init__(
29
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.68.44"
29
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.68.45"
30
30
  ): ...
31
31
  def is_closed(self) -> bool: ...
32
32
  @property
@@ -81,7 +81,7 @@ class Client:
81
81
  _stub: typing.Optional[modal_proto.api_grpc.ModalClientStub]
82
82
 
83
83
  def __init__(
84
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.68.44"
84
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.68.45"
85
85
  ): ...
86
86
  def is_closed(self) -> bool: ...
87
87
  @property
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: modal
3
- Version: 0.68.44
3
+ Version: 0.68.45
4
4
  Summary: Python client library for Modal
5
5
  Author: Modal Labs
6
6
  Author-email: support@modal.com
@@ -19,7 +19,7 @@ modal/app.py,sha256=JWefPs4yB70BKQwSZejB_4_muhxn63cC9UmnNvpQ9XY,45526
19
19
  modal/app.pyi,sha256=FYPCEJNhof4YF6HIuNP_2yG6s2PgZnKW9tO1hFE6sfA,25194
20
20
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
21
21
  modal/client.py,sha256=JAnd4-GCN093BwkvOFAK5a6iy5ycxofjpUncMxlrIMw,15253
22
- modal/client.pyi,sha256=6YwJJifKtD3Mm8_-ZszXlHfxRIVPUL8OBfSqch20djM,7280
22
+ modal/client.pyi,sha256=TY3jSaKaB-OExejVFSqv97I2K2K-NuGRHwa4MXP5nLk,7280
23
23
  modal/cloud_bucket_mount.py,sha256=G7T7jWLD0QkmrfKR75mSTwdUZ2xNfj7pkVqb4ipmxmI,5735
24
24
  modal/cloud_bucket_mount.pyi,sha256=CEi7vrH3kDUF4LAy4qP6tfImy2UJuFRcRbsgRNM1wo8,1403
25
25
  modal/cls.py,sha256=3hjb0JcoPjxKZNeK22f5rR43bZRBjoRI7_EMZXY7YrE,31172
@@ -77,7 +77,7 @@ modal/token_flow.pyi,sha256=gOYtYujrWt_JFZeiI8EmfahXPx5GCR5Na-VaPQcWgEY,1937
77
77
  modal/volume.py,sha256=T-pLxCYqmqRO6OolpAXlPxomMu0RWjti2e4kUpaj2cQ,29229
78
78
  modal/volume.pyi,sha256=eekb2dnAAwFK_NO9ciAOOTthl8NP1iAmMFrCGgjDA2k,11100
79
79
  modal/_runtime/__init__.py,sha256=MIEP8jhXUeGq_eCjYFcqN5b1bxBM4fdk0VESpjWR0fc,28
80
- modal/_runtime/asgi.py,sha256=H68KAN8bz8Zp7EcRl2c_ite1Y3kP1MHvjQAf-uUpCx8,21691
80
+ modal/_runtime/asgi.py,sha256=Mjs859pSgOmtZL-YmEsSKN557v1A2Ax_5-ERgPfj55E,21920
81
81
  modal/_runtime/container_io_manager.py,sha256=ctgyNFiHjq1brCrabXmlurkAXjnrCeWPRvTVa735vRw,44215
82
82
  modal/_runtime/execution_context.py,sha256=E6ofm6j1POXGPxS841X3V7JU6NheVb8OkQc7JpLq4Kg,2712
83
83
  modal/_runtime/telemetry.py,sha256=T1RoAGyjBDr1swiM6pPsGRSITm7LI5FDK18oNXxY08U,5163
@@ -164,10 +164,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
164
164
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
165
165
  modal_version/__init__.py,sha256=RT6zPoOdFO99u5Wcxxaoir4ZCuPTbQ22cvzFAXl3vUY,470
166
166
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
167
- modal_version/_version_generated.py,sha256=Vj3LhncTs1VLswz6iYvhgi1CD_2zf1NsC4OECJ8s9f0,149
168
- modal-0.68.44.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
169
- modal-0.68.44.dist-info/METADATA,sha256=dHm34Ct-v2eY0T4pGJM2o5uUuDeESNSLj5uYko2hPQI,2329
170
- modal-0.68.44.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
171
- modal-0.68.44.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
172
- modal-0.68.44.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
173
- modal-0.68.44.dist-info/RECORD,,
167
+ modal_version/_version_generated.py,sha256=WnY6krxop48LTzDQ4GseM2SUj2P1jOy-kc8CbxaY3oY,149
168
+ modal-0.68.45.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
169
+ modal-0.68.45.dist-info/METADATA,sha256=O7_g2tZtnla6XEVfp2AB-5k25BWbD2VFshcJJE4ucYI,2329
170
+ modal-0.68.45.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
171
+ modal-0.68.45.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
172
+ modal-0.68.45.dist-info/top_level.txt,sha256=1nvYbOSIKcmU50fNrpnQnrrOpj269ei3LzgB6j9xGqg,64
173
+ modal-0.68.45.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2024
2
2
 
3
3
  # Note: Reset this value to -1 whenever you make a minor `0.X` release of the client.
4
- build_number = 44 # git: 8e4bc98
4
+ build_number = 45 # git: 31a2631