bbangert / beaker

WSGI middleware for sessions and caching
https://beaker.readthedocs.org/
Other
517 stars 147 forks source link

beaker.session class documentation wrong about cookie_expires (expiration of the session cookie) #240

Open Chealer opened 3 months ago

Chealer commented 3 months ago

The documentation of session.beaker specifies its cookie_expires parameter as follows:

Expiration date for cookie

Just looking at the defaults suffices to see this is incorrect. In reality, the value can also be a boolean (false or true) or a duration. The code of _set_cookie_expires() confirms the above definition is highly misleading.

Moreover, there is no explanation of how cookie_expires relates to timeout.

Ticket #116 tracks that even the Configuration documentation page is incomplete on the topic, and ticket #31 tracks that it is wrong.