Apache Mod-Python - mod_python 3.2.1b available for testing

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > September 2005 > mod_python 3.2.1b available for testing





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author mod_python 3.2.1b available for testing
Jim Gallacher

2005-09-07, 5:46 pm

A new mod_python 3.2 beta tarball is now available for testing. A
Windows binary for Python 2.4 is also provided.

Here are the rules:

In order for a file to be officially announced, it has to be tested by
developers on the dev list. Anyone subscribed to this list can (and
should feel obligated to :-) ) test it, and provide feedback *to _this_
list*! (Not the mod_python@modpython.org list, and preferably not me
personally).

The files are (temporarily) available here:

http://www.modpython.org/dist/

Please download it, then do the usual

$ ./configure --with-apxs=/wherever/it/is
$ make
$ (su)
# make install

Then (as non-root user!)

$ cd test
$ Python test.py

And see if any tests fail. If they pass, send a +1 to the list, if they
fail, send the details (the versions of OS, Python and Apache, the test
output, and suggestions, if any).

Thank you,
Jim Gallacher



Robert Sanderson

2005-09-07, 5:46 pm


+1

test.py completed without errors.

Rob

>Please download it, then do the usual [...]
>$ Python test.py
>And see if any tests fail. If they pass, send a +1 to the list, if they
>fail, send the details (the versions of OS, Python and Apache, the test
>output, and suggestions, if any).


Jorey Bump

2005-09-07, 5:46 pm

Jim Gallacher wrote:
> A new mod_python 3.2 beta tarball is now available for testing. A
> Windows binary for Python 2.4 is also provided.


> Please download it, then do the usual
>
> $ ./configure --with-apxs=/wherever/it/is
> $ make
> $ (su)
> # make install
>
> Then (as non-root user!)
>
> $ cd test
> $ Python test.py
>
> And see if any tests fail. If they pass, send a +1 to the list, if they
> fail, send the details (the versions of OS, Python and Apache, the test
> output, and suggestions, if any).


-1

Slackware Linux 10.1
Python 2.4.1
Apache 2.1.6 Alpha

To fix:

Before running ./config, remove this from src/filterobject.c:

if (!APR_STATUS_IS_EAGAIN(self->rc) && !APR_STATUS_IS_SUCCESS(self->rc)) {
PyErr_SetObject(PyExc_IOError,
PyString_FromString("Input filter read error"));
return NULL;
}

And remove this from src/connobject.c:

if (! APR_STATUS_IS_SUCCESS(rc)) {
PyErr_SetObject(PyExc_IOError,
PyString_FromString("Connection read error"));
return NULL;
}

Then configure/make/make install/test:

-1

Modify test.py for Apache 2.1.6-alpha, which has replaced mod_auth with
mod_auth_basic:

IfModule("!mod_auth_basic.c",
LoadModule("auth_basic_module %s" %
quoteIfSpace(os.path.join(modpath, "mod_auth_basic.so")))))

Run test.py again:

-1

Now all tests fail with socket error (111, 'Connection refused'). Since
the errors are consistent, this might be an easy fix, I just haven't
figured out the problem, yet.

Anyway, starting Apache normally loads mod_python fine, and I can run a
simple "Hello, World!" module using Publisher.

I know Apache 2.1.6-alpha is still a moving target, but hopefully this
will indicate some potential problems with the forthcoming Apache 2.2.x
stable branch that can be fixed now, such as the (deprecated?)
APR_STATUS_IS_SUCCESS references.


Gregory (Grisha) Trubetskoy

2005-09-07, 5:47 pm





On Wed, 7 Sep 2005, Jorey Bump wrote:

> -1
>
> Slackware Linux 10.1
> Python 2.4.1
> Apache 2.1.6 Alpha


I don't think we mean to support 2.1.6 alpha, so this doesn't count. :-)

Grisha

Nicolas Lehuen

2005-09-07, 5:47 pm

Hi,

Could we focus on Apache 2.0 for the 3.2 release ? Put 2.1 on the
agenda for a later release (why not 3.3 ?).

For the moment I don't see any quick and easy way to support both 2.0
and 2.1, from what you wrote. I'd rather we try to get 3.2 out with a
proper 2.0 support, and try to fix things for 2.1 when it goes at
least beta.

Regards,
Nicolas.

2005/9/7, Jorey Bump <list@joreybump.com>:
> Jim Gallacher wrote:
>=20
>=20
> -1
>=20
> Slackware Linux 10.1
> Python 2.4.1
> Apache 2.1.6 Alpha
>=20
> To fix:
>=20
> Before running ./config, remove this from src/filterobject.c:
>=20
> if (!APR_STATUS_IS_EAGAIN(self->rc) && !APR_STATUS_IS_SUCCESS(self->rc)) =

{
> PyErr_SetObject(PyExc_IOError,
> PyString_FromString("Input filter read error"));
> return NULL;
> }
>=20
> And remove this from src/connobject.c:
>=20
> if (! APR_STATUS_IS_SUCCESS(rc)) {
> PyErr_SetObject(PyExc_IOError,
> PyString_FromString("Connection read error"));
> return NULL;
> }
>=20
> Then configure/make/make install/test:
>=20
> -1
>=20
> Modify test.py for Apache 2.1.6-alpha, which has replaced mod_auth with
> mod_auth_basic:
>=20
> IfModule("!mod_auth_basic.c",
> LoadModule("auth_basic_module %s" %
> quoteIfSpace(os.path.join(modpath, "mod_auth_basic.so")))))
>=20
> Run test.py again:
>=20
> -1
>=20
> Now all tests fail with socket error (111, 'Connection refused'). Since
> the errors are consistent, this might be an easy fix, I just haven't
> figured out the problem, yet.
>=20
> Anyway, starting Apache normally loads mod_python fine, and I can run a
> simple "Hello, World!" module using Publisher.
>=20
> I know Apache 2.1.6-alpha is still a moving target, but hopefully this
> will indicate some potential problems with the forthcoming Apache 2.2.x
> stable branch that can be fixed now, such as the (deprecated?)
> APR_STATUS_IS_SUCCESS references.
>=20
>


Ron Reisor

2005-09-07, 5:47 pm

+1

MacOSX 10.4.2
gcc-4.0.0 (Apple build)
Python 2.4.1
Apache 2.0.54

cheers,

Ron


Ron Reisor <ron@udel.edu> (RWR3)
University of Delaware Information Technologies/Network and Systems Services
Computing Center/192 South Chapel Street/Newark DE, 19716
pgp finger print: 0D 73 06 6F D3 6A 99 D3 F5 D5 6E FF 3B B9 7C 2C

Nicolas Lehuen

2005-09-07, 5:47 pm

Wow, that's a nice one .

2005/9/7, Ron Reisor <ron@udel.edu>:
> +1
>=20
> MacOSX 10.4.2
> gcc-4.0.0 (Apple build)
> Python 2.4.1
> Apache 2.0.54
>=20
> cheers,
>=20
> Ron
>=20
>=20
> Ron Reisor <ron@udel.edu> (RWR3)
> university of Delaware Information Technologies/Network and Systems Servi=

ces
> Computing Center/192 South Chapel Street/Newark DE, 19716
> pgp finger print: 0D 73 06 6F D3 6A 99 D3 F5 D5 6E FF 3B B9 7C 2C
>


Jim Gallacher

2005-09-07, 5:47 pm

I agree with Nicolas. If we start chasing apache 2.1 alpha support we
might *never* get 3.2 out the door. :-( Also, what's the roadmap for
apache 2.1/2.2?

Jim

Nicolas Lehuen wrote:
> Hi,
>
> Could we focus on Apache 2.0 for the 3.2 release ? Put 2.1 on the
> agenda for a later release (why not 3.3 ?).
>
> For the moment I don't see any quick and easy way to support both 2.0
> and 2.1, from what you wrote. I'd rather we try to get 3.2 out with a
> proper 2.0 support, and try to fix things for 2.1 when it goes at
> least beta.
>
> Regards,
> Nicolas.
>
> 2005/9/7, Jorey Bump <list@joreybump.com>:
>
>
>



Jim Gallacher

2005-09-07, 5:47 pm

+1

Linux Debian Sid
apache 2.0.54
python 2.3.5
GCC 4.0.2

Jorey Bump

2005-09-07, 5:47 pm

Nicolas Lehuen wrote:
> Hi,
>
> Could we focus on Apache 2.0 for the 3.2 release ? Put 2.1 on the
> agenda for a later release (why not 3.3 ?).
>
> For the moment I don't see any quick and easy way to support both 2.0
> and 2.1, from what you wrote. I'd rather we try to get 3.2 out with a
> proper 2.0 support, and try to fix things for 2.1 when it goes at
> least beta.


Sorry, the socket errors were a side effect of the build environment I
used. New results:

+1
Slackware Linux 10.1
gcc version 3.3.4
Python 2.4.1
Apache 2.0.54

+1 (if patched)
Slackware Linux 10.1
gcc version 3.3.4
Python 2.4.1
Apache 2.1.6 Alpha

Patches for Apache 2.1.x:

Remove APR_STATUS_IS_SUCCESS references in:
src/filterobject.c
src/connobject.c

Change in test.py:
/mod_auth/mod_auth_basic/
/auth_module/auth_basic_module/

I don't expect any immediate changes for apache 2.1.x, but I thought it
might be helpful to document these issues, since fixing them will be
inevitable.



Ron Reisor

2005-09-07, 5:47 pm

Yes! Plus, the software I'm developing is working too. I pulled out an
early version of FileSession and started using Session.FileSession. Looks
good. Gotta love it!

thanks,

Ron


On Wed, 7 Sep 2005, Nicolas Lehuen wrote:

> Wow, that's a nice one .
>
> 2005/9/7, Ron Reisor <ron@udel.edu>:
>


Ron Reisor <ron@udel.edu> (RWR3)
University of Delaware Information Technologies/Network and Systems Services
Computing Center/192 South Chapel Street/Newark DE, 19716
pgp finger print: 0D 73 06 6F D3 6A 99 D3 F5 D5 6E FF 3B B9 7C 2C

Jim Gallacher

2005-09-07, 5:47 pm

Ron Reisor wrote:
> Yes! Plus, the software I'm developing is working too. I pulled out an
> early version of FileSession and started using Session.FileSession.


Even better, you can use Session.Session() and the "PythonOption session
FileSession" configuration directive to get all the benefits of
FileSession without changing your current code - assuming of course that
your current code is calling Session.Session() to create the session object.

Jim

> Looks good. Gotta love it!
>
> thanks,
>
> Ron
>
>
> On Wed, 7 Sep 2005, Nicolas Lehuen wrote:
>
>
> Ron Reisor <ron@udel.edu> (RWR3)
> university of Delaware Information Technologies/Network and Systems
> Services
> Computing Center/192 South Chapel Street/Newark DE, 19716
> pgp finger print: 0D 73 06 6F D3 6A 99 D3 F5 D5 6E FF 3B B9 7C 2C
>



Ron Reisor

2005-09-07, 5:47 pm

On Wed, 7 Sep 2005, Jim Gallacher wrote:

> Ron Reisor wrote:
>
> Even better, you can use Session.Session() and the "PythonOption session
> FileSession" configuration directive to get all the benefits of FileSession
> without changing your current code - assuming of course that your current
> code is calling Session.Session() to create the session object.
>
> Jim


Yes, I'm calling Session.Session() with the configuration directive so I
get Session.FileSession(). That's the right way to go. I took a short cut
in my description, sorry, but not the code.

cheers,

Ron


>
>


Ron Reisor <ron@udel.edu> (RWR3)
University of Delaware Information Technologies/Network and Systems Services
Computing Center/192 South Chapel Street/Newark DE, 19716
pgp finger print: 0D 73 06 6F D3 6A 99 D3 F5 D5 6E FF 3B B9 7C 2C

Gregory (Grisha) Trubetskoy

2005-09-08, 2:46 am


Anybody got FreeBSD? I'm getting this. This is an old and possibly
misconfigured system, so the problem could be on my end.

FreeBSD 4.9
apache 2.0.53 (from ports)
python 2.3.3

$ make

Compiling for DSO.

/usr/local/sbin/apxs -I/home/grisha/src/tmp/mod_python-3.2.1b/src/include -I/usr/local/include/apache2 -I/usr/local/include/python2.3 -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c h
listobject.c -Wl,--export-dynamic -pthread -lm /usr/local/lib/python2.3/config/libpython2.3.a -lutil -lm
/usr/local/share/apache2/build/libtool --silent --mode=compile cc -prefer-pic -O -pipe -DAP_HAVE_DESIGNATED_INITIALIZER -D_REENTRANT -D_THREAD_SAFE -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/include/apache2 -I/usr/local/inc
lude -I/home/grisha/src/tmp/mod_python-3.2.1b/src/include -I/usr/local/include/apache2 -I/usr/local/include/python2.3 -c -o mod_python.lo mod_python.c && touch mod_python.slo
mod_python.c:34: syntax error before `*'
mod_python.c:34: warning: data definition has no type or storage class
mod_python.c: In function `python_cleanup':
mod_python.c:238: warning: passing arg 1 of `free' discards qualifiers from pointer target type
mod_python.c: In function `python_init':
mod_python.c:517: `APR_THREAD_MUTEX_UNNESTED' undeclared (first use in this function)
mod_python.c:517: (Each undeclared identifier is reported only once
mod_python.c:517: for each function it appears in.)
apxs:Error: Command failed with rc=65536
..
*** Error code 1

Stop in /usr/home/grisha/src/tmp/mod_python-3.2.1b/src.
*** Error code 1

Stop in /usr/home/grisha/src/tmp/mod_python-3.2.1b.


Joe Orton

2005-09-12, 5:52 pm

On Wed, Sep 07, 2005 at 11:00:07PM -0400, Gregory (Grisha) Trubetskoy wrote:
> Anybody got FreeBSD? I'm getting this. This is an old and possibly
> misconfigured system, so the problem could be on my end.
>
> FreeBSD 4.9
> apache 2.0.53 (from ports)
> Python 2.3.3

....
> -I/home/grisha/src/tmp/mod_python-3.2.1b/src/include
> -I/usr/local/include/apache2 -I/usr/local/include/python2.3 -c -o
> mod_python.lo mod_python.c && touch mod_python.slo
> mod_python.c:34: syntax error before `*'
> mod_python.c:34: warning: data definition has no type or storage class
> mod_python.c: In function `python_cleanup':
> mod_python.c:238: warning: passing arg 1 of `free' discards qualifiers from
> pointer target type
> mod_python.c: In function `python_init':
> mod_python.c:517: `APR_THREAD_MUTEX_UNNESTED' undeclared (first use in this


On older releases of FreeBSD, APR is not build with threads support,
which is probably the failure here.

To work around this in mod_python you can use:

#if APR_HAS_THREADS

....

#endif

around all code dependant on APR threads support.

Regards,

joe

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com