diff --git a/stdlib/http/cookies.pyi b/stdlib/http/cookies.pyi index bdec1068b5ea..682884423448 100644 --- a/stdlib/http/cookies.pyi +++ b/stdlib/http/cookies.pyi @@ -2,6 +2,7 @@ from _typeshed import MaybeNone, SupportsItems, SupportsKeysAndGetItem from collections.abc import Container, Iterable from types import GenericAlias from typing import Any, Generic, TypeVar, overload +from typing_extensions import deprecated __all__ = ["CookieError", "BaseCookie", "SimpleCookie"] @@ -34,6 +35,7 @@ class Morsel(dict[str, Any], Generic[_T]): def isReservedKey(self, K: str) -> bool: ... def output(self, attrs: Container[str] | None = None, header: str = "Set-Cookie:") -> str: ... __str__ = output + @deprecated("Deprecated; will be removed in Python 3.19. Use `output()` instead.") def js_output(self, attrs: Container[str] | None = None) -> str: ... def OutputString(self, attrs: Container[str] | None = None) -> str: ... def __eq__(self, morsel: object) -> bool: ... @@ -46,6 +48,7 @@ class BaseCookie(dict[str, Morsel[_T]], Generic[_T]): def value_encode(self, val: _T) -> tuple[str, str]: ... def output(self, attrs: Container[str] | None = None, header: str = "Set-Cookie:", sep: str = "\r\n") -> str: ... __str__ = output + @deprecated("Deprecated; will be removed in Python 3.19. Use `output()` instead.") def js_output(self, attrs: Container[str] | None = None) -> str: ... def load(self, rawdata: str | SupportsItems[str, str | Morsel[Any]]) -> None: ... def __setitem__(self, key: str, value: str | Morsel[_T]) -> None: ...