modAL 1.2.5.dev5__py3-none-any.whl → 1.2.5.dev7__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.
@@ -1,6 +1,7 @@
1
1
  # Copyright Modal Labs 2022
2
2
  import asyncio
3
3
  import contextlib
4
+ import os
4
5
  import platform
5
6
  import socket
6
7
  import time
@@ -396,7 +397,8 @@ async def _retry_transient_errors(
396
397
  ):
397
398
  last_server_retry_warning_time = now
398
399
  logger.warning(
399
- f"Warning: Received {exc.status} status: {exc.message}. "
400
+ f"Warning: Received {exc.status}{os.linesep}"
401
+ f"{exc.message}{os.linesep}"
400
402
  f"Will retry in {server_delay:0.2f} seconds."
401
403
  )
402
404
 
modal/client.pyi CHANGED
@@ -32,7 +32,7 @@ class _Client:
32
32
  server_url: str,
33
33
  client_type: int,
34
34
  credentials: typing.Optional[tuple[str, str]],
35
- version: str = "1.2.5.dev5",
35
+ version: str = "1.2.5.dev7",
36
36
  ):
37
37
  """mdmd:hidden
38
38
  The Modal client object is not intended to be instantiated directly by users.
@@ -163,7 +163,7 @@ class Client:
163
163
  server_url: str,
164
164
  client_type: int,
165
165
  credentials: typing.Optional[tuple[str, str]],
166
- version: str = "1.2.5.dev5",
166
+ version: str = "1.2.5.dev7",
167
167
  ):
168
168
  """mdmd:hidden
169
169
  The Modal client object is not intended to be instantiated directly by users.
modal/io_streams.py CHANGED
@@ -2,6 +2,7 @@
2
2
  import asyncio
3
3
  import codecs
4
4
  import contextlib
5
+ import io
5
6
  import sys
6
7
  import time
7
8
  from collections.abc import AsyncGenerator, AsyncIterator
@@ -403,10 +404,10 @@ class _BytesStreamReaderThroughCommandRouter:
403
404
  return self._params.file_descriptor
404
405
 
405
406
  async def read(self) -> bytes:
406
- data_bytes = b""
407
+ buffer = io.BytesIO()
407
408
  async for part in self:
408
- data_bytes += cast(bytes, part)
409
- return data_bytes
409
+ buffer.write(part)
410
+ return buffer.getvalue()
410
411
 
411
412
  def __aiter__(self) -> AsyncGenerator[bytes, None]:
412
413
  return _stdio_stream_from_command_router(self._params)
@@ -438,10 +439,10 @@ class _TextStreamReaderThroughCommandRouter:
438
439
  return self._params.file_descriptor
439
440
 
440
441
  async def read(self) -> str:
441
- data_str = ""
442
+ buffer = io.StringIO()
442
443
  async for part in self:
443
- data_str += cast(str, part)
444
- return data_str
444
+ buffer.write(part)
445
+ return buffer.getvalue()
445
446
 
446
447
  async def __aiter__(self) -> AsyncGenerator[str, None]:
447
448
  async with aclosing(_stdio_stream_from_command_router(self._params)) as bytes_stream:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.2.5.dev5
3
+ Version: 1.2.5.dev7
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -26,7 +26,7 @@ modal/app.pyi,sha256=nI_Tibj-rI5I7dJFJnczbHvcmVzCvvCih0tMzoQlr_Y,50835
26
26
  modal/billing.py,sha256=zmQ3bcCJlwa4KD1IA_QgdWpm1pn13c-7qfy79iEauYI,195
27
27
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
28
28
  modal/client.py,sha256=k1CqQ_0t4-vHylkqYZgYCnClg-FT0QrTPAKivL01A_k,14354
29
- modal/client.pyi,sha256=v04GPhvtmjwtS-csTOZBBKRm5iYgrdmusBRCQ4laRIs,13146
29
+ modal/client.pyi,sha256=9-PkZ7f7C3-kZedoaZjJfhaH6XQTR7xla-7iFy4rsa0,13146
30
30
  modal/cloud_bucket_mount.py,sha256=cvVj5Rt4nDHoQbTneoJPTaAcnl_Ab_mrsjnnzd0v9OI,6013
31
31
  modal/cloud_bucket_mount.pyi,sha256=vXusGMOUk9HjCs4lhxteuCK4xLQclPfugGWKo7LECEA,7539
32
32
  modal/cls.py,sha256=4T__mtYlQUnkatif1Wnr8Ld9DN_ySydHj2UwhRg89ok,41984
@@ -47,7 +47,7 @@ modal/functions.pyi,sha256=ZrK759InbJvVMlczRpU4iOczGvf43Nkn_L0VsWR6Hxo,38034
47
47
  modal/gpu.py,sha256=Fe5ORvVPDIstSq1xjmM6OoNgLYFWvogP9r5BgmD3hYg,6769
48
48
  modal/image.py,sha256=Pi1tpi41rklU-7PvXyJxPBYKdG3FcW-H_2pWjjeLYzs,108165
49
49
  modal/image.pyi,sha256=grkqK9BfyKDXmJYNme-lGa0O3u7pOU5GifyLOAhG3sc,78202
50
- modal/io_streams.py,sha256=pqXjSrSAYf2Wu9WCCchFwr3FpsiAU8ABJVDlDj-3ue0,30677
50
+ modal/io_streams.py,sha256=BTPM352My4vIJS_3rzQuda5P0tCfX5tM89OFhIRtIPY,30695
51
51
  modal/io_streams.pyi,sha256=GGRPHumOaTwr11GzmZPf4_aSXGGKsMvB6NoSGHp_F7Q,18633
52
52
  modal/mount.py,sha256=GNdUfj7tWZy3-LaxVX-fvk70BqC51P1s2ktrMOMJGWU,33297
53
53
  modal/mount.pyi,sha256=3_Xftyk2lEMQbt8UzmUW5N77eb7t9EdbczPwj9wue9o,15828
@@ -105,7 +105,7 @@ modal/_utils/docker_utils.py,sha256=h1uETghR40mp_y3fSWuZAfbIASH1HMzuphJHghAL6DU,
105
105
  modal/_utils/function_utils.py,sha256=wL2AA8aEftxCBATPStHgKDRPxrFjPAv-rHt0Wb7y9Ts,28629
106
106
  modal/_utils/git_utils.py,sha256=qtUU6JAttF55ZxYq51y55OR58B0tDPZsZWK5dJe6W5g,3182
107
107
  modal/_utils/grpc_testing.py,sha256=H1zHqthv19eGPJz2HKXDyWXWGSqO4BRsxah3L5Xaa8A,8619
108
- modal/_utils/grpc_utils.py,sha256=kGYfkZNoYzaDCeeDxL8Z1oMRcGRMBpLS40B2tYUAnS8,16417
108
+ modal/_utils/grpc_utils.py,sha256=mCFloLzXzK3nMyQ2lE6rvMX_7bWBl5TV0YQU6kDDRvA,16468
109
109
  modal/_utils/hash_utils.py,sha256=zg3J6OGxTFGSFri1qQ12giDz90lWk8bzaxCTUCRtiX4,3034
110
110
  modal/_utils/http_utils.py,sha256=yeTFsXYr0rYMEhB7vBP7audG9Uc7OLhzKBANFDZWVt0,2451
111
111
  modal/_utils/jwt_utils.py,sha256=fxH9plyrbAemTbjSsQtzIdDXE9QXxvMC4DiUZ16G0aA,1360
@@ -160,7 +160,7 @@ modal/experimental/__init__.py,sha256=WlBNjzahOTuhWdfHt0OIArU3pdrErsFrprVhZ7UqU0
160
160
  modal/experimental/flash.py,sha256=0afbNEg8SLBdUbvFpT3R9FE1mfHAV_Iual8x2hqfPMY,26785
161
161
  modal/experimental/flash.pyi,sha256=BU7v9gFLWX1OanZ3HpRoVGp4qFfHo93lM9UkzcNFZUY,14832
162
162
  modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
163
- modal-1.2.5.dev5.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
163
+ modal-1.2.5.dev7.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
164
164
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
165
165
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
166
166
  modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
@@ -188,10 +188,10 @@ modal_proto/task_command_router_pb2.py,sha256=_pD2ZpU0bNzhwBdzmLoLyLtAtftI_Agxwn
188
188
  modal_proto/task_command_router_pb2.pyi,sha256=EyDgXPLr7alqjXYERV8w_MPuO404x0uCppmSkrfE9IE,14589
189
189
  modal_proto/task_command_router_pb2_grpc.py,sha256=uEQ0HdrCp8v-9bB5yIic9muA8spCShLHY6Bz9cCgOUE,10114
190
190
  modal_proto/task_command_router_pb2_grpc.pyi,sha256=s3Yxsrawdj4nr8vqQqsAxyX6ilWaGbdECy425KKbLIA,3301
191
- modal_version/__init__.py,sha256=BBWumr06MkAHwqAmXb5osOBK-y-G9Hpnw-dSrUJ8bFE,120
191
+ modal_version/__init__.py,sha256=5bEevgYaDhNEMV8-MLwMS1I4osuRn2pchGV4x48U0jE,120
192
192
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
193
- modal-1.2.5.dev5.dist-info/METADATA,sha256=4D-s28ou2Biw2O-G4ytu2NjLMvtpIHIWM-LDo1xzAOY,2489
194
- modal-1.2.5.dev5.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
195
- modal-1.2.5.dev5.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
196
- modal-1.2.5.dev5.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
197
- modal-1.2.5.dev5.dist-info/RECORD,,
193
+ modal-1.2.5.dev7.dist-info/METADATA,sha256=pzIq4WiYiEAvTFvyKTpO3ARxGxyjakeA1I3hFjGyv1c,2489
194
+ modal-1.2.5.dev7.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
195
+ modal-1.2.5.dev7.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
196
+ modal-1.2.5.dev7.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
197
+ modal-1.2.5.dev7.dist-info/RECORD,,
modal_version/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
  """Supplies the current version of the modal client library."""
3
3
 
4
- __version__ = "1.2.5.dev5"
4
+ __version__ = "1.2.5.dev7"