py3k concerns. An example

"Martin v. Löwis" martin at v.loewis.de
Thu Apr 24 10:21:50 EDT 2008


> Again, to me, this is a non-issue because I've been able to create a
> cross-version compatible single codebase for pyparsing.  But it was a
> bit dicey there for a while, and I think other module developers/
> maintainers may not be so lucky.

I'm more optimistic. I tried it for Django, and while the port is not
complete, it goes really well and supports "basic" operations (i.e.
the Django tutorial).

Based on your experience, and other reports, I think there is a fair
chance that you can support a wide range of versions (2.x and 3.x)
from a single code base for most projects.

> - create (if possible) single cross-version compatible code
> - forego support of 3.0 users
> - discontinue pre-2.6 support for future versions of their module
> - maintain dual codebase

One needs to consider the drawbacks in each case; for the single
codebase approach, the drawback probably is that readability
suffers, and the need for testing increases (but it does always
if you support multiple targets). It also requires expertise to
create such cross-version code in the first place, but that's
"just" a learning issue (i.e. you have to keep the rules in mind
that you want to follow).

Regards,
Martin



More information about the Python-list mailing list