Re: Worrying code in mod_python.publisher module importer.

2006-02-02 Thread Nicolas Lehuen
2006/2/2, Jim Gallacher <[EMAIL PROTECTED]>: > If we are going to do a 3.2.7, let's just do it. Either spend a couple > of days debating the merits of 3.2.7 or a couple of days *testing* it. :) > > My list for 3.2.7 > connection handler fix so it passes the unit tests I'll let you pros do that :

Re: Worrying code in mod_python.publisher module importer.

2006-02-02 Thread Jim Gallacher
Nicolas Lehuen wrote: We should also agree that if we do do a 3.2.7 what will be fixed in it and this time set a strict time frame on how long we let it be tested. Do we leave it at stat.ST_MTIME, or also add the connection handler fix as well if we are happy with that? Is a "b" designation neede

Re: Worrying code in mod_python.publisher module importer.

2006-02-02 Thread Graham Dumpleton
On 02/02/2006, at 5:54 PM, Nicolas Lehuen wrote: Having read your work on Vampire (and its module importing mechanism) I'm pretty sure it won't be long. The new importer is actually a complete rewrite and some things are done quite differently to what was done in Vampire. I have in effect rew

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Nicolas Lehuen
2006/2/2, Graham Dumpleton <[EMAIL PROTECTED]>: > Nicolas Lehuen wrote .. > > 2006/2/2, Graham Dumpleton <[EMAIL PROTECTED]>: > > > > The only > > > > problem is that apache.import_module is still as crappy as ever and > > > > that we don't have any grand unified theory of module importing that > >

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Graham Dumpleton
Nicolas Lehuen wrote .. > 2006/2/2, Graham Dumpleton <[EMAIL PROTECTED]>: > > > The only > > > problem is that apache.import_module is still as crappy as ever and > > > that we don't have any grand unified theory of module importing that > > > would support both handlers and published modules. > >

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Graham Dumpleton
Nicolas Lehuen wrote .. > OK, I've changed cache.py so that it uses stat() then open() the file > if it needs to be reloaded. I've also added a unit test that makes > sure the module cache is behaving as expected. > > Graham, I don't think the stat() / open() / fstat() sequence is > required. How

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Nicolas Lehuen
2006/2/2, Graham Dumpleton <[EMAIL PROTECTED]>: > > The only > > problem is that apache.import_module is still as crappy as ever and > > that we don't have any grand unified theory of module importing that > > would support both handlers and published modules. > > Actually I do believe I have a gra

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Nicolas Lehuen
OK, I've changed cache.py so that it uses stat() then open() the file if it needs to be reloaded. I've also added a unit test that makes sure the module cache is behaving as expected. Graham, I don't think the stat() / open() / fstat() sequence is required. How would that improve accuracy ? Regar

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Graham Dumpleton
Nicolas Lehuen wrote .. > 2006/2/2, Graham Dumpleton <[EMAIL PROTECTED]>: > > Note that up until now I hadn't even looked over how this new module > > importer was implemented. I knew it wasn't going to solve various of > the > > existing module importer problems and I knew it was actually going to

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Nicolas Lehuen
2006/2/2, Graham Dumpleton <[EMAIL PROTECTED]>: > Nicolas Lehuen wrote .. > > Well, I thought that if the file was modified, we needed to open it > > anyway, but you're right, that's optimising for a minority case. We > > might as well use stat and open the file only if it has changed. > > > > I've

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Graham Dumpleton
Nicolas Lehuen wrote .. > Well, I thought that if the file was modified, we needed to open it > anyway, but you're right, that's optimising for a minority case. We > might as well use stat and open the file only if it has changed. > > I've wrote an alternative publisher a few months ago that overl

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Graham Dumpleton
Graham Dumpleton wrote .. > Okay, false alarm (I think). Have got myself worked up over nothing. > I missed something very important: > > timestamp = fstat(opened.fileno())[-2] > > That is the '[-2]' in the above. > > I feel like a goose now. Now for some explaination of why my brain turned o

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Jim Gallacher
Graham Dumpleton wrote: Okay, false alarm (I think). Have got myself worked up over nothing. I missed something very important: timestamp = fstat(opened.fileno())[-2] That is the '[-2]' in the above. I feel like a goose now. You shouldn't as you've uncovered a potential bug. According the

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Nicolas Lehuen
2006/2/2, Graham Dumpleton <[EMAIL PROTECTED]>: > Note that up until now I hadn't even looked over how this new module > importer was implemented. I knew it wasn't going to solve various of the > existing module importer problems and I knew it was actually going to > introduce some new issues that

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Nicolas Lehuen
2006/2/2, Graham Dumpleton <[EMAIL PROTECTED]>: > Okay, false alarm (I think). Have got myself worked up over nothing. > I missed something very important: > > timestamp = fstat(opened.fileno())[-2] > > That is the '[-2]' in the above. > > I feel like a goose now. > > I still though question why

Re: Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Graham Dumpleton
Okay, false alarm (I think). Have got myself worked up over nothing. I missed something very important: timestamp = fstat(opened.fileno())[-2] That is the '[-2]' in the above. I feel like a goose now. I still though question why file/fstat is done and not stat/file though. Ie., why open the f