Py3k port updated

0 views
Skip to first unread message

Martin v. Löwis

unread,
Jan 10, 2009, 5:47:29 PM1/10/09
to Django developers
I have updated my Py3k port of django. As before, it is just the bare
minimum to get through the tutorial; as the possibly most significant
change since the previous patch, it now supports psycopg2.

I have updated the Wiki page at http://wiki.python.org/moin/PortingDjangoTo3k
with the new patch.

The patch applies against Django's trunk; it was tested with the HEAD
of Python's py3k branch (i.e. 3.1).

Regards,
Martin

Alex Gaynor

unread,
Jan 10, 2009, 5:54:57 PM1/10/09
to django-d...@googlegroups.com
Martin,

Did you by any chance try running the Django test suite(because that's probably going to be the best way to spot breakages).

Thanks,
Alex
--
"I disapprove of what you say, but I will defend to the death your right to say it." --Voltaire
"The people's good is the highest law."--Cicero

Graham Dumpleton

unread,
Jan 10, 2009, 6:11:41 PM1/10/09
to Django developers


On Jan 11, 9:47 am, Martin v. Löwis <mar...@v.loewis.de> wrote:
> I have updated my Py3k port of django. As before, it is just the bare
> minimum to get through the tutorial; as the possibly most significant
> change since the previous patch, it now supports psycopg2.
>
> I have updated the Wiki page athttp://wiki.python.org/moin/PortingDjangoTo3k
> with the new patch.
>
> The patch applies against Django's trunk; it was tested with the HEAD
> of Python's py3k branch (i.e. 3.1).

Have you by chance tried running it on top of Apache/mod_wsgi (version
from subversion which has Python 3.0 support)?

Graham

Martin v. Löwis

unread,
Jan 10, 2009, 6:15:13 PM1/10/09
to Django developers
> Did you by any chance try running the Django test suite(because that's
> probably going to be the best way to spot breakages).

No, I haven't (or only to the degree to find out that runtest.py is
not in 3.0
syntax, as it uses incorrect except clauses). I'm fairly certain
though
that the test suite fails quickly, with just a few tests passing.

Contributions are welcome.

Regards,
Martin

Martin v. Löwis

unread,
Jan 10, 2009, 6:15:49 PM1/10/09
to Django developers
> Have you by chance tried running it on top of Apache/mod_wsgi (version
> from subversion which has Python 3.0 support)?

No, only in runserver mode.

Regards,
Martin

Graham Dumpleton

unread,
Jan 10, 2009, 6:21:23 PM1/10/09
to Django developers


On Jan 11, 10:15 am, Martin v. Löwis <mar...@v.loewis.de> wrote:
> > Have you by chance tried running it on top of Apache/mod_wsgi (version
> > from subversion which has Python 3.0 support)?
>
> No, only in runserver mode.

I'll give it a go, but for someone who doesn't know about running 2to3
etc, to make things a but more obvious can you add to your page a
quick set of instructions as to what someone needs to do to try this
out. Ie., what needs to be done after a checkout, does one apply patch
and then install it with 2to3 running automatically, or is there some
other voodoo that needs to be done?

Thanks.

Graham

Martin v. Löwis

unread,
Jan 10, 2009, 6:28:46 PM1/10/09
to Django developers
> I'll give it a go, but for someone who doesn't know about running 2to3
> etc, to make things a but more obvious can you add to your page a
> quick set of instructions as to what someone needs to do to try this
> out. Ie., what needs to be done after a checkout, does one apply patch
> and then install it with 2to3 running automatically, or is there some
> other voodoo that needs to be done?

From the patch/django point of view, it is really very simple. You
apply the patch, and then do

path-to-python3.1 setup.py install

No need to run 2to3; this is done behind the covers. The really tricky
part might be that you have to use python3.1, as the 2to3 version
shipped with 3.0 didn't include all of the necessary fixers (although
3.0.1 will).

I would recommend to try runserver first: your application might also
need porting, or might invoke parts of Django that I haven't ported.
Django apparently features a large variety of error reporting
scenarios, depending on where exactly in Django the error occurs.

If you run into problems, feel free to contact me.

Regards,
Martin

Graham Dumpleton

unread,
Jan 10, 2009, 10:37:05 PM1/10/09
to Django developers
Hmmm, main page for an empty project created with startproject is fine
under Apache/mod_wsgi with Python 3.1a0.

[Sun Jan 11 14:31:29 2009] [notice] Apache/2.2.9 (Unix) mod_ssl/2.2.9
OpenSSL/0.9.7l DAV/2 mod_wsgi/3.0-TRUNK Python/3.1a0 configured --
resuming normal operations

When get more time will need to start working through the tutorial,
setting up a database and making sure posting content and other
aspects of WSGI interface work properly.

I must say I was pleasantly surprised that even that worked first
time.

Graham


Reply all
Reply to author
Forward
0 new messages