Skip to content

Commit 4f065ce

Browse files
authored
[Deprecated] Update to ~=1.3.1 (#14954)
1 parent 7bfc844 commit 4f065ce

File tree

3 files changed

+28
-3
lines changed

3 files changed

+28
-3
lines changed

stubs/Deprecated/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version = "~=1.2.15"
1+
version = "~=1.3.1"
22
upstream_repository = "https://github.com/tantale/deprecated"
33
requires = []
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
from typing import Final
2+
13
from .classic import deprecated as deprecated
4+
from .params import deprecated_params as deprecated_params
25

3-
__credits__: str
4-
__date__: str
6+
__version__: Final[str]
7+
__author__: Final[str]
8+
__date__: Final[str]
9+
__credits__: Final[str]
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from collections.abc import Callable, Iterable
2+
from inspect import Signature
3+
from typing import Any, TypeVar
4+
from typing_extensions import ParamSpec
5+
6+
_P = ParamSpec("_P")
7+
_R = TypeVar("_R")
8+
9+
class DeprecatedParams:
10+
messages: dict[str, str]
11+
category: type[Warning]
12+
def __init__(self, param: str | dict[str, str], reason: str = "", category: type[Warning] = ...) -> None: ...
13+
def populate_messages(self, param: str | dict[str, str], reason: str = "") -> None: ...
14+
def check_params(
15+
self, signature: Signature, *args: Any, **kwargs: Any # args and kwargs passing to Signature.bind method
16+
) -> list[str]: ...
17+
def warn_messages(self, messages: Iterable[str]) -> None: ...
18+
def __call__(self, f: Callable[_P, _R]) -> Callable[_P, _R]: ...
19+
20+
deprecated_params = DeprecatedParams

0 commit comments

Comments
 (0)