Skip to content
Open
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
17 changes: 17 additions & 0 deletions Doc/library/http.cookiejar.rst
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,26 @@
or an explicit ``discard`` cookie-attribute). For interactive browsers, the end
of a session usually corresponds to closing the browser window.

Note that the :meth:`save` method won't save session cookies anyway, unless you

Check warning on line 247 in Doc/library/http.cookiejar.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:meth reference target not found: save [ref.meth]
ask otherwise by passing a true *ignore_discard* argument.


.. method:: CookieJar.clear_expired_cookies()

Discard all expired cookies.

Discards all contained cookies that have a true :attr:`expires` attribute.

Check warning on line 255 in Doc/library/http.cookiejar.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:attr reference target not found: expires [ref.attr]

This is a low-level function which usually does not need to be called

Check warning on line 257 in Doc/library/http.cookiejar.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

py:meth reference target not found: save [ref.meth]
since expired cookies are never sent back to the server when using
:class:`DefaultCookiePolicy` nor are they saved by :meth:`save` unless
the latter is called with a truthy *ignore_expires*.

Since :class:`CookieJar` also calls this method every so often,
it *could* only be useful when customizing a :class:`CookiePolicy`
with an expiring logic.


:class:`FileCookieJar` implements the following additional methods:


Expand Down
Loading