mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +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:
+6
-2
@@ -6,7 +6,7 @@ from _typeshed import MaybeNone, ReadableBuffer
|
||||
from collections.abc import Callable, Iterator, Mapping
|
||||
from types import GenericAlias
|
||||
from typing import Any, AnyStr, Final, Generic, Literal, TypeVar, final, overload
|
||||
from typing_extensions import TypeAlias
|
||||
from typing_extensions import TypeAlias, deprecated
|
||||
|
||||
__all__ = [
|
||||
"match",
|
||||
@@ -307,4 +307,8 @@ def escape(pattern: AnyStr) -> AnyStr: ...
|
||||
def purge() -> None: ...
|
||||
|
||||
if sys.version_info < (3, 13):
|
||||
def template(pattern: AnyStr | Pattern[AnyStr], flags: _FlagsType = 0) -> Pattern[AnyStr]: ...
|
||||
if sys.version_info >= (3, 11):
|
||||
@deprecated("Deprecated since Python 3.11; removed in Python 3.13. Use `re.compile()` instead.")
|
||||
def template(pattern: AnyStr | Pattern[AnyStr], flags: _FlagsType = 0) -> Pattern[AnyStr]: ... # undocumented
|
||||
else:
|
||||
def template(pattern: AnyStr | Pattern[AnyStr], flags: _FlagsType = 0) -> Pattern[AnyStr]: ... # undocumented
|
||||
|
||||
Reference in New Issue
Block a user