Make typing_extensions only required for 3.7

Literal was introduced in Python 3.8.
This commit is contained in:
Jelle van der Waa 2024-05-25 19:26:26 +02:00
parent 109d7d2f01
commit 359226c26b
2 changed files with 5 additions and 2 deletions

View file

@ -1,3 +1,6 @@
try:
from typing import Literal
except ImportError:
from typing_extensions import Literal from typing_extensions import Literal
AnsiMode = Literal['default', 'ansi', '8bit', 'rgb'] AnsiMode = Literal['default', 'ansi', '8bit', 'rgb']

View file

@ -38,7 +38,7 @@ setup(
include_package_data=True, include_package_data=True,
install_requires=[ install_requires=[
# Universal dependencies # Universal dependencies
'setuptools', 'typing_extensions', 'setuptools', 'typing_extensions; python_version < "3.8"',
# Windows dependencies # Windows dependencies
'psutil ; platform_system=="Windows"', 'psutil ; platform_system=="Windows"',