> The specific issues I've run into so far:
>
>  * Exception-catching syntax (i.e. ``except Whatever as e`` vs.
>  ``except Whatever, e``).

2to3 fixes these, and transparently transforms "the except clauses.

>  * Unicode literals (u'...').

Likewise, 2to3 removes the u"" prefix.

So leave the code as-is, and have 2to3 fix it at installation
time (whenever setup.py is invoked by 3.x; setup.py itself
runs without changes on 3.x)

>  Those are the show-stoppers (for me -- maybe I'm just missing
>  something?)

Indeed - the ability to have 2to3 fix it for you.

There are more essential fixes that 2to3 supplies, in particular
fixes to relative imports, plus a number of non-essential ones,
such as the replacement of the unicode identifer with str.

>, but I'm actually more worried about the subtle
>  differences between str/unicode and bytes/str... I suspect there'll be
>  many subtle bugs there.

Indeed, this needs a lot of testing.

>  Ditto anything using io, really, because the
>  new io library isn't in any way the same as the old one (in a good way
>  :)

Not so. open() pretty much works the same way as it did before,
except that Django should open files in binary mode most of the
time.

>  I'm also just worried about the uglyness of code needed to maintain
>  something like this. Like about all the ImportErrors we'll have to
>  catch once all the stdlib reorg happens...

It's possible to factor those out if things get too unreadable.

Regards,
Martin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to