gnulib-tool-py
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnulib-tool-py] Python 2 or 3


From: Bruno Haible
Subject: Re: [gnulib-tool-py] Python 2 or 3
Date: Sun, 29 Apr 2012 22:50:35 +0200
User-agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )

Hi Dmitriy,

> > whether and how to support Python 3
> The code available at github currently runs successfully under Python 2 and
> Python 3. I will try to avoid the pitfalls and to save backward
> compatibility if possible. However in talk with Bruno we decided that the
> main language for our needs is Python 3, so in a desperate situation I
> think I'll follow Python 3 way, even though I prefer Python 2. It seems the
> future belogns to Python 3, because Python 2 is closed for implementing new
> fetures.

What we discussed was more an unreflected feeling, than a real decision.

For a real decision, I would like to consider

1) The release dates of various Python versions.

   The main implementation of Python is CPython [1]. Release 3.0 was
   released on 2008-12-03 [2]. Of course *.0 releases are normally
   better avoided, so let's look at the Python 3.1 release date:
   2009-06-27 [2]. When your project is finished, this will be more than
   three years ago.

2) The Python 3 support status in various distros that people use for
   development.
     - Ubuntu
       10.04  python3 = version 3.1.2   [3]
       10.10  python3 = version 3.1.2   [4]
       11.04  python3 = version 3.2     [5]
       11.10  python3 = version 3.2.2   [6]
       12.04  python3 = version 3.2.3   [7]
     - Fedora Project
       f14 (already EOL!)  python3 = version 3.1.2  [8][9][10]
       f15  python3 = version 3.2.3  [8][10]
       f16  python3 = version 3.2.3  [8][10]
       f17  python3 = version 3.2.3  [8][10]
     - openSUSE
       11.1  python3 = version 3.0b3  [11]
       11.2  python3 = version 3.1    [12]
       11.3  python3 = version 3.1    [13]
       11.4  python3 = version 3.1.3  [14]
       12.1  python3 = version 3.2.1  [15]
     - FreeBSD
       python31 = version 3.1.5  [16]
       python32 = version 3.2.3  [16]
     - Cygwin
       1.7: Only Python 2.6.7 is in the package list of the Cygwin site [17],
            but instructions for installing it are easily available [18][19].
     - MacOS X: Binaries available from python.org [19].

   In summary, every halfway recent distro that developers use has
   Python 3.1 or newer already prepackaged. The only weak spot currently
   is Cygwin - but that may have changed within 4 months.

3) What people say about the differences between Python 2 and 3.

   Read [20].

   In particular, the "clean unicode/bytes separation" looks like a nice
   feature of Python 3, given that gnulib-tool does lots of string processing.

   Also the exception handling is nicer [21].

   Cf. [22].

4) Are there external libraries which are not yet ported to Python 3?

   We most likely won't need to depend on anything outside the core
   Python libraries.

In view of all this, in particular [21], my preference is clearly to
go straight to the Python 3 road. Time spent on backward compatibility
with Python 2.7 is mostly wasted time.

Bruno

[1] http://en.wikipedia.org/wiki/CPython
[2] http://en.wikipedia.org/wiki/History_of_Python
[3] http://packages.ubuntu.com/lucid/python/python3
[4] http://packages.ubuntu.com/maverick/python/python3
[5] http://packages.ubuntu.com/natty/python/python3
[6] http://packages.ubuntu.com/oneiric/python/python3
[7] http://packages.ubuntu.com/precise/python/python3
[8] https://admin.fedoraproject.org/pkgdb/acls/name/python3
[9] https://admin.fedoraproject.org/pkgdb/collections/name/f14
[10] http://pkgs.fedoraproject.org/gitweb/?p=python3.git
[11] http://download.opensuse.org/distribution/11.1/repo/oss/suse/i586/
[12] http://download.opensuse.org/distribution/11.2/repo/oss/suse/i586/
[13] http://download.opensuse.org/distribution/11.3/repo/oss/suse/i586/
[14] http://download.opensuse.org/distribution/11.4/repo/oss/suse/i586/
[15] http://download.opensuse.org/distribution/12.1/repo/oss/suse/i586/
[16] http://ftp.freebsd.org/pub/FreeBSD/ports/packages/python/
[17] http://cygwin.com/packages/
[18] http://gioorgi.com/2011/python-3-survival-guide/
[19] http://www.python.org/download/releases/
[20] http://wiki.python.org/moin/Python2orPython3
[21] http://docs.python.org/dev/howto/pyporting.html#use-same-source
[22] http://lwn.net/Articles/426906/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]