[3.12] gh-101100: Fix Sphinx warning in library/http.cookies.rst (GH-112908) (#112929)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Fix Sphinx warning in library/http.cookies.rst (GH-112908)
This commit is contained in:
Miss Islington (bot) 2023-12-10 13:59:25 +01:00 committed by GitHub
parent 81c2df0f8b
commit 02fbe89342
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 20 deletions

View file

@ -18,16 +18,17 @@ cookie value.
The module formerly strictly applied the parsing rules described in the The module formerly strictly applied the parsing rules described in the
:rfc:`2109` and :rfc:`2068` specifications. It has since been discovered that :rfc:`2109` and :rfc:`2068` specifications. It has since been discovered that
MSIE 3.0x doesn't follow the character rules outlined in those specs and also MSIE 3.0x didn't follow the character rules outlined in those specs; many
many current day browsers and servers have relaxed parsing rules when comes to current-day browsers and servers have also relaxed parsing rules when it comes
Cookie handling. As a result, the parsing rules used are a bit less strict. to cookie handling. As a result, this module now uses parsing rules that are a
bit less strict than they once were.
The character set, :data:`string.ascii_letters`, :data:`string.digits` and The character set, :data:`string.ascii_letters`, :data:`string.digits` and
``!#$%&'*+-.^_`|~:`` denote the set of valid characters allowed by this module ``!#$%&'*+-.^_`|~:`` denote the set of valid characters allowed by this module
in Cookie name (as :attr:`~Morsel.key`). in a cookie name (as :attr:`~Morsel.key`).
.. versionchanged:: 3.3 .. versionchanged:: 3.3
Allowed ':' as a valid Cookie name character. Allowed ':' as a valid cookie name character.
.. note:: .. note::
@ -54,9 +55,10 @@ in Cookie name (as :attr:`~Morsel.key`).
.. class:: SimpleCookie([input]) .. class:: SimpleCookie([input])
This class derives from :class:`BaseCookie` and overrides :meth:`value_decode` This class derives from :class:`BaseCookie` and overrides :meth:`~BaseCookie.value_decode`
and :meth:`value_encode`. SimpleCookie supports strings as cookie values. and :meth:`~BaseCookie.value_encode`. :class:`!SimpleCookie` supports
When setting the value, SimpleCookie calls the builtin :func:`str()` to convert strings as cookie values. When setting the value, :class:`!SimpleCookie`
calls the builtin :func:`str` to convert
the value to a string. Values received from HTTP are kept as strings. the value to a string. Values received from HTTP are kept as strings.
.. seealso:: .. seealso::
@ -129,17 +131,17 @@ Morsel Objects
Abstract a key/value pair, which has some :rfc:`2109` attributes. Abstract a key/value pair, which has some :rfc:`2109` attributes.
Morsels are dictionary-like objects, whose set of keys is constant --- the valid Morsels are dictionary-like objects, whose set of keys is constant --- the valid
:rfc:`2109` attributes, which are :rfc:`2109` attributes, which are:
* ``expires`` .. attribute:: expires
* ``path`` path
* ``comment`` comment
* ``domain`` domain
* ``max-age`` max-age
* ``secure`` secure
* ``version`` version
* ``httponly`` httponly
* ``samesite`` samesite
The attribute :attr:`httponly` specifies that the cookie is only transferred The attribute :attr:`httponly` specifies that the cookie is only transferred
in HTTP requests, and is not accessible through JavaScript. This is intended in HTTP requests, and is not accessible through JavaScript. This is intended
@ -152,7 +154,7 @@ Morsel Objects
The keys are case-insensitive and their default value is ``''``. The keys are case-insensitive and their default value is ``''``.
.. versionchanged:: 3.5 .. versionchanged:: 3.5
:meth:`~Morsel.__eq__` now takes :attr:`~Morsel.key` and :attr:`~Morsel.value` :meth:`!__eq__` now takes :attr:`~Morsel.key` and :attr:`~Morsel.value`
into account. into account.
.. versionchanged:: 3.7 .. versionchanged:: 3.7

View file

@ -65,7 +65,6 @@ Doc/library/functools.rst
Doc/library/getopt.rst Doc/library/getopt.rst
Doc/library/http.client.rst Doc/library/http.client.rst
Doc/library/http.cookiejar.rst Doc/library/http.cookiejar.rst
Doc/library/http.cookies.rst
Doc/library/http.server.rst Doc/library/http.server.rst
Doc/library/importlib.rst Doc/library/importlib.rst
Doc/library/inspect.rst Doc/library/inspect.rst