[Deprecated] Update to ~=1.3.1 (#14954)

This commit is contained in:
Semyon Moroz
2025-10-31 19:17:15 +04:00
committed by GitHub
parent 7bfc84416b
commit 4f065cea54
3 changed files with 29 additions and 4 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
version = "~=1.2.15"
version = "~=1.3.1"
upstream_repository = "https://github.com/tantale/deprecated"
requires = []
+8 -3
View File
@@ -1,4 +1,9 @@
from .classic import deprecated as deprecated
from typing import Final
__credits__: str
__date__: str
from .classic import deprecated as deprecated
from .params import deprecated_params as deprecated_params
__version__: Final[str]
__author__: Final[str]
__date__: Final[str]
__credits__: Final[str]
+20
View File
@@ -0,0 +1,20 @@
from collections.abc import Callable, Iterable
from inspect import Signature
from typing import Any, TypeVar
from typing_extensions import ParamSpec
_P = ParamSpec("_P")
_R = TypeVar("_R")
class DeprecatedParams:
messages: dict[str, str]
category: type[Warning]
def __init__(self, param: str | dict[str, str], reason: str = "", category: type[Warning] = ...) -> None: ...
def populate_messages(self, param: str | dict[str, str], reason: str = "") -> None: ...
def check_params(
self, signature: Signature, *args: Any, **kwargs: Any # args and kwargs passing to Signature.bind method
) -> list[str]: ...
def warn_messages(self, messages: Iterable[str]) -> None: ...
def __call__(self, f: Callable[_P, _R]) -> Callable[_P, _R]: ...
deprecated_params = DeprecatedParams