indent 0.1.18__py3-none-any.whl → 0.1.19__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 indent might be problematic. Click here for more details.

exponent/__init__.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '0.1.18'
32
- __version_tuple__ = version_tuple = (0, 1, 18)
31
+ __version__ = version = '0.1.19'
32
+ __version_tuple__ = version_tuple = (0, 1, 19)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -1,3 +1,4 @@
1
+ import asyncio
1
2
  import logging
2
3
  import uuid
3
4
  from collections.abc import Callable
@@ -109,26 +110,31 @@ async def execute_read_file( # noqa: PLR0911, PLR0915
109
110
  is_image, media_type = is_image_file(tool_input.file_path)
110
111
  if is_image and media_type and upload_client is not None:
111
112
  try:
112
- import aiohttp
113
+ import urllib.request
113
114
 
114
115
  file_name = Path(tool_input.file_path).name
115
116
  s3_key = f"images/{uuid.uuid4()}/{file_name}"
116
117
 
117
118
  upload_response = await upload_client.request_upload_url(s3_key, media_type)
118
119
 
119
- async with aiohttp.ClientSession() as session:
120
- f = await file.open("rb")
121
- async with f:
122
- file_data = await f.read()
123
- async with session.put(
120
+ f = await file.open("rb")
121
+ async with f:
122
+ file_data = await f.read()
123
+
124
+ def _upload() -> int:
125
+ req = urllib.request.Request(
124
126
  upload_response.upload_url,
125
127
  data=file_data,
126
128
  headers={"Content-Type": media_type},
127
- ) as resp:
128
- if resp.status != 200:
129
- raise RuntimeError(
130
- f"Upload failed with status {resp.status}"
131
- )
129
+ method="PUT",
130
+ )
131
+ with urllib.request.urlopen(req) as resp:
132
+ status: int = resp.status
133
+ return status
134
+
135
+ status = await asyncio.to_thread(_upload)
136
+ if status != 200:
137
+ raise RuntimeError(f"Upload failed with status {status}")
132
138
 
133
139
  return ReadToolArtifactResult(
134
140
  s3_uri=upload_response.s3_uri,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: indent
3
- Version: 0.1.18
3
+ Version: 0.1.19
4
4
  Summary: Indent is an AI Pair Programmer
5
5
  Author-email: Sashank Thupukari <sashank@exponent.run>
6
6
  Requires-Python: <3.13,>=3.10
@@ -1,4 +1,4 @@
1
- exponent/__init__.py,sha256=Nx3lULyklTDQB2p2ofjQ59zAxYunJHGjMIsvHePGZsI,706
1
+ exponent/__init__.py,sha256=fjpHGGz4Pr5zOvmurEGTqs99z8OU4DpgAvX1DM3jqc4,706
2
2
  exponent/cli.py,sha256=QnIeDTgWaQJrRs5WESCkQpVEQiJiAO4qWgB0rYlkd78,3344
3
3
  exponent/py.typed,sha256=9XZl5avs8yHp89XP_1Fjtbeg_2rjYorCC9I0k_j-h2c,334
4
4
  exponent/commands/cloud_commands.py,sha256=TNSbKnc7VBo7VALj44CqV5tdCACJejEGmtYvc5wjza4,19080
@@ -29,7 +29,7 @@ exponent/core/remote_execution/git.py,sha256=dGjBpeoKJZsYgRwctSq29GmbsNIN9tbSA3V
29
29
  exponent/core/remote_execution/http_fetch.py,sha256=aFEyXd0S-MRfisSMuIFiEyc1AEAj9nUZ9Rj_P_YRows,2827
30
30
  exponent/core/remote_execution/session.py,sha256=jlQIdeUj0f7uOk3BgzlJtBJ_GyTIjCchBp5ApQuF2-I,3847
31
31
  exponent/core/remote_execution/system_context.py,sha256=QY1zY8_fWj3sh-fmLYtewvgxh7uTX4ITIJqlUTDkj6c,648
32
- exponent/core/remote_execution/tool_execution.py,sha256=jhsZCV_XDyXC9moN01xUTLvl-q84jMFtpauPqPGz2cQ,15591
32
+ exponent/core/remote_execution/tool_execution.py,sha256=LSV4vL5eCdjEWxlQF5nL9XwC7PC4c-jPhbfHnBE1pBM,15737
33
33
  exponent/core/remote_execution/tool_type_utils.py,sha256=7qi6Qd8fvHts019ZSLPbtiy17BUqgqBg3P_gdfvFf7w,1301
34
34
  exponent/core/remote_execution/truncation.py,sha256=1L0qwbWgQFRwJZeCXRVKkEhKmzoS1x2usDLPUIp-jlU,9923
35
35
  exponent/core/remote_execution/types.py,sha256=uo8h_ftcafmDp8YTxAI-H9qSaDygHYRFnnrmrBxukm4,14934
@@ -46,7 +46,7 @@ exponent/migration-docs/login.md,sha256=KIeXy3m2nzSUgw-4PW1XzXfHael1D4Zu93CplLMb
46
46
  exponent/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  exponent/utils/colors.py,sha256=HBkqe_ZmhJ9YiL2Fpulqek4KvLS5mwBTY4LQSM5N8SM,2762
48
48
  exponent/utils/version.py,sha256=GHZ9ET1kMyDubJZU3w2sah5Pw8XpiEakS5IOlt3wUnQ,8888
49
- indent-0.1.18.dist-info/METADATA,sha256=fhSeEdMOl6WPMNlWcAWROiZT13E1-b2DooMkOwemXm4,1308
50
- indent-0.1.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
51
- indent-0.1.18.dist-info/entry_points.txt,sha256=q8q1t1sbl4NULGOR0OV5RmSG4KEjkpEQRU_RUXEGzcs,44
52
- indent-0.1.18.dist-info/RECORD,,
49
+ indent-0.1.19.dist-info/METADATA,sha256=RMSj_P3qCdGln3SEb6JL07e4anpe-QMUAVJvMjJT-bM,1308
50
+ indent-0.1.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
51
+ indent-0.1.19.dist-info/entry_points.txt,sha256=q8q1t1sbl4NULGOR0OV5RmSG4KEjkpEQRU_RUXEGzcs,44
52
+ indent-0.1.19.dist-info/RECORD,,