File tree Expand file tree Collapse file tree 6 files changed +32
-7
lines changed Expand file tree Collapse file tree 6 files changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ dependencies = [
43
43
" packaging>=20" ,
44
44
" setuptools" ,
45
45
' tomli>=1; python_version < "3.11"' ,
46
- " typing-extensions" ,
46
+ ' typing-extensions; python_version < "3.10" ' ,
47
47
]
48
48
[project .optional-dependencies ]
49
49
docs = [
@@ -61,6 +61,7 @@ test = [
61
61
" build" ,
62
62
" pytest" ,
63
63
" rich" ,
64
+ ' typing-extensions; python_version < "3.11"' ,
64
65
" wheel" ,
65
66
]
66
67
toml = [
Original file line number Diff line number Diff line change 12
12
from .pathtools import norm_real
13
13
14
14
if TYPE_CHECKING :
15
- from typing_extensions import TypeGuard
15
+ import sys
16
+
17
+ if sys .version_info >= (3 , 10 ):
18
+ from typing import TypeGuard
19
+ else :
20
+ from typing_extensions import TypeGuard
16
21
17
22
18
23
log = _log .log .getChild ("file_finder" )
Original file line number Diff line number Diff line change 16
16
from tomli import loads as load_toml
17
17
18
18
if TYPE_CHECKING :
19
- from typing_extensions import TypeAlias
19
+ if sys .version_info >= (3 , 10 ):
20
+ from typing import TypeAlias
21
+ else :
22
+ from typing_extensions import TypeAlias
20
23
21
24
from .. import _log
22
25
Original file line number Diff line number Diff line change 10
10
from typing import Union
11
11
12
12
if TYPE_CHECKING :
13
- from typing_extensions import TypeAlias
13
+ import sys
14
+
15
+ if sys .version_info >= (3 , 10 ):
16
+ from typing import TypeAlias
17
+ else :
18
+ from typing_extensions import TypeAlias
14
19
15
20
from . import version
16
21
Original file line number Diff line number Diff line change 18
18
from . import _modify_version
19
19
20
20
if TYPE_CHECKING :
21
- from typing_extensions import Concatenate
22
- from typing_extensions import ParamSpec
21
+ import sys
22
+
23
+ if sys .version_info >= (3 , 10 ):
24
+ from typing import Concatenate
25
+ from typing import ParamSpec
26
+ else :
27
+ from typing_extensions import Concatenate
28
+ from typing_extensions import ParamSpec
23
29
24
30
_P = ParamSpec ("_P" )
25
31
Original file line number Diff line number Diff line change 2
2
3
3
import contextlib
4
4
import os
5
+ import sys
5
6
6
7
from pathlib import Path
7
8
from types import TracebackType
11
12
import pytest
12
13
13
14
from setuptools_scm ._run_cmd import run
14
- from typing_extensions import Self
15
+
16
+ if sys .version_info >= (3 , 11 ):
17
+ from typing import Self
18
+ else :
19
+ from typing_extensions import Self
15
20
16
21
from .wd_wrapper import WorkDir
17
22
You can’t perform that action at this time.
0 commit comments