Python 3 compatibility

43 views
Skip to first unread message

Sherwin Soltani

unread,
Apr 30, 2009, 3:02:04 AM4/30/09
to we...@googlegroups.com
I think I read that web.py is python3 compatible. Cloning the latest
git and then trying to run out-of-box doesn't seem to work. I patched
the entire tree with 2to3, then tried again; some imports here and
there are still triggering errors. I hunted a few of them down, but
one in particular in http.py has me stumped.

Please tell me I'm doing this wrong, and there is another way you're
supposed to get this module to work with python3.

Otherwise I'd be happy to branch my work so far, and collaborate so
that we can make it 3.0 compatible.

Sherwin Soltani

unread,
May 1, 2009, 8:46:37 PM5/1/09
to web.py
Don't all cheer at once, but I think I've gotten compatibility. It's a
little ugly, and its definitely not backwards-compatible. I'm going to
email the maintainer to see if we can put in a python3 branch, and
commit to that one. I would guess that from then on, further
development in web.py can continue in the main branch, with someone
(me, I guess?) converting the changes over to 3.0.

Anand Chitipothu

unread,
May 1, 2009, 11:26:15 PM5/1/09
to we...@googlegroups.com
> Don't all cheer at once, but I think I've gotten compatibility. It's a
> little ugly, and its definitely not backwards-compatible. I'm going to
> email the maintainer to see if we can put in a python3 branch, and
> commit to that one. I would guess that from then on, further
> development in web.py can continue in the main branch, with someone
> (me, I guess?) converting the changes over to 3.0.

Please send the patch, I'll start a new branch for python3.0.

Anand Chitipothu

unread,
May 4, 2009, 2:55:36 AM5/4/09
to we...@googlegroups.com
2009/4/30 Sherwin Soltani <sherc...@gmail.com>:

Did you manage to run web.py on python3.0 with your patch?
I couldn't run the hello world example using either wsgiserver or
fastcgi as both are not python3.0 compatible.

Graham Dumpleton

unread,
May 4, 2009, 7:37:27 AM5/4/09
to web.py


On May 4, 4:55 pm, Anand Chitipothu <anandol...@gmail.com> wrote:
> 2009/4/30 Sherwin Soltani <shercip...@gmail.com>:
Please be aware that if you are relying on WSGI, that there is no WSGI
specification which covers Python 3.0. There is still discussion going
on as to how it should look and chances are that anything you produce
now may not work when details are nailed down. So, although Apache/
mod_wsgi 3.0, for which there is a release candidate, supports Python
3.0, it is quite liberal in what it allows. Chances are though that
various things it currently allows it will not allow when WSGI
specification for Python 3.0 is settled on. It may thus be premature
to be looking at Python 3.0 support.

Graham

Anand Chitipothu

unread,
May 4, 2009, 7:42:46 AM5/4/09
to we...@googlegroups.com
> Please be aware that if you are relying on WSGI, that there is no WSGI
> specification which covers Python 3.0. There is still discussion going
> on as to how it should look and chances are that anything you produce
> now may not work when details are nailed down. So, although Apache/
> mod_wsgi 3.0, for which there is a release candidate, supports Python
> 3.0, it is quite liberal in what it allows. Chances are though that
> various things it currently allows it will not allow when WSGI
> specification for Python 3.0 is settled on. It may thus be premature
> to be looking at Python 3.0 support.

Thanks Graham.
I think it is wise to wait till WSGI specs for Python 3.0 are out.

Sherwin Soltani

unread,
May 5, 2009, 1:51:45 PM5/5/09
to web.py
> Did you manage to run web.py on python3.0 with your patch?
> I couldn't run the hello world example using either wsgiserver or
> fastcgi as both are not python3.0 compatible.

Web.py is properly imported, but the modules it depends on (MySQLdb
and wsgi) have no python3.0 compatible packages. Thus, most parts of
it are non-functional in python3 right now, rendering it mostly
useless.

For now, I'm running our code in 2.6 until the dependent packages are
correctly updated.
Reply all
Reply to author
Forward
0 new messages