modal 0.73.91__py3-none-any.whl → 0.73.93__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/client.py CHANGED
@@ -108,14 +108,14 @@ class _Client:
108
108
  self._closed = False
109
109
  assert self._stub is None
110
110
  metadata = _get_metadata(self.client_type, self._credentials, self.version)
111
+ self._cancellation_context = TaskContext(grace=0.5) # allow running rpcs to finish in 0.5s when closing client
112
+ self._cancellation_context_event_loop = asyncio.get_running_loop()
113
+ await self._cancellation_context.__aenter__()
111
114
  self._channel = create_channel(self.server_url, metadata=metadata)
112
115
  try:
113
116
  await connect_channel(self._channel)
114
117
  except OSError as exc:
115
- raise ConnectionError(str(exc))
116
- self._cancellation_context = TaskContext(grace=0.5) # allow running rpcs to finish in 0.5s when closing client
117
- self._cancellation_context_event_loop = asyncio.get_running_loop()
118
- await self._cancellation_context.__aenter__()
118
+ raise ConnectionError("Could not connect to the Modal server.") from exc
119
119
  self._grpclib_stub = api_grpc.ModalClientStub(self._channel)
120
120
  self._stub = modal_api_grpc.ModalClientModal(self._grpclib_stub, client=self)
121
121
  self._owner_pid = os.getpid()
@@ -123,7 +123,8 @@ class _Client:
123
123
  async def _close(self, prep_for_restore: bool = False):
124
124
  logger.debug(f"Client ({id(self)}): closing")
125
125
  self._closed = True
126
- await self._cancellation_context.__aexit__(None, None, None) # wait for all rpcs to be finished/cancelled
126
+ if hasattr(self, "_cancellation_context"):
127
+ await self._cancellation_context.__aexit__(None, None, None) # wait for all rpcs to be finished/cancelled
127
128
  if self._channel is not None:
128
129
  self._channel.close()
129
130
 
modal/client.pyi CHANGED
@@ -27,7 +27,7 @@ class _Client:
27
27
  _snapshotted: bool
28
28
 
29
29
  def __init__(
30
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.91"
30
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.93"
31
31
  ): ...
32
32
  def is_closed(self) -> bool: ...
33
33
  @property
@@ -85,7 +85,7 @@ class Client:
85
85
  _snapshotted: bool
86
86
 
87
87
  def __init__(
88
- self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.91"
88
+ self, server_url: str, client_type: int, credentials: typing.Optional[tuple[str, str]], version: str = "0.73.93"
89
89
  ): ...
90
90
  def is_closed(self) -> bool: ...
91
91
  @property
modal/queue.py CHANGED
@@ -89,7 +89,7 @@ class _Queue(_Object, type_prefix="qu"):
89
89
 
90
90
  **Limits**
91
91
 
92
- A single `Queue` can contain up to 100,000 partitions, each with up to 5,000 items. Each item can be up to 256 KiB.
92
+ A single `Queue` can contain up to 100,000 partitions, each with up to 5,000 items. Each item can be up to 1 MiB.
93
93
 
94
94
  Partition keys must be non-empty and must not exceed 64 bytes.
95
95
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: modal
3
- Version: 0.73.91
3
+ Version: 0.73.93
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -21,8 +21,8 @@ modal/_watcher.py,sha256=K6LYnlmSGQB4tWWI9JADv-tvSvQ1j522FwT71B51CX8,3584
21
21
  modal/app.py,sha256=ojhuLZuNZAQ1OsbDH0k6G4pm1W7bOIvZfXbaKlvQ-Ao,45622
22
22
  modal/app.pyi,sha256=tZFbcsu20SuvfB2puxCyuXLFNJ9bQulzag55rVpgZmc,26827
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
- modal/client.py,sha256=8SQawr7P1PNUCq1UmJMUQXG2jIo4Nmdcs311XqrNLRE,15276
25
- modal/client.pyi,sha256=1hLr7tMWHL-9aRjIlK9iLiiqBaOP9adqeshWMh8BZ4Y,7593
24
+ modal/client.py,sha256=j9D3hNis1lfhnz9lVFGgJgowbH3PaGUzNKgHPWYG778,15372
25
+ modal/client.pyi,sha256=d_wytFrGfifUMThG59AvY7xiKoPwJtj3vO4JDSQBbWQ,7593
26
26
  modal/cloud_bucket_mount.py,sha256=YOe9nnvSr4ZbeCn587d7_VhE9IioZYRvF9VYQTQux08,5914
27
27
  modal/cloud_bucket_mount.pyi,sha256=30T3K1a89l6wzmEJ_J9iWv9SknoGqaZDx59Xs-ZQcmk,1607
28
28
  modal/cls.py,sha256=5DjpSBP1IyROKZm5ItDiEGdbRnfTT6K1Ul0jEvEKw_Q,31695
@@ -61,7 +61,7 @@ modal/partial_function.pyi,sha256=-MAK61qJRi6Wjym-Measz5_9moJurYrJfdi7uSQZa5M,49
61
61
  modal/proxy.py,sha256=NrOevrWxG3G7-zlyRzG6BcIvop7AWLeyahZxitbBaOk,1418
62
62
  modal/proxy.pyi,sha256=1OEKIVUyC-xb7fHMzngakQso0nTsK60TVhXtlcMj6Wk,390
63
63
  modal/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
- modal/queue.py,sha256=02HUroxLIiWQemHYS6PDXH2eM51CUeFP7nQ6Usb1V04,18987
64
+ modal/queue.py,sha256=OIYmve1a4GTP54Vj2CcLatLPIAWToU7hWBNeu7IJiBY,18985
65
65
  modal/queue.pyi,sha256=sgvELCK4bJXMZIZw7gllooGFZNipGjI3BT4rmUuyD9M,10282
66
66
  modal/retries.py,sha256=HKR2Q9aNPWkMjQ5nwobqYTuZaSuw0a8lI2zrtY5IW98,5230
67
67
  modal/runner.py,sha256=fdUyDGN-bWu_aZBvxBO_MIgEuucsA0PgDKDHBn5k8J0,24451
@@ -168,10 +168,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
168
168
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
169
169
  modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
170
170
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
171
- modal_version/_version_generated.py,sha256=6MHLnkoTk1oAiST7svNINgg0EIAguW5UB0w8R_nMA4A,149
172
- modal-0.73.91.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
173
- modal-0.73.91.dist-info/METADATA,sha256=WhVp3N8MvxmmQLHWLl0cdN1_jMc3n9HZqEcp3TCHHXs,2452
174
- modal-0.73.91.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
175
- modal-0.73.91.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
176
- modal-0.73.91.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
177
- modal-0.73.91.dist-info/RECORD,,
171
+ modal_version/_version_generated.py,sha256=WeY1f7JGXCrUgh6YSsVx99nLMK20EcHyoW0NHwX7Xm0,149
172
+ modal-0.73.93.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
173
+ modal-0.73.93.dist-info/METADATA,sha256=RZ68ss_wcL63OnAT-Vo7r_wrBA6w1epwXbDDbK2P3dM,2452
174
+ modal-0.73.93.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
175
+ modal-0.73.93.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
176
+ modal-0.73.93.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
177
+ modal-0.73.93.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (76.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
 
3
3
  # Note: Reset this value to -1 whenever you make a minor `0.X` release of the client.
4
- build_number = 91 # git: 77578e0
4
+ build_number = 93 # git: 6b04a6d