As it seems likely that Python 2.5 compatibility will be dropped for
Django 1.5, I've updated the Python 3 port[1] to remove the hacks
needed for 2.5 compatibility. This means:
1. The u() and b() calls have been removed, and replaced with removing
the u prefixes and adding "from __future__ import unicode_literals" to
the relevant modules.
2. The use of sys.exc_info() has been removed in favour of using the
3.x exception syntax ("as e:").
There are some places where native strings are required, and for this
an "n" function has been added to django.utils.py3. This is a no-op on
Python 3.x but on Python 2.x it converts unicode to str. (Examples of
where native strings are needed - __repr__ should return native
strings, WSGI expects native strings, some cookie APIs expect native
strings and fail when passed Unicode in 2.x.)
Note that 2.x compatibility is now with Python 2.6.5 or later. Earlier
2.6 versions would not accept Unicode in kwargs keys; this is fixable,
but it's debatable whether we really need to - it would introduce
quite some noise.
The older version is still available in a branch named "2.5-3.x".
However, this does not reflect recent changes in Django trunk.
The default branch does reflect the latest Django trunk changes (up to
r17276).
Testing has been done on Linux; the default branch passes all tests
for Python 2.7.2 and 3.2.2 (and 3.3.0, the in-development version)
with the SQLite backend.
On the PostgreSQL backend, all tests pass on 2.7.2 and 3.2.2.
On the Oracle backend, one test fails on both 2.x and 3.x, but this
appears related to my Oracle NLS configuration.
If anyone has the chance to try out the latest changes, I'd be
grateful for some feedback. I haven't been able to set up working GIS
configurations, so the GIS backends remain untested.
Regards,
Vinay Sajip
[1] https://bitbucket.org/vinay.sajip/django/
--
You received this message because you are subscribed to the Google Groups
"Django developers" 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/django-developers?hl=en.