Damn, missed the change for the if statement, somehow I undid the change before
commit and push.

Sorry, probably not worth another commit, is it?

Darren.

On 11/ 4/10 09:30 PM, Alok Aggarwal wrote:
> Hi Darren,
> 
> I just have a couple of nits:
> 
> cache.py: 293: Can be changed to -
> 
> if 0 < priority < 100:
> 
> __init__.py: 114: s/picke/pickle
> 
> Looks fine otherwise, thanks for making this
> change.
> 
> Alok
> 
> On Wed, 3 Nov 2010, Darren Kenny wrote:
> 
>> Hi,
>>
>> I'd like to request a review for the addition of support for the passing of
>> modules to the DataObjectCache.register_class() method.
>>
>> The explanation is a little long, but I promise the code changes aren't huge 
>> ;)
>>
>> If a module is found in the parameters to register_class, then I use the
>> 'inspect' module (thanks Drew) to fetch the classes in it, and then I do a
>> recursive call to the register_class() method with these classes.
>>
>> I also discovered that in fetching of the classes, I was getting classes that
>> were imported (e.g. DataObject) which I shouldn't be registering, so I check
>> that any class to register is actually coming from the module I was asked to 
>> check.
>>
>> Matt also noticed an issue with the logging where the log messages weren't 
>> being
>> logged where expected, so I've provided a DataObjectBase.get_logger() class
>> method and DataObjectBase.logger property for easy access, so I'm also 
>> including
>> the fix for this. Keith also mentioned this in my original CR, but looks 
>> like I
>> was misunderstanding how the Python logging worked.
>>
>> I had to implement the logging using class variables since it's desirable to 
>> log
>> from class methods (can_handle, from_xml, etc.) but also because pickle 
>> didn't
>> like if I tried to pickle anything using an instance variable to store the
>> reference too.
>>
>> The webrev can be found at:
>>
>>      http://cr.opensolaris.org/~dkenny/fix.6996768.slim/
>>
>> I ran the PyUnit tests for slim, to confirm that things are still working and
>> that I've not broken anything.
>>
>> Thanks,
>>
>> Darren.
>> _______________________________________________
>> caiman-discuss mailing list
>> [email protected]
>> http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
>>
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss

Reply via email to