On 4 May 2011 16:42, Webb S. <[email protected]> wrote:
> Hi all,
>
> I have an application  written using the mod_python libraries (for
> Session and req.util and the like).  mod_python is starting to
> experience some serious bit rot (most recently the Session module is
> crashing because it (eventually) calls a deprecated bsddb, but doesn't
> seem to work in Python 2.7+.

Which is because development work on mod_python was officially
abandoned some time back and the Apache software foundation moved it
into its Attic for dead projects.

> The recommendation seems to be "use
> mod_wsgi"....
>
> .... however, mod_wsgi doesn't seem to provide replacements for the
> application libraries like Session and friends provided by
> mod_python.

That is because mod_wsgi is merely an implementation of the Python
WSGI interface as defined by PEP 333/3333. It is only intended to
provide an implementation of a portable interface for applications and
frameworks into a web server, in this case the web server being
Apache. In other words, it isn't intended to provide higher level
abstractions such as sessions, forms processing etc.

You can find out more information about what WSGI is at:

http://www.python.org/dev/peps/pep-3333/
http://www.wsgi.org
http://webpython.codepoint.net/wsgi_tutorial

> I don't really need the speed hook into apache, rather I
> just don't want to rewrite my app with a different API.

Eventually you will not have a choice unless you are happy to stay
using an older Python and Apache version.

> Is there a recommended transition path from mod_python to ...
> something?  Is there something about mod_wsgi I am missing?

Not really. Someone else on the list here has done some work on
mocking up some parts of mod_python higher level interfaces on top of
WSGI interface and I am sure they will comment. I don't recollect
where the code is however.

> I am
> quite happy to leave well enough alone, but as Python and Apache move
> forward, my application is likely to start breaking in even more
> creative ways as API's and such continue to diverge....
>
> If I do have to rewrite with new libraries, could anyone recommend a
> limited framework, which basically handles form data, redirects, and
> sessions?  Can I do it with the Python standard library only?  The
> thought of dealing with Django or whatever makes me cringe, especially
> whenever it goes obsolete and I am left holding a bunch of
> dependencies.

Hell is likely to freeze other before Django becomes obsolete. It is
the most popular Python web framework out there.

For the level you are used to working at however, I would suggest
instead using a micro framework such as Flask, or if you want to build
things yourself use Werkzeug directly, which is what Flask uses
underneath. For something a bit more high level than Flask have a look
at Pyramid.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to