aio-libs / aio-libs/aiohttp-session

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

Đang mở
#981 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
245
Fork
91
Merge trung bình
2 phút
Pull request đã merge (30 ngày)
4

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.