[spambayes-dev] Using reload() with modules from zips (Was More CVSbranch/tags questions)

Tony Meyer tameyer at ihug.co.nz
Mon Dec 8 03:17:29 EST 2003


[Tony]
> Looks to me like reload() doesn't work with module from 
> zip's, which I presume it should.

[Mark]
> I agree this is a bug.  While .zip files are generally 
> logically "readonly", there is no reason that a .zip file 
> could not be updated dynamically while an app is running.

At the least a more accurate ("can't reload from zip") message would be
good, I would think.  I'll submit this as a bug for Python.

> I'm not so sure it will see quick attention though, so we 
> should consider handling this in our code.

I'm not sure that it deserves quick attention either, since I don't imagine
this is a high use feature.

> I'm also not sure exactly *why* we are doing a reload - 
> saving user options should not require us to reload the 
> Options module, and I'm fairly sure no code exists that 
> updates the .zip with a new Options file even if it did :)

I *think* (before my time, IIRC) the reason is to generate a new
Options.options object, that has all the new values.  I had figured that the
correct behaviour for us would be to remove the reload and explicitly
recreate/update the options object.

=Tony Meyer




More information about the spambayes-dev mailing list