diff options
author | 2020-05-24 11:42:33 +0200 | |
---|---|---|
committer | 2020-05-24 11:42:33 +0200 | |
commit | b2009d5304beba4829b7727ca154bb6a0d1cd50a (patch) | |
tree | 5e08648ade4f01db9280e8413d50592388eba3ed /tests/helpers.py | |
parent | Better RuntimeErrors. (diff) |
Make .items return ItemsView instead of AsyncIter
There really was no compelling reason why this method should return an
AsyncIterator or than that `async for items in cache.items()` has nice
readability, but there were a few concerns. One is a concern about race
conditions raised by @SebastiaanZ, and @MarkKoz raised a concern that it
was misleading to have an AsyncIterator that only "pretended" to be
lazy.
To address these concerns, I've refactored it to return a regular
ItemsView instead.
I also improved the docstring, and fixed the relevant tests.
Diffstat (limited to 'tests/helpers.py')
0 files changed, 0 insertions, 0 deletions