Skip to content

Commit 02b856a

Browse files
committed
Fix deprecated
1 parent f1a6ec9 commit 02b856a

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

distutils/command/bdist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
from typing_extensions import deprecated
1717
else:
1818

19-
def deprecated(fn):
20-
return fn
19+
def deprecated(message):
20+
return lambda fn: fn
2121

2222

2323
def show_formats():

distutils/compilers/C/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
TYPE_CHECKING,
1616
ClassVar,
1717
Literal,
18-
Tuple,
1918
TypeAlias,
2019
TypeVar,
2120
Union,
@@ -45,7 +44,7 @@
4544

4645
_Ts = TypeVarTuple("_Ts")
4746

48-
_Macro: TypeAlias = Union[Tuple[str], Tuple[str, str | None]]
47+
_Macro: TypeAlias = Union[tuple[str], tuple[str, Union[str, None]]]
4948
_StrPathT = TypeVar("_StrPathT", bound="str | os.PathLike[str]")
5049
_BytesPathT = TypeVar("_BytesPathT", bound="bytes | os.PathLike[bytes]")
5150

distutils/dist.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
TYPE_CHECKING,
2121
Any,
2222
ClassVar,
23-
List,
2423
Literal,
25-
Tuple,
2624
TypeAlias,
2725
TypeVar,
2826
Union,
@@ -49,8 +47,8 @@
4947
from .cmd import Command
5048

5149
_CommandT = TypeVar("_CommandT", bound="Command")
52-
_OptionsList: TypeAlias = List[
53-
Tuple[str, Union[str, None], str, int] | Tuple[str, Union[str, None], str]
50+
_OptionsList: TypeAlias = list[
51+
Union[tuple[str, Union[str, None], str, int], tuple[str, Union[str, None], str]]
5452
]
5553

5654

distutils/sysconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
from typing_extensions import deprecated
2929
else:
3030

31-
def deprecated(fn):
32-
return fn
31+
def deprecated(message):
32+
return lambda fn: fn
3333

3434

3535
IS_PYPY = '__pypy__' in sys.builtin_module_names

0 commit comments

Comments
 (0)