The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

Giampaolo Rodolà g.rodola at gmail.com
Thu Jul 8 04:25:36 EDT 2010


2010/7/8 Michele Simionato <michele.simionato at gmail.com>:
> On Jul 7, 10:55 pm, Carl Banks <pavlovevide... at gmail.com> wrote:
>> On Jul 7, 1:31 am, Paul McGuire <pt... at austin.rr.com> wrote:
>> > I just
>> > couldn't get through on the python-dev list that I couldn't just
>> > upgrade my code to 2.6 and then use 2to3 to keep in step across the
>> > 2-3 chasm, as this would leave behind my faithful pre-2.6 users.
>
> This is a point I do not understand. My recent module plac is meant to
> work from Python 2.3 to Python 3.1 and to this goal I make use of 2to3
> at the *client* side.
> Users of Python 2.X get the original code with no magic whatsoever;
> users of Python 3.X
> get the same code, but at installation time 2to3 is run by the
> setup.py script. The mechanism requires distribute to be installed,
> but I would say that having distribute is a must for Python 3.X users;
> Python 2.X users do not need anything, so the approach is backward
> compatible. I thought this was the recommended way of using 2to3 and
> so far is working for me.
>
>            M. Simionato
> --
> http://mail.python.org/mailman/listinfo/python-list
>

I used the same approach (2.x default code base which gets translated
by 2to3 at installation time) and I managed to do this with distutils
alone by doing a little hack in setup.py.
Take a look at:
http://code.google.com/p/psutil/source/browse/tags/release-0.1.3/setup.py#11

Regards,

--- Giampaolo
http://code.google.com/p/pyftpdlib
http://code.google.com/p/psutil



More information about the Python-list mailing list