|
3 | 3 | """
|
4 | 4 |
|
5 | 5 | from __future__ import annotations
|
6 |
| -from typing import TYPE_CHECKING, Any, Callable, Dict, Generic, Iterable, Iterator, Optional, Sequence, Tuple, Type, TypeVar, Union, ParamSpec |
| 6 | +from typing import TYPE_CHECKING, Any, Callable, Dict, Generic, Iterable, Iterator, Optional, Sequence, Tuple, Type, TypeVar, Union |
7 | 7 |
|
8 | 8 | import ctypes
|
9 | 9 | import functools
|
@@ -636,14 +636,12 @@ class Uc(RegStateManager):
|
636 | 636 | # https://stackoverflow.com/questions/2536307/decorators-in-the-python-standard-lib-deprecated-specifically
|
637 | 637 | @staticmethod
|
638 | 638 | def __deprecated(msg: str):
|
639 |
| - __rT = TypeVar('rT') # return type |
640 |
| - __pT = ParamSpec('pT') # parameters type |
641 |
| - def __deprecated_inner(func: Callable[__pT, __rT]) -> Callable[__pT, __rT]: |
| 639 | + def __deprecated_inner(func: Callable) -> Callable: |
642 | 640 | """Use this decorator to mark functions as deprecated.
|
643 | 641 | Every time the decorated function runs, it will emit
|
644 | 642 | a "deprecation" warning."""
|
645 | 643 | @functools.wraps(func)
|
646 |
| - def new_func(*args: __pT.args, **kwargs: __pT.kwargs): |
| 644 | + def new_func(*args, **kwargs): |
647 | 645 | warnings.simplefilter('always', DeprecationWarning) # turn off filter
|
648 | 646 | warnings.warn("Call to a deprecated function {}. {}".format(func.__name__, msg),
|
649 | 647 | category=DeprecationWarning,
|
|
0 commit comments