dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.63k stars 347 forks source link

22.3.0 does not support Python 3.7.7 #316

Closed HW-Lee closed 2 years ago

HW-Lee commented 2 years ago

Type hints might not be supported to older Python interpreters so that it might be some way to notify users.

$ python3 -c "from com.dtmilano.android.viewclient import ViewClient"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/shell/.local/lib/python3.7/site-packages/com/dtmilano/android/viewclient.py", line 62, in <module>
    from com.dtmilano.android.uiautomator.uiautomatorhelper import UiAutomatorHelper
  File "/home/shell/.local/lib/python3.7/site-packages/com/dtmilano/android/uiautomator/uiautomatorhelper.py", line 46, in <module>
    from com.dtmilano.android.kato import kato
  File "/home/shell/.local/lib/python3.7/site-packages/com/dtmilano/android/kato/kato.py", line 28, in <module>
    from com.dtmilano.android.uiautomator.utils import window_hierarchy_to_selector_list
  File "/home/shell/.local/lib/python3.7/site-packages/com/dtmilano/android/uiautomator/utils.py", line 54, in <module>
    Selector]:
TypeError: 'type' object is not subscriptable

$ python3 --version
Python 3.7.7
dtmilano commented 2 years ago

Thanks for reporting it. I checked newer versions (3.9 & 3.10). I will try 3.7 and make it backward compatible,

dtmilano commented 2 years ago

https://github.com/dtmilano/AndroidViewClient/actions/runs/3512200787 should solve the problem.