diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-18 10:59:57 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-03-18 10:59:57 +0200 |
commit | 64b8a3c1aad670fa171f93216000925daf6c8ff9 (patch) | |
tree | 32e65bfb6939ade668ff0bdf001097f3f9846c7e /Doc/library/http.cookies.rst | |
parent | e7b5001ed33fe493f015152540870322b5dbc14f (diff) | |
download | cpython-64b8a3c1aad670fa171f93216000925daf6c8ff9.tar.gz |
Issue #2211: Updated the implementation of the http.cookies.Morsel class.
Setting attributes key, value and coded_value directly now is deprecated.
update() and setdefault() now transform and check keys. Comparing for
equality now takes into account attributes key, value and coded_value.
copy() now returns a Morsel, not a dict. repr() now contains all attributes.
Optimized checking keys and quoting values. Added new tests.
Original patch by Demian Brecht.
Diffstat (limited to 'Doc/library/http.cookies.rst')
-rw-r--r-- | Doc/library/http.cookies.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/library/http.cookies.rst b/Doc/library/http.cookies.rst index 646f2e8860..46c3bbd9d9 100644 --- a/Doc/library/http.cookies.rst +++ b/Doc/library/http.cookies.rst @@ -148,16 +148,28 @@ Morsel Objects The value of the cookie. + .. deprecated:: 3.5 + Setting :attr:`~Morsel.value` directly has been deprecated in favour of + using :func:`~Morsel.set` + .. attribute:: Morsel.coded_value The encoded value of the cookie --- this is what should be sent. + .. deprecated:: 3.5 + Setting :attr:`~Morsel.coded_value` directly has been deprecated in + favour of using :func:`~Morsel.set` + .. attribute:: Morsel.key The name of the cookie. + .. deprecated:: 3.5 + Setting :attr:`~Morsel.key` directly has been deprecated in + favour of using :func:`~Morsel.set` + .. method:: Morsel.set(key, value, coded_value) |