Skip to content
Open
Changes from 4 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]
(usually because their expiration time have passed)

You probably don't need to call this method because expired cookies are never
sent back to the server (provided you're using :class:`DefaultCookiePolicy`).
This method is called by :class:`CookieJar` itself every so often. It *could*
only be useful when you are customizing a :class:`CookiePolicy` with your own
expiring logic.

Note that the :meth:`save` method won't save expired cookies anyway (unless you ask

Check warning on line 264 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]
otherwise by passing a true *ignore_expires* argument).

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


Expand Down
Loading