From 09c945b32bc53bb70485bc385c00d5b28e151826 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Mon, 21 Feb 2022 17:55:29 -0800 Subject: [PATCH] http: make __str__ match runtime def (#7348) Co-authored-by: hauntsaninja <> --- stdlib/http/cookies.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdlib/http/cookies.pyi b/stdlib/http/cookies.pyi index 11760ecf4..80cb35608 100644 --- a/stdlib/http/cookies.pyi +++ b/stdlib/http/cookies.pyi @@ -38,6 +38,7 @@ class Morsel(dict[str, Any], Generic[_T]): def update(self, values: Iterable[tuple[str, str]]) -> None: ... def isReservedKey(self, K: str) -> bool: ... def output(self, attrs: list[str] | None = ..., header: str = ...) -> str: ... + __str__ = output def js_output(self, attrs: list[str] | None = ...) -> str: ... def OutputString(self, attrs: list[str] | None = ...) -> str: ... def __eq__(self, morsel: object) -> bool: ... @@ -50,6 +51,7 @@ class BaseCookie(dict[str, Morsel[_T]], Generic[_T]): def value_decode(self, val: str) -> _T: ... def value_encode(self, val: _T) -> str: ... def output(self, attrs: list[str] | None = ..., header: str = ..., sep: str = ...) -> str: ... + __str__ = output def js_output(self, attrs: list[str] | None = ...) -> str: ... def load(self, rawdata: _DataType) -> None: ... def __setitem__(self, key: str, value: str | Morsel[_T]) -> None: ...