incubator-bloodhound-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olemis Lang <ole...@gmail.com>
Subject Re: svn commit: r1453323 - in /incubator/bloodhound/branches/bep_0003_multiproduct: bloodhound_multiproduct/multiproduct/env.py bloodhound_multiproduct/multiproduct/hooks.py bloodhound_multiproduct/multiproduct/util.py bloodhound_theme/bhtheme/theme.py
Date Wed, 06 Mar 2013 23:32:42 GMT
On 3/6/13, Olemis Lang <olemis@gmail.com> wrote:
> On 3/6/13, jure@apache.org <jure@apache.org> wrote:
>> Author: jure
>> Date: Wed Mar  6 13:21:15 2013
>> New Revision: 1453323
>>
>> URL: http://svn.apache.org/r1453323
>> Log:
>> Product environment factory + simple LRU cache
>>
> [...]
>>
>> +import collections
>>
> [...]
>>
>> +def lru_cache(maxsize=100):
>> +    """Simple LRU cache decorator, using `collections.OrderedDict` for
>> +    item store
>> +    """
>> +    def wrap(f):
>> +        cache = collections.OrderedDict()
> [...]
>
> This won't work with Python 2.6
> :'(
>
> I suggest to use one of these , which seems to work on BH supported Py
> versions
>
> http://code.activestate.com/recipes/498245-lru-and-lfu-cache-decorators/
[...]

In the meantime I'll be working with this patch
https://issues.apache.org/bloodhound/attachment/ticket/390/t390_r1453384_lru_cache_py26.diff

-- 
Regards,

Olemis.

Mime
View raw message