dailo-devtools 0.1.1__tar.gz → 0.1.3__tar.gz

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,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dailo-devtools
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: 通过代劳 DevTools 调试单台 Android 设备的 Python API 与 CLI
5
5
  License-Expression: MIT
6
6
  Project-URL: Script SDK, https://pypi.org/project/dailo-sdk/
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "dailo-devtools"
7
- version = "0.1.1"
7
+ version = "0.1.3"
8
8
  description = "通过代劳 DevTools 调试单台 Android 设备的 Python API 与 CLI"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -231,8 +231,10 @@ class Device:
231
231
  try:
232
232
  await self.connect()
233
233
  except Exception as error:
234
- failure = error if isinstance(error, DevtoolsError) else DevtoolsError("重新连接设备失败")
235
- self._fail(failure, source="reconnect")
234
+ failure = error if isinstance(error, DevtoolsError) else DevtoolsError(
235
+ f"重新连接设备失败({type(error).__name__}):{_transport_error(error)}")
236
+ self._fail(failure, source="reconnect", details={
237
+ "phase": "connect_failed", "exceptionChain": _exception_chain(error)})
236
238
  raise failure from None
237
239
 
238
240
  def _transport_event(self, event, details=None):
@@ -642,6 +644,7 @@ class Device:
642
644
  for name, module in list(sys.modules.items()):
643
645
  module_path = getattr(module, '__file__', None)
644
646
  if module_path and Path(module_path).resolve().is_relative_to(workspace_root):
647
+ vars(module).clear()
645
648
  del sys.modules[name]
646
649
  clear_workspace_modules()
647
650
  for name in bundle.namelist():
@@ -662,6 +665,7 @@ class Device:
662
665
  finally:
663
666
  sys.path[:] = previous_path
664
667
  clear_workspace_modules()
668
+ scope.clear()
665
669
  finally:
666
670
  os.chdir(previous_dir)
667
671
  bind(native_host, previous_config)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dailo-devtools
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: 通过代劳 DevTools 调试单台 Android 设备的 Python API 与 CLI
5
5
  License-Expression: MIT
6
6
  Project-URL: Script SDK, https://pypi.org/project/dailo-sdk/
File without changes
File without changes
File without changes