uiautodev 0.3.4__tar.gz → 0.3.5__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.

Potentially problematic release.


This version of uiautodev might be problematic. Click here for more details.

Files changed (29) hide show
  1. {uiautodev-0.3.4 → uiautodev-0.3.5}/PKG-INFO +2 -2
  2. {uiautodev-0.3.4 → uiautodev-0.3.5}/pyproject.toml +2 -2
  3. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/common.py +1 -1
  4. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/router/device.py +7 -0
  5. {uiautodev-0.3.4 → uiautodev-0.3.5}/LICENSE +0 -0
  6. {uiautodev-0.3.4 → uiautodev-0.3.5}/README.md +0 -0
  7. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/__init__.py +0 -0
  8. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/__main__.py +0 -0
  9. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/app.py +0 -0
  10. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/appium_proxy.py +0 -0
  11. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/case.py +0 -0
  12. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/cli.py +0 -0
  13. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/command_proxy.py +0 -0
  14. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/command_types.py +0 -0
  15. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/driver/android.py +0 -0
  16. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/driver/appium.py +0 -0
  17. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/driver/base_driver.py +0 -0
  18. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/driver/ios.py +0 -0
  19. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/driver/mock.py +0 -0
  20. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/driver/udt/appium-uiautomator2-v5.12.4-light.apk +0 -0
  21. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/driver/udt/udt.py +0 -0
  22. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/exceptions.py +0 -0
  23. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/model.py +0 -0
  24. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/provider.py +0 -0
  25. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/router/xml.py +0 -0
  26. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/static/demo.html +0 -0
  27. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/utils/common.py +0 -0
  28. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/utils/exceptions.py +0 -0
  29. {uiautodev-0.3.4 → uiautodev-0.3.5}/uiautodev/utils/usbmux.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uiautodev
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Summary: Mobile UI Automation, include UI hierarchy inspector, script recorder
5
5
  Home-page: https://uiauto.dev
6
6
  License: MIT
@@ -27,7 +27,7 @@ Requires-Dist: pillow
27
27
  Requires-Dist: poetry (>=1.8.2,<2.0.0)
28
28
  Requires-Dist: pygments (>=2)
29
29
  Requires-Dist: uiautomator2 (>=2)
30
- Requires-Dist: uvicorn
30
+ Requires-Dist: uvicorn[standard]
31
31
  Description-Content-Type: text/markdown
32
32
 
33
33
  # uiautodev
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "uiautodev"
3
- version = "0.3.4"
3
+ version = "0.3.5"
4
4
  description = "Mobile UI Automation, include UI hierarchy inspector, script recorder"
5
5
  homepage = "https://uiauto.dev"
6
6
  authors = ["codeskyblue <codeskyblue@gmail.com>"]
@@ -20,7 +20,7 @@ appium-python-client = {version = "^4.0.0", optional = true}
20
20
  uiautomator2 = ">=2"
21
21
  httpx = "*"
22
22
  fastapi = "^0.111.0"
23
- uvicorn = "*"
23
+ uvicorn = {version = "*", extras = ["standard"]}
24
24
  poetry = "^1.8.2"
25
25
 
26
26
  [tool.poetry.extras]
@@ -12,7 +12,7 @@ def is_chinese_language() -> bool:
12
12
  language_code, _ = locale.getdefaultlocale()
13
13
 
14
14
  # Check if the language code starts with 'zh' (Chinese)
15
- if language_code.startswith('zh'):
15
+ if language_code and language_code.startswith('zh'):
16
16
  return True
17
17
  else:
18
18
  return False
@@ -5,6 +5,7 @@
5
5
  """
6
6
 
7
7
  import io
8
+ import logging
8
9
  from typing import Any, List
9
10
 
10
11
  from fastapi import APIRouter, Response
@@ -16,6 +17,8 @@ from uiautodev.model import DeviceInfo, Node, ShellResponse
16
17
  from uiautodev.provider import BaseProvider
17
18
 
18
19
 
20
+ logger = logging.getLogger(__name__)
21
+
19
22
  class AndroidShellPayload(BaseModel):
20
23
  command: str
21
24
 
@@ -31,6 +34,7 @@ def make_router(provider: BaseProvider) -> APIRouter:
31
34
  except NotImplementedError as e:
32
35
  return Response(content="list_devices not implemented", media_type="text/plain", status_code=501)
33
36
  except Exception as e:
37
+ logger.exception("list_devices failed")
34
38
  return Response(content=str(e), media_type="text/plain", status_code=500)
35
39
 
36
40
  @router.post("/{serial}/shell")
@@ -42,6 +46,7 @@ def make_router(provider: BaseProvider) -> APIRouter:
42
46
  except NotImplementedError as e:
43
47
  return Response(content="shell not implemented", media_type="text/plain", status_code=501)
44
48
  except Exception as e:
49
+ logger.exception("shell failed")
45
50
  return ShellResponse(output="", error=str(e))
46
51
 
47
52
  @router.get(
@@ -59,6 +64,7 @@ def make_router(provider: BaseProvider) -> APIRouter:
59
64
  image_bytes = buf.getvalue()
60
65
  return Response(content=image_bytes, media_type="image/jpeg")
61
66
  except Exception as e:
67
+ logger.exception("screenshot failed")
62
68
  return Response(content=str(e), media_type="text/plain", status_code=500)
63
69
 
64
70
  @router.get("/{serial}/hierarchy")
@@ -69,6 +75,7 @@ def make_router(provider: BaseProvider) -> APIRouter:
69
75
  xml_data, hierarchy = driver.dump_hierarchy()
70
76
  return hierarchy
71
77
  except Exception as e:
78
+ logger.exception("dump_hierarchy failed")
72
79
  return Response(content=str(e), media_type="text/plain", status_code=500)
73
80
 
74
81
  @router.post('/{serial}/command/tap')
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes