Author xiang.zhang
Recipients kaniini, serhiy.storchaka, xiang.zhang
Date 2016-06-10.14:05:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465567511.47.0.925590158024.issue27275@psf.upfronthosting.co.za>
In-reply-to
Content
I think your expiringdict seems not work with the C version OrderedDict, you may need to change your implementation or clarify that :(.

The C version's OrderedDict.popitem may call your __getitem__ which then does deletion and emit KeyError when expires. I think the new OrderedDict may call your __getitem__ even in iteration which leads to the 'RuntimeError: OrderedDict mutated during iteration'. I haven't checked that.

So a simple working example in Py3.4:

d = ExpiringDict(max_len=3, max_age_seconds=0.01)
d['a'] = 'z'
sleep(1)
d.popitem()

will fail in Py3.5+.
History
Date User Action Args
2016-06-10 14:05:11xiang.zhangsetrecipients: + xiang.zhang, serhiy.storchaka, kaniini
2016-06-10 14:05:11xiang.zhangsetmessageid: <1465567511.47.0.925590158024.issue27275@psf.upfronthosting.co.za>
2016-06-10 14:05:11xiang.zhanglinkissue27275 messages
2016-06-10 14:05:11xiang.zhangcreate