Skip to content

Commit

Permalink
Update packaging (#904)
Browse files Browse the repository at this point in the history
* update_packaging

* update requirements.txt: packaging>=20.3

---------

Co-authored-by: codeskyblue <[email protected]>
  • Loading branch information
wdschn and codeskyblue authored Mar 20, 2024
1 parent d94a304 commit 72a2dd7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Deprecated~=1.2.6
Pillow
lxml>=4.3
cached-property>=1.5.1,<2.0
packaging
packaging>=20.3

#websocket-client

Expand Down
8 changes: 4 additions & 4 deletions uiautomator2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import adbutils
import filelock
import logzero
import packaging
from packaging import version as packaging_version
import requests
import six
import six.moves.urllib.parse as urlparse
Expand Down Expand Up @@ -723,7 +723,7 @@ def _is_apk_outdated(self):
return True

# 检查版本是否过期
if apk_version < packaging.version.parse(__apk_version__):
if apk_version < packaging_version.parse(__apk_version__):
return True

# 检查测试apk是否存在
Expand All @@ -740,8 +740,8 @@ def _package_version(self, package_name: str) -> Optional[packaging.version.Vers
if m is None:
return None
try:
return packaging.version.parse(m.group('name'))
except packaging.version.InvalidVersion:
return packaging_version.parse(m.group('name'))
except packaging_version.InvalidVersion:
return None

def _grant_app_permissions(self):
Expand Down

0 comments on commit 72a2dd7

Please sign in to comment.