Python 2.2 support

2006-02-01 Thread Nicolas Lehuen
Hi, I've just checked in some changes to the Python source code in order to support Python 2.2. Now the test suite runs successfully on Python 2.2.3 on Windows 2000. I've checked that no regressions were introduced in later Python versions, too. The changes are pretty simple : each Python module

Re: 3.2.6 test period - how long do we wait?

2006-02-01 Thread Deron Meranda
+1 Release what's fixed already, and then keep going afterwards. But can somebody address MODPYTHON-53 please. (updating modpython.org website). -- Deron Meranda

Re: mod_python as a mod_dav backend

2006-02-01 Thread Deron Meranda
Actually it seems that this is yet another case of trying to get mod_python to hook into more places in the Apache framework; specifically to hook into other modules. We've already been discussing specific-module hooks for mod_ssl - http://issues.apache.org/jira/browse/MODPYTHON-94 mod_inclu

Re: 3.2.6 test period - how long do we wait?

2006-02-01 Thread Gregory (Grisha) Trubetskoy
I'd give a conditional +1 - I think it'd be good to sort out why previous releases passed on FreeBSD and this one does not. Perhaps people who ran FreeBSD tests could try an earlier mod_python version test to see if it too fails? Grisha On Tue, 31 Jan 2006, Jim Gallacher wrote: Good enoug

Re: mod_python as a mod_dav backend

2006-02-01 Thread Graham Dumpleton
On 02/02/2006, at 6:52 AM, Deron Meranda wrote: Actually it seems that this is yet another case of trying to get mod_python to hook into more places in the Apache framework; specifically to hook into other modules. We've already been discussing specific-module hooks for mod_ssl - http://iss

Re: Python 2.2 support

2006-02-01 Thread Graham Dumpleton
Again this is a resend. I post one message via my secure SMTP and it vanishes. Post one via normal SMTP and it goes to list straight away. This sort of confirms what I suspected which is that my ISPs secure SMTP is busted somehow in that randomly drops email. :-( Sorry for the duplicate if first

Re: Python 2.2 support

2006-02-01 Thread Jamie Bliss
On 2/1/06, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Sorry to be the release Nazi, but this really is starting to drag on. > The > Python 2.2 backward compatibility changes could have been documented > in JIRA and people referred to that if they really wanted to make 3.2.6 > work with that vers

Re: Python 2.2 support

2006-02-01 Thread Jim Gallacher
Graham Dumpleton wrote: On 01/02/2006, at 9:10 PM, Nicolas Lehuen wrote: Hi, I've just checked in some changes to the Python source code in order to support Python 2.2. Now the test suite runs successfully on Python 2.2.3 on Windows 2000. I've checked that no regressions were introduced in lat

Re: Python 2.2 support

2006-02-01 Thread Daniel J. Popowich
Nicolas Lehuen writes: > I've just checked in some changes to the Python source code in order > to support Python 2.2. Now the test suite runs successfully on Python > 2.2.3 on Windows 2000. I've checked that no regressions were > introduced in later Python versions, too. > > The changes are pret

Worrying code in mod_python.publisher module importer.

2006-02-01 Thread Graham Dumpleton
I was looking at the new module importer used by mod_python.publisher in 3.2.6 to see whether it reloaded a module if file was replaced with an older file and have come across some code that worries me a bit. Can someone else (not just Nicolas) check this code and how it is used in the context of t

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

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 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 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 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: Python 2.2 support

2006-02-01 Thread Nicolas Lehuen
Quick response, because it's 4:36 AM here, I just woke up to feed my daughter and took all this flak, but I need to sleep :). I guess that's the problem of having a round-the-planet development team, between those in America, Europe, Asia and Australia (nobody from Antarctica yet ?) Graham : Consi

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: Python 2.2 support

2006-02-01 Thread Jim Gallacher
Daniel J. Popowich wrote: Nicolas Lehuen writes: I've just checked in some changes to the Python source code in order to support Python 2.2. Now the test suite runs successfully on Python 2.2.3 on Windows 2000. I've checked that no regressions were introduced in later Python versions, too. The

Re: Python 2.2 support

2006-02-01 Thread Nicolas Lehuen
2006/2/2, Jim Gallacher <[EMAIL PROTECTED]>: > > If a formal decision was made, then it's a done deal, right? If not > > and uses of 2.3 have slipped in then perhaps it's a done deal anyway > > because no one can stomach the thought of taking out the 2.3-isms at > > this late date. > > My impressi

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 .. > 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
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 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 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: Python 2.2 support

2006-02-01 Thread Nicolas Lehuen
OK, I've reverted my changes. I left python22.py in place, because I still hope to be able to use it with PythonImport. The only problem is being able to define it in the unit tests. Regards, Nicolas 2006/2/2, Nicolas Lehuen <[EMAIL PROTECTED]>: > 2006/2/2, Jim Gallacher <[EMAIL PROTECTED]>: > >

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: Python 2.2 support

2006-02-01 Thread Graham Dumpleton
Nicolas Lehuen wrote .. > OK, I've reverted my changes. I left python22.py in place, because I > still hope to be able to use it with PythonImport. The only problem is > being able to define it in the unit tests. I plead dumb. What is the connection to PythonImport? My only guess at the moment is

Re: Python 2.2 support

2006-02-01 Thread Nicolas Lehuen
2006/2/2, Graham Dumpleton <[EMAIL PROTECTED]>: > Nicolas Lehuen wrote .. > > OK, I've reverted my changes. I left python22.py in place, because I > > still hope to be able to use it with PythonImport. The only problem is > > being able to define it in the unit tests. > > I plead dumb. What is the

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: Python 2.2 support

2006-02-01 Thread Graham Dumpleton
On 02/02/2006, at 5:42 PM, Nicolas Lehuen wrote: That's it ! People with Python 2.2 could use "PythonImport mod_python.python22 INTERPRETER_NAME" in their configuration file to make sure mod_python supports Python 2.2. The only problem is the need to provide an interpreter name, which complicat