You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-dev@quetz.apache.org by "Gregory (Grisha) Trubetskoy" <gr...@apache.org> on 2003/01/23 05:25:33 UTC

3.0.2 ?

I think I've got all the problems reported so far fixed, there is more
details in the NEWS file, plus we have a distutils based windows
installer.

Anyone have any objections to tagging what's currently there 3.0.2?

Grisha


Re: 3.0.2 ?

Posted by Justin Erenkrantz <je...@apache.org>.
--On Wednesday, January 22, 2003 23:25:33 -0500 "Gregory (Grisha) 
Trubetskoy" <gr...@apache.org> wrote:

> I think I've got all the problems reported so far fixed, there is more
> details in the NEWS file, plus we have a distutils based windows
> installer.
>
> Anyone have any objections to tagging what's currently there 3.0.2?

Nope.

The only thing is that this time I'd like to ensure that there are 3 +1s on 
this list for a release (after you post a suitable release candidate). 
Since there are only three committers, I'd be satisfied if we just get 3 
recorded +1s.

This sort of follows the HTTP Server guidelines:

http://httpd.apache.org/dev/release.html

Not all of it applies to mod_python, but it gives you a general idea of the 
policies.  If you have any questions, please holler.

And, I'd also like to see you point at our mirrors in the 
announcements/website rather than directly at /dist/httpd/.  =)  -- justin

Re: 3.0.2 has been tagged

Posted by Geert Jansen <ge...@boskant.nl>.
On Thu, Feb 27, 2003 at 11:51:47PM -0500, Gregory (Grisha) Trubetskoy wrote:
> 
> I've tagged what we have release-3-0-2. Please test it out and let me
> know. The simples way to do this is the usual ./configure ; make ; make
> install, then cd into test subdirectory and do "python test.py".

Hi Grisha,

I have been busy lately but tomorrow I'll check it out and see how it goes
with Draco. I'm getting lots of request of people that want to use it
with Apachew/mod_python3.

Greetings,
Geert

Re: 3.0.2 has been tagged

Posted by Geert Jansen <ge...@boskant.nl>.
On Sat, Mar 01, 2003 at 11:37:58PM -0500, Gregory (Grisha) Trubetskoy wrote:

Hi Grisha,

> I'll have to take a closer look at this, but in the context of 3.0.2
> release - I don't think this bug (if it is a bug) is a show stopper? Any
> opinions?

the bug is rather serious IMHO because it basically prevents you from using an
access handler... This is a rather large restriction.

Were you able to reproduce this bug using the configuration I included?

Greetings,
Geert

Re: 3.0.2 has been tagged

Posted by "Gregory (Grisha) Trubetskoy" <gr...@apache.org>.
I'll have to take a closer look at this, but in the context of 3.0.2
release - I don't think this bug (if it is a bug) is a show stopper? Any
opinions?

Grisha

On Sat, 1 Mar 2003, Geert Jansen wrote:

> On Thu, Feb 27, 2003 at 11:51:47PM -0500, Gregory (Grisha) Trubetskoy wrote:
> >
> > I've tagged what we have release-3-0-2. Please test it out and let me
> > know. The simples way to do this is the usual ./configure ; make ; make
> > install, then cd into test subdirectory and do "python test.py".
>
> Hi Grisha,
>
> I just checked out 3.0.2 and is now almost works with Draco! There is one
> problem left: sometimes, headers that I set don't show up in the response. I
> investigated the problem further, and it seems that this only happens in the
> combination of the following circumstances:
>
> 1. The URL requested is a directory, which is mapped to a file using the
>    DirectoryIndex directive.
> 2. There is a PythonAccessHandler directive defined for the URL. It doesn't
>    seem to matter if the handler file actually defines a handler function.
>
> This is my configuration:
>
>   <Directory /home/www/test>
>     AddHandler python-program .py
>     PythonHandler mptest
>     PythonAccessHandler mptest
>     DirectoryIndex mptest.py
>   </Directory>
>
> This is my mptest.py program:
>
>   from mod_python import apache
>
>   def handler(req):
>       req.headers_out.add('Set-Cookie', 'blaat=test')
>       req.write('Hello, world!\n')
>       return apache.OK
>
> This shows that the Set-Cookie header is not part of the response:
>
>   geertj@cristina:~$ telnet cristina 8080
>   Trying 192.168.2.16...
>   Connected to cristina.
>   Escape character is '^]'.
>   GET / HTTP/1.0
>
>   HTTP/1.1 200 OK
>   Date: Sat, 01 Mar 2003 12:10:54 GMT
>   Server: Apache/2.0.44 (Unix) mod_ssl/2.0.44 OpenSSL/0.9.6g mod_python/3.0.2 Python/2.2.2
>   Connection: close
>   Content-Type: text/plain
>
>   Hello, world!
>   Connection closed by foreign host.
>
> I'll try to see if I can find the error. I thought I'd let you know of my
> findings asap so we can stilll fix this before 3.0.2.
>
> Greetings,
> Geert Jansen
>


Re: 3.0.2 has been tagged

Posted by Geert Jansen <ge...@boskant.nl>.
On Thu, Feb 27, 2003 at 11:51:47PM -0500, Gregory (Grisha) Trubetskoy wrote:
> 
> I've tagged what we have release-3-0-2. Please test it out and let me
> know. The simples way to do this is the usual ./configure ; make ; make
> install, then cd into test subdirectory and do "python test.py".

Hi Grisha,

I just checked out 3.0.2 and is now almost works with Draco! There is one
problem left: sometimes, headers that I set don't show up in the response. I
investigated the problem further, and it seems that this only happens in the
combination of the following circumstances:

1. The URL requested is a directory, which is mapped to a file using the
   DirectoryIndex directive.
2. There is a PythonAccessHandler directive defined for the URL. It doesn't
   seem to matter if the handler file actually defines a handler function.

This is my configuration:

  <Directory /home/www/test>
    AddHandler python-program .py
    PythonHandler mptest
    PythonAccessHandler mptest
    DirectoryIndex mptest.py
  </Directory>

This is my mptest.py program:

  from mod_python import apache

  def handler(req):
      req.headers_out.add('Set-Cookie', 'blaat=test')
      req.write('Hello, world!\n')
      return apache.OK

This shows that the Set-Cookie header is not part of the response:

  geertj@cristina:~$ telnet cristina 8080
  Trying 192.168.2.16...
  Connected to cristina.
  Escape character is '^]'.
  GET / HTTP/1.0

  HTTP/1.1 200 OK
  Date: Sat, 01 Mar 2003 12:10:54 GMT
  Server: Apache/2.0.44 (Unix) mod_ssl/2.0.44 OpenSSL/0.9.6g mod_python/3.0.2 Python/2.2.2
  Connection: close
  Content-Type: text/plain

  Hello, world!
  Connection closed by foreign host.

I'll try to see if I can find the error. I thought I'd let you know of my
findings asap so we can stilll fix this before 3.0.2.

Greetings,
Geert Jansen

3.0.2 has been tagged

Posted by "Gregory (Grisha) Trubetskoy" <gr...@apache.org>.
I've tagged what we have release-3-0-2. Please test it out and let me
know. The simples way to do this is the usual ./configure ; make ; make
install, then cd into test subdirectory and do "python test.py".

Grisha


Re: 3.0.2 ?

Posted by Geert Jansen <ge...@boskant.nl>.
On Sat, Jan 25, 2003 at 11:40:54PM -0500, Gregory (Grisha) Trubetskoy wrote:

Hi Grisha,

> > - server.port is always 0
> 
> This is because it really is 0 in the underlying C structure. I'm not sure
> why, but I added a note in the docs that connection.local_addr will give
> you the port number if you need it.

Ok, I see.

> > - `None' is inserted in sys.path. This break a lot of code from the standard
> >   library.
> 
> Could you elaborate on this one? I don't remember it for whatever reason.

I investigated the problem a bit more and it seems to occur only when a
Python*Handler directive is given outside a <Directory> context, e.g.
directly inside a <VirtualHost>. I figured it should be possible to import
global python modules this way. The mod_python docs seem to allow this.

I put the code fragment below in a global python module name "mptest.py":

import sys
from mod_python import apache

def handler(req):
    req.write('PATH: %s' % repr(sys.path))
    return apache.OK

And then I put a directive "PythonHandler mptest" in the <VirtualHost>
section of my apache config. The output is:

PATH: [None, '/usr/local/lib/python2.2',
'/usr/local/lib/python2.2/plat-linux2','/usr/local/lib/python2.2/lib-tk',
'/usr/local/lib/python2.2/lib-dynload',
'/usr/local/lib/python2.2/site-packages',
'/usr/local/lib/python2.2/site-packages/numarray']

When I put the "PythonHandler" mptest in a <Directory> context, and put the
file "mptest.py" in that directory, the problem does not occur. The output
is:

PATH: ['/home/www/test/', '/usr/local/lib/python2.2',
'/usr/local/lib/python2.2/plat-linux2', '/usr /local/lib/python2.2/lib-tk',
'/usr/local/lib/python2.2/lib-dynload',
'/usr/local/lib/python2.2/site-packages',
'/usr/local/lib/python2.2/site-packages/numarray']

I hope this will help you track down the problem.

Greetings,
Geert Jansen

Re: 3.0.2 ?

Posted by "Gregory (Grisha) Trubetskoy" <gr...@apache.org>.
On Sat, 25 Jan 2003, Geert Jansen wrote:

> - request.headers_out doesn't seem to work. Headers added to this table never
>   make it into the request.

I added a test to the test suite, and it seems to work fine, I can see the
headers in the output.

Are you sure that there is no error? (If there is an error, i.e. your
handler returns something other than apache.OK, then the
req.err_headers_out are used instead of req.headers_out)

And, of course, make sure that you change the table before the first byte
of output has been written.

Grisha


Re: 3.0.2 ?

Posted by "Gregory (Grisha) Trubetskoy" <gr...@apache.org>.
On Sat, 25 Jan 2003, Geert Jansen wrote:

> I just checked the current CVS version and there are still some bugs left:
>
> - server.port is always 0

This is because it really is 0 in the underlying C structure. I'm not sure
why, but I added a note in the docs that connection.local_addr will give
you the port number if you need it.

> - `None' is inserted in sys.path. This break a lot of code from the standard
>   library.

Could you elaborate on this one? I don't remember it for whatever reason.

> - request.headers_out doesn't seem to work. Headers added to this table never
>   make it into the request.

Interesting, I'll have to test this.

Grisha


Re: 3.0.2 ?

Posted by Geert Jansen <ge...@boskant.nl>.
On Wed, Jan 22, 2003 at 11:25:33PM -0500, Gregory (Grisha) Trubetskoy wrote:
> 
> I think I've got all the problems reported so far fixed, there is more
> details in the NEWS file, plus we have a distutils based windows
> installer.
> 
> Anyone have any objections to tagging what's currently there 3.0.2?

I just checked the current CVS version and there are still some bugs left:

- server.port is always 0
- `None' is inserted in sys.path. This break a lot of code from the standard
  library.
- request.headers_out doesn't seem to work. Headers added to this table never
  make it into the request.

Greetings,
Geert Jansen