ap-client 0.5.3.dev6__py3-none-any.whl → 0.5.3.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.
@@ -317,6 +317,9 @@ def _transfer(direction: str, src: str, dst: str, ctx: typer.Context) -> None:
317
317
  _require_remote(src, "SRC")
318
318
  _require_remote(dst, "DST")
319
319
  files = _files()
320
+ from .irepo_sdk import _is_verbose
321
+
322
+ files.verbose = _is_verbose()
320
323
  _configure(files, options.get("encoding_type"), options.get("payer"))
321
324
  files.disable_crc64 = disable_crc64
322
325
  files.disable_all_symlink = disable_all_symlink
ap_client/ossutil_io.py CHANGED
@@ -245,6 +245,9 @@ class _RoutingBucket:
245
245
 
246
246
 
247
247
  def safe_error(exc: Exception) -> str:
248
+ if isinstance(exc, ImportError):
249
+ # ImportError messages only name the missing module; nothing sensitive is included.
250
+ return f"{type(exc).__name__}: {exc}"
248
251
  if isinstance(exc, (OssUsageError, OssOperationError, OSError)):
249
252
  return str(exc)
250
253
  # oss2 exceptions may stringify signed requests and arbitrary response payloads.
@@ -274,6 +277,7 @@ class OssFiles:
274
277
  self.write_headers: dict[str, str] = {}
275
278
  self.byte_range = None
276
279
  self.disable_all_symlink = False
280
+ self.verbose = False
277
281
  if oss_module is None:
278
282
  from instance_repo.store.oss import _import_oss2
279
283
 
@@ -997,6 +1001,14 @@ class OssFiles:
997
1001
  iter(items()), transfer, jobs if recursive else 1, stop_on_error
998
1002
  ):
999
1003
  if error:
1004
+ if self.verbose:
1005
+ # Frames only: exception text may embed signed URLs or STS material.
1006
+ import sys
1007
+ import traceback
1008
+
1009
+ sys.stderr.write("Traceback (most recent call last):\n")
1010
+ sys.stderr.writelines(traceback.format_tb(error.__traceback__))
1011
+ sys.stderr.write(f"error: {safe_error(error)}\n")
1000
1012
  failed.append({"path": name, "error": safe_error(error)})
1001
1013
  elif copied:
1002
1014
  completed.append(name)
@@ -1,13 +1,15 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: ap-client
3
- Version: 0.5.3.dev6
3
+ Version: 0.5.3.dev7
4
4
  Summary: Agent Platform API Client & CLI
5
5
  Requires-Python: >=3.10
6
+ Requires-Dist: click>=8.0.0
6
7
  Requires-Dist: irepo-artifact==0.2.1
7
8
  Requires-Dist: pyyaml>=6.0
8
9
  Requires-Dist: requests>=2.28.0
9
10
  Requires-Dist: rich>=13.0.0
10
11
  Requires-Dist: typer>=0.9.0
12
+ Requires-Dist: urllib3>=1.26
11
13
  Requires-Dist: websockets>=13.0
12
14
  Provides-Extra: all
13
15
  Requires-Dist: instance-repo[oss]<2.0.0,>=1.3.5.dev3; extra == 'all'
@@ -11,15 +11,15 @@ ap_client/instance_commands.py,sha256=pf6RjQFZRyWQfMWMJgJUqcI2BcQRBpoBWvZAOe2vrn
11
11
  ap_client/irepo_sdk.py,sha256=KdwThrAWX6koxwEtUfiArI6SCdVW1BUYVa31lRPI_Po,46891
12
12
  ap_client/managed_ak.py,sha256=KQKpIJKXf-PdnkWd1a3VUjBUsCl9xApZ49wa-AdsTCs,7251
13
13
  ap_client/manifest_view.py,sha256=gDCHYrUFsoy9vSxXON2UVmjkg9H0QF0-zQMxuXX16mA,3831
14
- ap_client/ossutil_commands.py,sha256=Z-VtHNr0jPvfIOT8yrxmAxZyz9cD0kRhhtiKWzaYeEA,18392
15
- ap_client/ossutil_io.py,sha256=sOtVSP6KIhNiTrhwb3UdiaU_Rv8NUL8Ijx0Grc4NnnM,41643
14
+ ap_client/ossutil_commands.py,sha256=SoooQqZikh0s3a2P3URokYlPJS9A8S2G2_h3wUMEqcE,18474
15
+ ap_client/ossutil_io.py,sha256=rour1LT5WD7J2PQHskFC6jelw4Nm_WSxC2nS6-BKxBU,42269
16
16
  ap_client/profile_commands.py,sha256=56-8RwbL0OPeHSTC24Gpv6t1d9XFnr_-GYrJbf65cIE,24464
17
17
  ap_client/repo_read_guard.py,sha256=wyY8BDAplW3Gz617y1CT0uif5fV_FA-Fvom6RDANqo0,1895
18
18
  ap_client/share_api.py,sha256=Im7NpoqdYwVh67bJNQpvjsHUsFwJrrcAk4Zy0v58SKI,8782
19
19
  ap_client/split_publish.py,sha256=7QAf9b4W6A-vRmlccfIZeWjlUmN76P6nZX5dOpIyoRc,6590
20
20
  ap_client/tbb.py,sha256=WJstsdqxCXvuNuSdIOc0Y6Q4GgUWE0cAj0dP4iMKHVM,7149
21
21
  ap_client/waiter.py,sha256=l-9F4j7z3-VpeMKEKAdNg_4ahReu0fEFsoby1bMiQd0,7794
22
- ap_client-0.5.3.dev6.dist-info/METADATA,sha256=Iq943MRcmERMoR8kaMVsmuK9T9b-QphAvJMwRFQkefk,704
23
- ap_client-0.5.3.dev6.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
24
- ap_client-0.5.3.dev6.dist-info/entry_points.txt,sha256=lxFlc62mI5NftTCQ5W1fTPQLnItvI8AYQ3aIlOLVLn0,42
25
- ap_client-0.5.3.dev6.dist-info/RECORD,,
22
+ ap_client-0.5.3.dev7.dist-info/METADATA,sha256=eetcP_IvQxwmo1klzE0FADxZ8Quy--emnqiCA9cL6fk,761
23
+ ap_client-0.5.3.dev7.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
24
+ ap_client-0.5.3.dev7.dist-info/entry_points.txt,sha256=lxFlc62mI5NftTCQ5W1fTPQLnItvI8AYQ3aIlOLVLn0,42
25
+ ap_client-0.5.3.dev7.dist-info/RECORD,,