modal 0.73.112__py3-none-any.whl → 0.73.113__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/_utils/git_utils.py CHANGED
@@ -24,6 +24,25 @@ async def run_command_fallible(args: list[str]) -> Optional[str]:
24
24
  return None
25
25
 
26
26
 
27
+ def is_valid_commit_info(commit_info: api_pb2.CommitInfo) -> tuple[bool, str]:
28
+ # returns (valid, error_message)
29
+ if commit_info.vcs != "git":
30
+ return False, "Invalid VCS"
31
+ if len(commit_info.commit_hash) != 40:
32
+ return False, "Invalid commit hash"
33
+ if len(commit_info.branch) > 255:
34
+ # Git doesn't enforce a max length for branch names, but github does, so use their limit
35
+ # https://stackoverflow.com/questions/24014361/max-length-of-git-branch-name
36
+ return False, "Branch name too long"
37
+ if len(commit_info.repo_url) > 200:
38
+ return False, "Repo URL too long"
39
+ if len(commit_info.author_name) > 200:
40
+ return False, "Author name too long"
41
+ if len(commit_info.author_email) > 200:
42
+ return False, "Author email too long"
43
+ return True, ""
44
+
45
+
27
46
  async def get_git_commit_info() -> Optional[api_pb2.CommitInfo]:
28
47
  """Collect git information about the current repository asynchronously."""
29
48
  git_info: api_pb2.CommitInfo = api_pb2.CommitInfo(vcs="git")
@@ -69,4 +88,9 @@ async def get_git_commit_info() -> Optional[api_pb2.CommitInfo]:
69
88
  if origin_url:
70
89
  git_info.repo_url = origin_url
71
90
 
91
+ valid, error_message = is_valid_commit_info(git_info)
92
+ if not valid:
93
+ logger.warning(f"Invalid commit info: {error_message}")
94
+ return None
95
+
72
96
  return git_info
modal/client.pyi CHANGED
@@ -31,7 +31,7 @@ class _Client:
31
31
  server_url: str,
32
32
  client_type: int,
33
33
  credentials: typing.Optional[tuple[str, str]],
34
- version: str = "0.73.112",
34
+ version: str = "0.73.113",
35
35
  ): ...
36
36
  def is_closed(self) -> bool: ...
37
37
  @property
@@ -93,7 +93,7 @@ class Client:
93
93
  server_url: str,
94
94
  client_type: int,
95
95
  credentials: typing.Optional[tuple[str, str]],
96
- version: str = "0.73.112",
96
+ version: str = "0.73.113",
97
97
  ): ...
98
98
  def is_closed(self) -> bool: ...
99
99
  @property
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: modal
3
- Version: 0.73.112
3
+ Version: 0.73.113
4
4
  Summary: Python client library for Modal
5
5
  Author-email: Modal Labs <support@modal.com>
6
6
  License: Apache-2.0
@@ -22,7 +22,7 @@ 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
24
  modal/client.py,sha256=j9D3hNis1lfhnz9lVFGgJgowbH3PaGUzNKgHPWYG778,15372
25
- modal/client.pyi,sha256=JAvt1P0KH6lkTI4woGquUcp_TagLeMvIwNhCCDAh-dw,7661
25
+ modal/client.pyi,sha256=kNMyWXSDP_ZYTG0DIjukvvlEOzqpAAcPw5eSS5yh0sQ,7661
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=JhDbaZZHN52lqA_roY1BCbcN9BvbkUcdXiM2Kg9lIc0,31717
@@ -99,7 +99,7 @@ modal/_utils/bytes_io_segment_payload.py,sha256=uunxVJS4PE1LojF_UpURMzVK9GuvmYWR
99
99
  modal/_utils/deprecation.py,sha256=EXP1beU4pmEqEzWMLw6E3kUfNfpmNA_VOp6i0EHi93g,4856
100
100
  modal/_utils/docker_utils.py,sha256=h1uETghR40mp_y3fSWuZAfbIASH1HMzuphJHghAL6DU,3722
101
101
  modal/_utils/function_utils.py,sha256=OqsmLKOqSenxkXiNSPUWpKqD5KotySa_Omw1tmt97K0,27380
102
- modal/_utils/git_utils.py,sha256=-bTeR3RCZydqduVwmraBlQG11KHvzsY5H48VKS8coGQ,2202
102
+ modal/_utils/git_utils.py,sha256=qtUU6JAttF55ZxYq51y55OR58B0tDPZsZWK5dJe6W5g,3182
103
103
  modal/_utils/grpc_testing.py,sha256=H1zHqthv19eGPJz2HKXDyWXWGSqO4BRsxah3L5Xaa8A,8619
104
104
  modal/_utils/grpc_utils.py,sha256=wmMydVKN9YbugTwUXuOuzxbpzYvxkTDaFRxlBtIDE_0,8526
105
105
  modal/_utils/hash_utils.py,sha256=zg3J6OGxTFGSFri1qQ12giDz90lWk8bzaxCTUCRtiX4,3034
@@ -170,10 +170,10 @@ modal_proto/options_pb2_grpc.pyi,sha256=CImmhxHsYnF09iENPoe8S4J-n93jtgUYD2JPAc0y
170
170
  modal_proto/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
171
171
  modal_version/__init__.py,sha256=wiJQ53c-OMs0Xf1UeXOxQ7FwlV1VzIjnX6o-pRYZ_Pk,470
172
172
  modal_version/__main__.py,sha256=2FO0yYQQwDTh6udt1h-cBnGd1c4ZyHnHSI4BksxzVac,105
173
- modal_version/_version_generated.py,sha256=Egm9orIPMkUj-zgvNoFCAoWTibUMIRH5E4ZNUuQKoWU,150
174
- modal-0.73.112.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
175
- modal-0.73.112.dist-info/METADATA,sha256=3Im9wanFq4dHmpCD9xHp9M29R3HM0A5jMDWqe9e8EyM,2453
176
- modal-0.73.112.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
177
- modal-0.73.112.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
- modal-0.73.112.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
- modal-0.73.112.dist-info/RECORD,,
173
+ modal_version/_version_generated.py,sha256=nCyRegt7czA8sl95JTLmjtQiNEdVuyQ2QYPjkUjvXgU,150
174
+ modal-0.73.113.dist-info/LICENSE,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173
175
+ modal-0.73.113.dist-info/METADATA,sha256=1T09sS1RCSYsnkDJC3yVvhZ1YtGdZJFyU9iVeYXAxw8,2453
176
+ modal-0.73.113.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
177
+ modal-0.73.113.dist-info/entry_points.txt,sha256=An-wYgeEUnm6xzrAP9_NTSTSciYvvEWsMZILtYrvpAI,46
178
+ modal-0.73.113.dist-info/top_level.txt,sha256=4BWzoKYREKUZ5iyPzZpjqx4G8uB5TWxXPDwibLcVa7k,43
179
+ modal-0.73.113.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (76.1.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 = 112 # git: c0bcdba
4
+ build_number = 113 # git: 456336d