diff options
author | Sam Balana <sambalana247@gmail.com> | 2022-10-13 19:52:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 19:52:01 -0700 |
commit | c4261efa56b0077136a2e5531ff4e0139c9a6b30 (patch) | |
tree | d752fb6c6125ef16dfc1987cc315f283e38afd80 | |
parent | 7fb50849dd782e40e0eee1592bfe4837543a7d1d (diff) | |
download | mobly-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.py | 9 | ||||
-rwxr-xr-x | setup.py | 4 |
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. @@ -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': |