Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

value_encode and value_decode of http.cookies.BaseCookie not returning tuples #10699

Closed
flaeppe opened this issue Sep 11, 2023 · 2 comments · Fixed by #10702
Closed

value_encode and value_decode of http.cookies.BaseCookie not returning tuples #10699

flaeppe opened this issue Sep 11, 2023 · 2 comments · Fixed by #10702

Comments

@flaeppe
Copy link

flaeppe commented Sep 11, 2023

Documentation states

Return a tuple (real_value, coded_value) [...]

For both BaseCookie.value_decode and BaseCookie.value_encode, although typeshed doesn't align:

class BaseCookie(dict[str, Morsel[_T]], Generic[_T]):
def __init__(self, input: _DataType | None = None) -> None: ...
def value_decode(self, val: str) -> _T: ...
def value_encode(self, val: _T) -> str: ...

@sobolevn
Copy link
Member

@flaeppe please, feel free to send a PR :)

@flaeppe
Copy link
Author

flaeppe commented Sep 11, 2023

Yes, already done: #10702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants