aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Balana <sambalana247@gmail.com>2022-10-13 19:52:01 -0700
committerGitHub <noreply@github.com>2022-10-13 19:52:01 -0700
commitc4261efa56b0077136a2e5531ff4e0139c9a6b30 (patch)
treed752fb6c6125ef16dfc1987cc315f283e38afd80
parent7fb50849dd782e40e0eee1592bfe4837543a7d1d (diff)
downloadmobly-c4261efa56b0077136a2e5531ff4e0139c9a6b30.tar.gz
Remove unused dependencies (#850)
Remove `pyserial` and `timeout_decorator` from deps as they are no longer used. Also mark typing_extensions as only necessary for Python versions below 3.8.
-rw-r--r--mobly/utils.py9
-rwxr-xr-xsetup.py4
2 files changed, 10 insertions, 3 deletions
diff --git a/mobly/utils.py b/mobly/utils.py
index 8140d28..7d26496 100644
--- a/mobly/utils.py
+++ b/mobly/utils.py
@@ -33,8 +33,13 @@ import traceback
from typing import Tuple, overload
import portpicker
-# TODO(ericth): Use Literal from typing if we only run on Python 3.8 or later.
-from typing_extensions import Literal
+
+# TODO(#851): Remove this try/except statement and typing_extensions from
+# install_requires when Python 3.8 is the minimum version we support.
+try:
+ from typing import Literal
+except ImportError:
+ from typing_extensions import Literal
# File name length is limited to 255 chars on some OS, so we need to make sure
# the file names we output fits within the limit.
diff --git a/setup.py b/setup.py
index ffaebe6..6770eab 100755
--- a/setup.py
+++ b/setup.py
@@ -18,7 +18,9 @@ from setuptools.command import test
import sys
install_requires = [
- 'portpicker', 'pyserial', 'pyyaml', 'timeout_decorator', 'typing_extensions>=4.1.1'
+ 'portpicker',
+ 'pyyaml',
+ 'typing_extensions>=4.1.1; python_version<"3.8"',
]
if platform.system() == 'Windows':