mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-10 10:26:31 +08:00
[stdlib] Deprecate old functions (#14553)
* [stdlib] Deprecate many functions * Fix typo * Imporove message for asyncio/trsock * Apply suggestions from code review Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> * Add Python before version * [pre-commit.ci] auto fixes from pre-commit.com hooks * Wrap comment lines * fix the rest --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
+2
-1
@@ -13,7 +13,7 @@ from ssl import (
|
||||
SSLZeroReturnError as SSLZeroReturnError,
|
||||
)
|
||||
from typing import Any, ClassVar, Final, Literal, TypedDict, final, overload, type_check_only
|
||||
from typing_extensions import NotRequired, Self, TypeAlias
|
||||
from typing_extensions import NotRequired, Self, TypeAlias, deprecated
|
||||
|
||||
_PasswordType: TypeAlias = Callable[[], str | bytes | bytearray] | str | bytes | bytearray
|
||||
_PCTRTT: TypeAlias = tuple[tuple[str, str], ...]
|
||||
@@ -51,6 +51,7 @@ def RAND_add(string: str | ReadableBuffer, entropy: float, /) -> None: ...
|
||||
def RAND_bytes(n: int, /) -> bytes: ...
|
||||
|
||||
if sys.version_info < (3, 12):
|
||||
@deprecated("Deprecated since Python 3.6; removed in Python 3.12. Use `ssl.RAND_bytes()` instead.")
|
||||
def RAND_pseudo_bytes(n: int, /) -> tuple[bytes, bool]: ...
|
||||
|
||||
if sys.version_info < (3, 10):
|
||||
|
||||
Reference in New Issue
Block a user