-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LRU .values() and dict return old entries #348
Comments
Hey Bruno! Good to see you here again. Thanks for the kind words and detailed report. I confirmed I'm seeing the same behavior. I never really had that usage pattern IRL, but I think it's a great one to support. I've got a fix on a branch that makes it work. I just pushed to #349. Still need to think about it a bit, but feel free to take a look! |
* test and fix for #348 * quick fix for py27 ci * another shot at a quick py27 ci fix * caching doesn't work oob in containers, another 2.7 ci fix * Also test LRI overwriting Co-authored-by: Bruno Oliveira <[email protected]> --------- Co-authored-by: Bruno Oliveira <[email protected]>
Fix is now up in 23.1.0. Thanks again for the report/review! |
Awesome, thanks! |
Hi,
First of all thanks for the excellent library!
I'm seeing strange results when using
LRU
: after replacing an existing entry with a new value, seems like thekeys()
andvalues()
methods return the old value, instead of the new one. Using__getitem__
and.get
we have the expected behavior.Here is a test showing this behavior:
This test fails in the last asserts (of course to see the 2nd failure one needs to comment the first):
At first it seems like a bug? Or perhaps this usage is not meant to be supported?
The text was updated successfully, but these errors were encountered: