aio-libs / aio-libs/aiohttp-session

Documentation for `Session.created` does not match actual behavior

未关闭
#981 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
245
派生
91
平均合并
2 分钟
30 天内合并 PR
4

描述

The [documentation for `Session.created`](https://aiohttp-session.readthedocs.io/en/stable/reference.html#aiohttp_session.Session.created) states that this field represents "Creation UNIX TIMESTAMP, the value returned by `time.time()` for very first access to the session object."

This appears to be incorrect. In practice, `Session.created` seems to contain the timestamp of the last time the session data was changed. There is also some inconsistency to this. In particular, `Session.created` is only updated if you change the session by explicitly setting or deleting a value. Calling `Session.changed()` or `Session.invalidate()` does not update `Session.created`, even though these methods also change the session.

What is the intended behavior of `Session.created`? Please update the documentation and/or code so that the documented and actual behavior match.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。