Discussion:
Recommended Python version?
Shane Kerr
2010-06-15 11:59:15 UTC
Permalink
Hello,

Apologies if this is not the right list for this question, but there are
many Python lists and I wasn't sure which to approach.

We started the BIND 10 project a year ago, and picked Python 3 because
we don't expect the software to be production-ready until after 3 years
of work.

However, we have concerns because very few systems ship with Python 3
"out of the box" still. We think that early adopters - and later all
adopters - may be put off by this requirement.

We're considering back-porting the project from 3.1 to 2.7, and then
maintaining a version of the software that works with both the older 2.x
and the newer 3.x series. Does this make any sense?

Do you have any other recommendations regarding Python 2 vs. Python 3?

Thanks,

--
Shane
M.-A. Lemburg
2010-06-15 12:49:38 UTC
Permalink
Post by Shane Kerr
Hello,
Apologies if this is not the right list for this question, but there are
many Python lists and I wasn't sure which to approach.
We started the BIND 10 project a year ago, and picked Python 3 because
we don't expect the software to be production-ready until after 3 years
of work.
However, we have concerns because very few systems ship with Python 3
"out of the box" still. We think that early adopters - and later all
adopters - may be put off by this requirement.
We're considering back-porting the project from 3.1 to 2.7, and then
maintaining a version of the software that works with both the older 2.x
and the newer 3.x series. Does this make any sense?
Do you have any other recommendations regarding Python 2 vs. Python 3?
Depending on what you want to do with Python, it's probably best
to try to write software that works with both Python 2 and 3 -
especially if you are targeting a very diverse set of systems.

For backporting from 3 to 2, there's a helper available
which may be useful: http://www.startcodon.com/wordpress/?cat=8

Note that most recent Linux distributions do ship with Python3.
--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source (#1, Jun 15 2010)
Post by Shane Kerr
Python/Zope Consulting and Support ... http://www.egenix.com/
mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
2010-07-19: EuroPython 2010, Birmingham, UK 33 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
R. David Murray
2010-06-15 14:53:00 UTC
Permalink
Post by M.-A. Lemburg
Post by Shane Kerr
Hello,
Apologies if this is not the right list for this question, but there are
many Python lists and I wasn't sure which to approach.
We started the BIND 10 project a year ago, and picked Python 3 because
we don't expect the software to be production-ready until after 3 years
of work.
However, we have concerns because very few systems ship with Python 3
"out of the box" still. We think that early adopters - and later all
adopters - may be put off by this requirement.
I think that we are right in the middle of this changing. Python 3.1
just landed in Gentoo stable, for example, and I've heard that Ubuntu is
planning to ship it in the next version. Note that Python3 will not
initially ship as the *system* Python, but that Python2 and Python3 will
happily coexist on systems that ship both.

Because Python2 and Python3 can coexist, I would also think that early
adopters would be more willing to install Python3 if their systems don't
already have it, since they are, after all, early adopters :) By the
time you get to the "all adopters" stage I'm guessing Python3 will
be available on most systems; but that is, of course, a guess.
Post by M.-A. Lemburg
Post by Shane Kerr
We're considering back-porting the project from 3.1 to 2.7, and then
maintaining a version of the software that works with both the older 2.x
and the newer 3.x series. Does this make any sense?
Do you have any other recommendations regarding Python 2 vs. Python 3?
Depending on what you want to do with Python, it's probably best
to try to write software that works with both Python 2 and 3 -
especially if you are targeting a very diverse set of systems.
The question, I think, is how much you will be trying to displace BIND 9.
If you want to push BIND 10 out into all the corners currently occupied
by BIND 9, you may need to support systems that won't, in fact, ship
Python3 in the next couple years. On the other hand, how likely are
such platforms to switch to BIND 10?

Ultimately you are going to have to make the judgement call, since
you know your market and your development resources. But note that it
is easier to support both Python2 and Python3 than most people think,
and this is especially true if you don't have to worry about backward
compatibility (that is, you only target 2.7), which presumably you don't.
Post by M.-A. Lemburg
For backporting from 3 to 2, there's a helper available
which may be useful: http://www.startcodon.com/wordpress/?cat=8
If you do choose to make it run under Python2, note that the 3to2
project is being actively worked on this summer, and I'm pretty
sure that the maintainer would love feedback from your project.

--
R. David Murray www.bitdance.com
Nicola Larosa
2010-06-15 15:46:06 UTC
Permalink
I've heard that Ubuntu is planning to ship it in the next version.
Note that Python3 will not initially ship as the *system* Python,
but that Python2 and Python3 will happily coexist on systems that
ship both.
No future tense needed, it's been in the universe repo for three releases
already, and now it's in the main one:

Package python3

* intrepid (python): An interactive high-level object-oriented
language (default python3 version) [universe]
3.0~b3-0ubuntu2: all
* jaunty (python): An interactive high-level object-oriented language
(default python3 version) [universe]
3.0.1-0ubuntu4: all
* karmic (python): An interactive high-level object-oriented language
(default python3 version) [universe]
3.1-1ubuntu1: all
* lucid (python): An interactive high-level object-oriented language
(default python3 version)
3.1.2-0ubuntu1: all

http://packages.ubuntu.com/search?keywords=python3

There's going to be lots of Python code out there for quite a while, so
it does not seem a good idea to wait until Python3 becomes the system
Python version.

It's not necessary either: just include python3 as a dependency in your
package, and it will get installed with your program.
--
Nicola Larosa - http://www.tekNico.net/

The movie entertainment industry has a problem: people don't go to theat-
ers anymore, because they can watch movies from home, maybe gotten on
piratebay. So the industry needs a new type of movies. Movies with lame
story, lame script, lame everything, but top CGI, 3D, IMAX, ultra-mega-
realistic screening, so the movie downloaded from the internet is,
in fact, useless. - Habus on IMDB about Avatar, December 2009
R. David Murray
2010-06-15 17:13:58 UTC
Permalink
Post by Nicola Larosa
I've heard that Ubuntu is planning to ship it in the next version.
Note that Python3 will not initially ship as the *system* Python,
but that Python2 and Python3 will happily coexist on systems that
ship both.
No future tense needed, it's been in the universe repo for three releases
The future tense was for Python3 being 'shipped' with Ubuntu. If I
understood what I heard correctly (which I might not have!), the next
version of Ubuntu will come with Python3 pre-installed. Not as the
system Python, as I said; but as you said, that doesn't matter.

--
R. David Murray www.bitdance.com
Jürgen Hamel
2010-06-15 14:57:57 UTC
Permalink
On Tue, 15 Jun 2010 14:49:38 +0200
Post by M.-A. Lemburg
Post by Shane Kerr
We started the BIND 10 project a year ago, and picked Python 3 because
we don't expect the software to be production-ready until after 3 years
of work.
However, we have concerns because very few systems ship with Python 3
"out of the box" still. We think that early adopters - and later all
adopters - may be put off by this requirement.
We're considering back-porting the project from 3.1 to 2.7, and then
maintaining a version of the software that works with both the older 2.x
and the newer 3.x series. Does this make any sense?
FULL ACK, but I do with my project ( http://www.cuon.org ) for the next years only support
python 2.x. look above for my arguments.
Post by M.-A. Lemburg
Depending on what you want to do with Python, it's probably best
to try to write software that works with both Python 2 and 3 -
especially if you are targeting a very diverse set of systems.
For backporting from 3 to 2, there's a helper available
which may be useful: http://www.startcodon.com/wordpress/?cat=8
Note that most recent Linux distributions do ship with Python3.
NO !
Ubuntu Lucid Lynx - preinstalled python 2.6.5 - and Lucid Lynx is a LTS version
Gentoo - preinstalled python 2.6.5
Debian Lenny - python 2.5.2
Fedora 13 - python 2.6.4

For all normal user of this systems is python 2.x installed, and not all user are Systemadmins.
A lot of user of my program for example are really normal linux user, use it for business !

I try since over 2 and a half years to find a solution for my project, but there is no way to convert it.
A lot of libs are 2.x and no normal PC with Linux has an installed python 3.x !! At Windows it looks not better !!

I hope really, that in some year a python version 3.x exists, that can execute both, 2.x and 3.x scripts.
The current situation is a mess, to much python 2.x scripts are in the world, and the only solution is a
python version, that allow to execute both !! I know all arguments, but there is a big diff between the
wish to use python 3.x and the reality.


bye
JÃŒrgen
--
Cyrus-Computer GmbH Linux Server Support JÃŒrgen Hamel
Cuon - Warenwirtschaft mit Linux http://www.cuon.org
Twitter: cuonOne Jabber: jhamel-***@public.gmane.org
R. David Murray
2010-06-15 17:32:53 UTC
Permalink
Post by M.-A. Lemburg
Depending on what you want to do with Python, it's probably best
to try to write software that works with both Python 2 and 3 -
especially if you are targeting a very diverse set of systems.
For backporting from 3 to 2, there's a helper available
which may be useful: http://www.startcodon.com/wordpress/?cat=3D8
Note that most recent Linux distributions do ship with Python3.
NO !
Ubuntu Lucid Lynx - preinstalled python 2.6.5 - and Lucid Lynx is a
LTS version
Gentoo - preinstalled python 2.6.5
Debian Lenny - python 2.5.2
Fedora 13 - python 2.6.4
Python2 and Python3 can coexist. Python3 is available *now* for almost
all Linux platforms, and is no harder to install on Windows than Python2
is. (And since most significant Windows aps that use Python bundle it,
they don't have any install issue with using Python3 at all.)
For all normal user of this systems is python 2.x installed, and not
all user are Systemadmins. A lot of user of my program for example
are really normal linux user, use it for business !
More and more linux systems will start having Python3 installed out
of the box. This is already happening, and that was Marc's point.
All Linux users can install software through their system's package
manager, and the package managers of all Linux systems are (or will
be soon) capable of installing a Python3 as a dependency.
I try since over 2 and a half years to find a solution for my project,
but there is no way to convert it.
Have you asked for help here? (I'm new here, I really don't know)
A lot of libs are 2.x and no normal PC with Linux has an installed
python 3.x !! At Windows it looks not better !!
Well, if you have dependencies that have not ported yet, then that's
a different problem. (BIND 10 doesn't have that problem.) See above
for the rest.
I hope really, that in some year a python version 3.x exists, that can
execute both, 2.x and 3.x scripts.
This will not happen, but *you* can write your scripts so that they
can execute on either.
The current situation is a mess, to much python 2.x scripts are in the
world, and the only solution is a python version, that allow to
execute both !! I know all arguments, but there is a big diff between
the wish to use python 3.x and the reality.
What are the issues that are blocking you from using Python3, other than
dependencies on libraries that haven't themselves been ported yet?

--
R. David Murray www.bitdance.com
Jürgen Hamel
2010-06-15 18:10:43 UTC
Permalink
On Tue, 15 Jun 2010 13:32:53 -0400
Post by R. David Murray
Python2 and Python3 can coexist. Python3 is available *now* for almost
all Linux platforms, and is no harder to install on Windows than Python2
is. (And since most significant Windows aps that use Python bundle it,
they don't have any install issue with using Python3 at all.)
oh yes, but we have luck and it is NOT the standard Installation
Post by R. David Murray
Post by Jürgen Hamel
For all normal user of this systems is python 2.x installed, and not
all user are Systemadmins. A lot of user of my program for example
are really normal linux user, use it for business !
More and more linux systems will start having Python3 installed out
of the box. This is already happening, and that was Marc's point.
All Linux users can install software through their system's package
manager, and the package managers of all Linux systems are (or will
be soon) capable of installing a Python3 as a dependency.
Sorry, perhaps my bad English, mostly all users of my program didn`t know
how to install a program. They didn`t know what a paket manager is.
And just this last week I have the first time of my project-life setup a deb-Installer.
Post by R. David Murray
Post by Jürgen Hamel
I try since over 2 and a half years to find a solution for my project,
but there is no way to convert it.
Have you asked for help here? (I'm new here, I really don't know)
I need no help for porting, I will simple not do this work until it is really needet !
And I think, the next 10 years it is not needet !
Post by R. David Murray
Post by Jürgen Hamel
A lot of libs are 2.x and no normal PC with Linux has an installed
python 3.x !! At Windows it looks not better !!
Well, if you have dependencies that have not ported yet, then that's
a different problem. (BIND 10 doesn't have that problem.) See above
for the rest.
Post by Jürgen Hamel
I hope really, that in some year a python version 3.x exists, that can
execute both, 2.x and 3.x scripts.
This will not happen, but *you* can write your scripts so that they
can execute on either.
I do that perhaps in some years, perhaps not .
Post by R. David Murray
Post by Jürgen Hamel
The current situation is a mess, to much python 2.x scripts are in the
world, and the only solution is a python version, that allow to
execute both !! I know all arguments, but there is a big diff between
the wish to use python 3.x and the reality.
What are the issues that are blocking you from using Python3, other than
dependencies on libraries that haven't themselves been ported yet?
I checked it just last year and there are the most packages that I need, are not ported,
so the twisted ( web, mail, words ) packages. Also reportlab and pygtk seems have some trouble
with unicode and str. Other are the database driver. And for a lot of packages I didn`t know it,
perhaps is there a central internetsite who ported packages are listed ?
(gtkmozembed, gtksourceview, imaging with sane backend, and so on !! )

And some of the other packages will never ported, I must do that then myself.

And then, it is only a lot of work for me ( new installer, new dependencies) for no
advantages. My Project is very soon 3x compatible, mostly only some 1000 prints must
changes, that can do a script. But last year also they say, that python3 is slower , I don`t know.
And really, a lot of work only for so few changes, that is not my way.

2 Years ago I thought, it was a good and nice thing to change to python3, but for me it is now
clear, that I must wait 5 or 10 years to port my project.

bye
JÃŒrgen
--
Cyrus-Computer GmbH Linux Server Support JÃŒrgen Hamel
Cuon - Warenwirtschaft mit Linux http://www.cuon.org
Twitter: cuonOne Jabber: jhamel-***@public.gmane.org
Lennart Regebro
2010-06-15 17:49:14 UTC
Permalink
Post by Jürgen Hamel
I try since over 2 and a half years to find a solution for my project, but there is no way to convert it.
Well, what's the problem?
Post by Jürgen Hamel
A lot of libs are 2.x
This is true, and here you can only wait, or
and no normal PC with Linux has an installed python 3.x !! At Windows
it looks not better !!
Post by Jürgen Hamel
I hope really, that in some year a python version 3.x exists, that can execute both, 2.x and 3.x scripts.
The current situation is a mess, to much python 2.x scripts are in the world, and the only solution is a
python version, that allow  to execute both !! I know all arguments, but there is a big diff between the
wish to use python 3.x and the reality.
bye
Jürgen
--
Cyrus-Computer GmbH Linux Server Support Jürgen Hamel
Cuon - Warenwirtschaft mit Linux  http://www.cuon.org
_______________________________________________
Python-porting mailing list
http://mail.python.org/mailman/listinfo/python-porting
David Malcolm
2010-06-24 15:44:32 UTC
Permalink
Post by Jürgen Hamel
On Tue, 15 Jun 2010 14:49:38 +0200
Post by M.-A. Lemburg
Post by Shane Kerr
We started the BIND 10 project a year ago, and picked Python 3 because
we don't expect the software to be production-ready until after 3 years
of work.
However, we have concerns because very few systems ship with Python 3
"out of the box" still. We think that early adopters - and later all
adopters - may be put off by this requirement.
We're considering back-porting the project from 3.1 to 2.7, and then
maintaining a version of the software that works with both the older 2.x
and the newer 3.x series. Does this make any sense?
FULL ACK, but I do with my project ( http://www.cuon.org ) for the next years only support
python 2.x. look above for my arguments.
Post by M.-A. Lemburg
Depending on what you want to do with Python, it's probably best
to try to write software that works with both Python 2 and 3 -
especially if you are targeting a very diverse set of systems.
For backporting from 3 to 2, there's a helper available
which may be useful: http://www.startcodon.com/wordpress/?cat=8
Note that most recent Linux distributions do ship with Python3.
NO !
Ubuntu Lucid Lynx - preinstalled python 2.6.5 - and Lucid Lynx is a LTS version
Gentoo - preinstalled python 2.6.5
Debian Lenny - python 2.5.2
Fedora 13 - python 2.6.4
Fedora 13 ships both python 2 and python 3 stacks, which are installable
in parallel: in addition to the "python" rpm which is 2.6.4, there's a
"python3" rpm, which is 3.1.2.

We ship quite a few python 3 modules on top of the core runtime. See:
https://fedoraproject.org/wiki/Features/Python3F13#Porting_status
for the gory details.

Hope this is helpful
Dave

Jesus Cea
2010-06-15 17:36:10 UTC
Permalink
Post by Shane Kerr
However, we have concerns because very few systems ship with Python 3
"out of the box" still. We think that early adopters - and later all
adopters - may be put off by this requirement.
We're considering back-porting the project from 3.1 to 2.7, and then
maintaining a version of the software that works with both the older 2.x
and the newer 3.x series. Does this make any sense?
Do you have any other recommendations regarding Python 2 vs. Python 3?
I don't write python 3 code yet, myself. So far, I use "2to3" to support
3.x.

That said, in your case I would say:

1. People living in the edge can compile Python 3.x themselves. In fact
they were compiling new BIND releases by hand until now. I do!.
Compiling python 3 is not mre complex than compiling current BIND 9.x.

2. People that don't want to mess with low level stuff is going to use
(talking about linux) a distribution. Any modern linux distribution
supports dependencies, so python 3 would be a dependency. The package
manager would download BIND 10 *AND* python 3.x, automatically. For
instance, in Ubuntu 10.04:

"""
***@ubuntu:~$ python3
The program 'python3' is currently not installed. You can install it by
typing:
sudo apt-get install python3-minimal
"""

So, under Ubuntu it would be pain-free.

3. For "old" systems with no dependency management, the sysadmin is not
going to install BIND 10 anyway. Not for a long time.

If you don't need any "unported" python library, I would recommend you
to stick to Python 3.

PS: Having a high profile project as BIND using Python 3 would be a
great push to python 3 mindshare.

- --
Jesus Cea Avion _/_/ _/_/_/ _/_/_/
jcea-***@public.gmane.org - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/
jabber / xmpp:jcea-/eSpBmjxGS4dnm+***@public.gmane.org _/_/ _/_/ _/_/_/_/_/
. _/_/ _/_/ _/_/ _/_/ _/_/
"Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
"My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
Martin v. Löwis
2010-06-15 19:15:59 UTC
Permalink
Post by Shane Kerr
Do you have any other recommendations regarding Python 2 vs. Python 3?
Let me stress what others may have implied: when bind 10 will ship (i.e.
three years from now), every system that comes with Python will also
have python3 available for installation readily, perhaps (but not
necessarily) with the exception of OSX (as Apple doesn't really have
lots of optional packages on the installation media). Of course, OSX
binaries will be available from python.org.

Notice that three years from now, Python 2.6 will not receive any
security updates anymore (at least not from python.org), and 2.7 will be
the only (and last) 2.x release. Of course, system vendors will continue
to ship older Python releases, and manage security fixes themselves.

Also, in three years, Python 3.2 will have seen its last bug fix
release, and be in security-fix-only mode (along with 3.1); the current
release will be Python 3.3.

So I'd claim that an effort to continue supporting 2.7 for a new product
is likely a waste of time, and would lead to code clutter.

Regards,
Martin
Antoine Pitrou
2010-06-24 14:23:43 UTC
Permalink
Hello Shane,
Post by Shane Kerr
Apologies if this is not the right list for this question, but there are
many Python lists and I wasn't sure which to approach.
We started the BIND 10 project a year ago, and picked Python 3 because
we don't expect the software to be production-ready until after 3 years
of work.
What will Python be used for?

If it's used as an embedded interpreter (e.g. for creating plugins) then it's a
no-brainer really: the interpreter will be linked into your binary and there's
no reason not to go with Python 3. The language is streamlined compared to
Python 2, which makes it probably easier to use for almost everyone except
people already expert in Python 2.

If it's used for separate scripts or utility programs, I would also recommend
Python 3 because, two months from now, 3.x will be the only actively developed
branch. 2.7 is scheduled for release in a couple of weeks and it's the last
feature release in the 2.x branch. As Martin explained, in two or three years
the Python version of choice will be 3.2/3.3.

(besides, you probably already know that compiling Python is easy and fast; all
is needed, basically, is a C compiler and a reasonably comprehensive standard C
library; you could even include your own local copy of Python 3 in your build
process if you are really picky about not introducing dependencies)
Post by Shane Kerr
We're considering back-porting the project from 3.1 to 2.7, and then
maintaining a version of the software that works with both the older 2.x
and the newer 3.x series. Does this make any sense?
If many of your users ask loudly for it, then perhaps it makes sense. I don't
think there's much point in doing it proactively, though. It will create an
additional maintenance burden, and might actually confuse your users.

Regards

Antoine.
Loading...