modal 1.1.5.dev57__py3-none-any.whl → 1.1.5.dev58__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 modal might be problematic. Click here for more details.

modal/_output.py CHANGED
@@ -552,14 +552,22 @@ async def get_app_logs_loop(
552
552
  pty_shell_stdout = None
553
553
  pty_shell_finish_event: asyncio.Event | None = None
554
554
  pty_shell_task_id: str | None = None
555
+ pty_shell_input_task: asyncio.Task | None = None
555
556
 
556
557
  async def stop_pty_shell():
557
- nonlocal pty_shell_finish_event
558
+ nonlocal pty_shell_finish_event, pty_shell_input_task
558
559
  if pty_shell_finish_event:
559
560
  print("\r", end="") # move cursor to beginning of line
560
561
  pty_shell_finish_event.set()
561
562
  pty_shell_finish_event = None
562
- await asyncio.sleep(0) # yield to handle_exec_input() so it can disable raw terminal
563
+
564
+ if pty_shell_input_task:
565
+ try:
566
+ await pty_shell_input_task
567
+ except Exception as exc:
568
+ logger.exception(f"Exception in PTY shell input task: {exc}")
569
+ finally:
570
+ pty_shell_input_task = None
563
571
 
564
572
  async def _put_log(log_batch: api_pb2.TaskLogsBatch, log: api_pb2.TaskLogs):
565
573
  if log.task_state:
@@ -587,7 +595,7 @@ async def get_app_logs_loop(
587
595
 
588
596
  async def _get_logs():
589
597
  nonlocal last_log_batch_entry_id
590
- nonlocal pty_shell_stdout, pty_shell_finish_event, pty_shell_task_id
598
+ nonlocal pty_shell_stdout, pty_shell_finish_event, pty_shell_task_id, pty_shell_input_task
591
599
 
592
600
  request = api_pb2.AppGetLogsRequest(
593
601
  app_id=app_id or "",
@@ -622,7 +630,9 @@ async def get_app_logs_loop(
622
630
  pty_shell_finish_event = asyncio.Event()
623
631
  pty_shell_task_id = log_batch.task_id
624
632
  output_mgr.disable()
625
- asyncio.create_task(stream_pty_shell_input(client, log_batch.pty_exec_id, pty_shell_finish_event))
633
+ pty_shell_input_task = asyncio.create_task(
634
+ stream_pty_shell_input(client, log_batch.pty_exec_id, pty_shell_finish_event)
635
+ )
626
636
  else:
627
637
  for log in log_batch.items:
628
638
  await _put_log(log_batch, log)
modal/client.pyi CHANGED
@@ -33,7 +33,7 @@ class _Client:
33
33
  server_url: str,
34
34
  client_type: int,
35
35
  credentials: typing.Optional[tuple[str, str]],
36
- version: str = "1.1.5.dev57",
36
+ version: str = "1.1.5.dev58",
37
37
  ):
38
38
  """mdmd:hidden
39
39
  The Modal client object is not intended to be instantiated directly by users.
@@ -164,7 +164,7 @@ class Client:
164
164
  server_url: str,
165
165
  client_type: int,
166
166
  credentials: typing.Optional[tuple[str, str]],
167
- version: str = "1.1.5.dev57",
167
+ version: str = "1.1.5.dev58",
168
168
  ):
169
169
  """mdmd:hidden
170
170
  The Modal client object is not intended to be instantiated directly by users.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: modal
3
- Version: 1.1.5.dev57
3
+ Version: 1.1.5.dev58
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -7,7 +7,7 @@ modal/_functions.py,sha256=6e4rFdl8thTnRuhUOj_4ehOzC1wdvJHhYSoIwB0LXhU,91783
7
7
  modal/_ipython.py,sha256=TW1fkVOmZL3YYqdS2YlM1hqpf654Yf8ZyybHdBnlhSw,301
8
8
  modal/_location.py,sha256=joiX-0ZeutEUDTrrqLF1GHXCdVLF-rHzstocbMcd_-k,366
9
9
  modal/_object.py,sha256=gwsLdXb-Ecd8nH8LVCo8oVZPzzdyo9BrN1DjgQmsSuM,11967
10
- modal/_output.py,sha256=h7wyYPtHdWFgtiWg-5obZI07RaNwivoEiLCUPl8ZOKc,26522
10
+ modal/_output.py,sha256=sdQqEuWVknHwLPzuz_7eUYqF9TvmQkSfEjm1E__bzbY,26892
11
11
  modal/_partial_function.py,sha256=Yqk97hLS6vi8nWWVpzS5TSWbndWMdCtkhccdnyDJgBk,37302
12
12
  modal/_pty.py,sha256=E58MQ8d5-wkbMatRKpQR-G9FdbCRcZGiZxOpGy__VuY,1481
13
13
  modal/_resolver.py,sha256=2RWvm34cNSnbv1v7izJMNZgfvpLDD6LzaBlr0lIrLnY,7364
@@ -22,7 +22,7 @@ modal/app.py,sha256=RRUz2NjAWIQLHtU2IEslOlnIOCxPiWts3IP3rTFArkY,49635
22
22
  modal/app.pyi,sha256=CDp_rlX3hBuFdv9VRsKvNKCgu_hS2IO2uNU5qhzmXps,44719
23
23
  modal/call_graph.py,sha256=1g2DGcMIJvRy-xKicuf63IVE98gJSnQsr8R_NVMptNc,2581
24
24
  modal/client.py,sha256=kyAIVB3Ay-XKJizQ_1ufUFB__EagV0MLmHJpyYyJ7J0,18636
25
- modal/client.pyi,sha256=fbSTgJH7RaWSw83ZpBwdciGYiF7YrKIYyiBHB6lpMII,15831
25
+ modal/client.pyi,sha256=aUW-c4XSGps5UYDIPMc0n7Xp0ZMHH7NA4cpUq-ePvBU,15831
26
26
  modal/cloud_bucket_mount.py,sha256=I2GRXYhOWLIz2kJZjXu75jAm9EJkBNcutGc6jR2ReUw,5928
27
27
  modal/cloud_bucket_mount.pyi,sha256=VuUOipMIHqFXMkD-3g2bsoqpSxV5qswlFHDOqPQzYAo,7405
28
28
  modal/cls.py,sha256=R1uLQbdqWRRjvxs0I57a4hZZELZkBVCxOKxvKryU5_s,41639
@@ -153,7 +153,7 @@ modal/experimental/__init__.py,sha256=QkCGP1lZiOa8sY4ZNqMF8JsnuRaDI7PJpXkGtKMWgD
153
153
  modal/experimental/flash.py,sha256=7qRAL2Nrwbb60YKobcnpM0zJ8vw4xGJqabLPFgEzMZE,28295
154
154
  modal/experimental/flash.pyi,sha256=R9VV0UDotiY9BRUjacB-xI4qhR3yBymAvEZFRFHztLs,15143
155
155
  modal/experimental/ipython.py,sha256=TrCfmol9LGsRZMeDoeMPx3Hv3BFqQhYnmD_iH0pqdhk,2904
156
- modal-1.1.5.dev57.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
156
+ modal-1.1.5.dev58.dist-info/licenses/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
157
157
  modal_docs/__init__.py,sha256=svYKtV8HDwDCN86zbdWqyq5T8sMdGDj0PVlzc2tIxDM,28
158
158
  modal_docs/gen_cli_docs.py,sha256=c1yfBS_x--gL5bs0N4ihMwqwX8l3IBWSkBAKNNIi6bQ,3801
159
159
  modal_docs/gen_reference_docs.py,sha256=d_CQUGQ0rfw28u75I2mov9AlS773z9rG40-yq5o7g2U,6359
@@ -182,10 +182,10 @@ modal_proto/sandbox_router_pb2.py,sha256=INd9izYaIYqllESQt4MSv2Rj9Hf5bMjAvtCc9b4
182
182
  modal_proto/sandbox_router_pb2.pyi,sha256=YCK0WnCgRos3-p7t4USQQ7x6WAuM278yeQX2IeU5mLg,13295
183
183
  modal_proto/sandbox_router_pb2_grpc.py,sha256=zonC5flvCwxeZYJPENj1IJo2Mr0J58DpoC1_8IdPYik,8243
184
184
  modal_proto/sandbox_router_pb2_grpc.pyi,sha256=4QgCB9b7_ykvH8YD-hfnogVH9CLyHVDC5QNb03l4_X8,2735
185
- modal_version/__init__.py,sha256=sqwDRwl8jZ8bUepdLsnkOcPFuWyfw16vxWQszUbQb20,121
185
+ modal_version/__init__.py,sha256=WXzO5XT9EAdQnK2LcLXNXaZh5JABvatSeKgLTBjbFbc,121
186
186
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
187
- modal-1.1.5.dev57.dist-info/METADATA,sha256=wZbfn_z34YFxxxKRKVke0tDfUy-Q9FWC6QdxysbjiDk,2481
188
- modal-1.1.5.dev57.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
189
- modal-1.1.5.dev57.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
190
- modal-1.1.5.dev57.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
191
- modal-1.1.5.dev57.dist-info/RECORD,,
187
+ modal-1.1.5.dev58.dist-info/METADATA,sha256=JZVcA5KINkSZitWs2SUZCR6bXLzXWBOZsig-Ylun2TM,2481
188
+ modal-1.1.5.dev58.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
189
+ modal-1.1.5.dev58.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
190
+ modal-1.1.5.dev58.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
191
+ modal-1.1.5.dev58.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.1.5.dev57"
4
+ __version__ = "1.1.5.dev58"