Skip to content

Commit a9cc009

Browse files
committed
tox: add typing-extensions
1 parent db9b819 commit a9cc009

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

fan_tools/python/decorators.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
import functools
44
import logging
55
from pathlib import Path
6-
from typing import Awaitable, Callable, ParamSpec, Protocol, Type, TypeVar, Union
6+
from typing import Awaitable, Callable, Protocol, Type, TypeVar, Union
7+
8+
9+
try:
10+
from typing import ParamSpec
11+
except ImportError:
12+
from typing_extensions import ParamSpec
713

814

915
default_logger = logging.getLogger('fantools.python')

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ authors = [
88
]
99
keywords = ['testing', 'asyncio']
1010
dependencies = [
11-
'pyyaml>=3.12'
11+
'pyyaml>=3.12',
12+
'typing-extensions~=4.4.0'
1213
]
1314
classifiers = [
1415
'Development Status :: 5 - Production/Stable',

tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[tox]
2+
min_version = 4.3
23
isolated_build = True
3-
envlist = cp{38,39,310}-django{32,40} #,mypy
4+
envlist = py{38,39,310}-django{32,40} #,mypy
45

56
[testenv]
67
extras =
@@ -30,6 +31,7 @@ deps =
3031
django32: Django==3.2.*
3132
django40: Django==4.0.*
3233
django40: djangorestframework==3.13.*
34+
typing_extensions
3335
commands =
3436
pytest {posargs}
3537

0 commit comments

Comments
 (0)