Skip to content

Commit bb7964d

Browse files
committed
add versionchanged and example with quotes in cookie value
1 parent d7dbde8 commit bb7964d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Doc/library/http.cookies.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ in a cookie name (as :attr:`~Morsel.key`).
3030
.. versionchanged:: 3.3
3131
Allowed ':' as a valid cookie name character.
3232

33+
.. versionchanged:: 3.15
34+
Allowed '"' as a valid cookie value character.
3335

3436
.. note::
3537

@@ -314,3 +316,9 @@ The following example demonstrates how to use the :mod:`http.cookies` module.
314316
>>> print(C)
315317
Set-Cookie: number=7
316318
Set-Cookie: string=seven
319+
>>> C = cookies.SimpleCookie()
320+
>>> C.load('cookies=7; mixins="{"chips": "dark chocolate"}"; state="gooey"')
321+
>>> print(C)
322+
Set-Cookie: cookies=7
323+
Set-Cookie: mixins="{"chips": "dark chocolate"}"
324+
Set-Cookie: state="gooey"

0 commit comments

Comments
 (0)