Skip to content

gh-92936: update http.cookies docs post GH-113663 #137566

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

Merged
merged 9 commits into from
Aug 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Doc/library/http.cookies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ The character set, :data:`string.ascii_letters`, :data:`string.digits` and
in a cookie name (as :attr:`~Morsel.key`).

.. versionchanged:: 3.3
Allowed ':' as a valid cookie name character.
Allowed '``:``' as a valid cookie name character.

.. versionchanged:: next
Allowed '``"``' as a valid cookie value character.

.. note::

Expand Down Expand Up @@ -314,3 +316,10 @@ The following example demonstrates how to use the :mod:`http.cookies` module.
>>> print(C)
Set-Cookie: number=7
Set-Cookie: string=seven
>>> import json
>>> C = cookies.SimpleCookie()
>>> C.load(f'cookies=7; mixins="{json.dumps({"chips": "dark chocolate"})}"; state=gooey')
>>> print(C)
Set-Cookie: cookies=7
Set-Cookie: mixins="{"chips": "dark chocolate"}"
Set-Cookie: state=gooey
7 changes: 7 additions & 0 deletions Doc/whatsnew/3.15.rst
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,13 @@ http.client
(Contributed by Alexander Enrique Urieles Nieto in :gh:`131724`.)


http.cookies
------------

* Allow '``"``' double quotes in cookie values.
(Contributed by Nick Burns and Senthil Kumaran in :gh:`92936`.)


math
----

Expand Down
Loading