@@ -18,16 +18,17 @@ cookie value.
1818
1919The module formerly strictly applied the parsing rules described in the
2020:rfc: `2109 ` and :rfc: `2068 ` specifications. It has since been discovered that
21- MSIE 3.0x doesn't follow the character rules outlined in those specs and also
22- many current day browsers and servers have relaxed parsing rules when comes to
23- Cookie handling. As a result, the parsing rules used are a bit less strict.
21+ MSIE 3.0x didn't follow the character rules outlined in those specs; many
22+ current-day browsers and servers have also relaxed parsing rules when it comes
23+ to cookie handling. As a result, this module now uses parsing rules that are a
24+ bit less strict than they once were.
2425
2526The character set, :data: `string.ascii_letters `, :data: `string.digits ` and
2627``!#$%&'*+-.^_`|~: `` denote the set of valid characters allowed by this module
27- in Cookie name (as :attr: `~Morsel.key `).
28+ in a cookie name (as :attr: `~Morsel.key `).
2829
2930.. versionchanged :: 3.3
30- Allowed ':' as a valid Cookie name character.
31+ Allowed ':' as a valid cookie name character.
3132
3233
3334.. note ::
@@ -54,9 +55,10 @@ in Cookie name (as :attr:`~Morsel.key`).
5455
5556.. class :: SimpleCookie([input])
5657
57- This class derives from :class: `BaseCookie ` and overrides :meth: `value_decode `
58- and :meth: `value_encode `. SimpleCookie supports strings as cookie values.
59- When setting the value, SimpleCookie calls the builtin :func: `str() ` to convert
58+ This class derives from :class: `BaseCookie ` and overrides :meth: `~BaseCookie.value_decode `
59+ and :meth: `~BaseCookie.value_encode `. :class: `!SimpleCookie ` supports
60+ strings as cookie values. When setting the value, :class: `!SimpleCookie `
61+ calls the builtin :func: `str ` to convert
6062 the value to a string. Values received from HTTP are kept as strings.
6163
6264.. seealso ::
@@ -129,17 +131,17 @@ Morsel Objects
129131 Abstract a key/value pair, which has some :rfc: `2109 ` attributes.
130132
131133 Morsels are dictionary-like objects, whose set of keys is constant --- the valid
132- :rfc: `2109 ` attributes, which are
133-
134- * `` expires ``
135- * `` path ``
136- * `` comment ``
137- * `` domain ``
138- * `` max-age ``
139- * `` secure ``
140- * `` version ``
141- * `` httponly ``
142- * `` samesite ``
134+ :rfc: `2109 ` attributes, which are:
135+
136+ .. attribute :: expires
137+ path
138+ comment
139+ domain
140+ max-age
141+ secure
142+ version
143+ httponly
144+ samesite
143145
144146 The attribute :attr: `httponly ` specifies that the cookie is only transferred
145147 in HTTP requests, and is not accessible through JavaScript. This is intended
@@ -152,7 +154,7 @@ Morsel Objects
152154 The keys are case-insensitive and their default value is ``'' ``.
153155
154156 .. versionchanged :: 3.5
155- :meth: `~Morsel. __eq__ ` now takes :attr: `~Morsel.key ` and :attr: `~Morsel.value `
157+ :meth: `! __eq__ ` now takes :attr: `~Morsel.key ` and :attr: `~Morsel.value `
156158 into account.
157159
158160 .. versionchanged :: 3.7
0 commit comments