Python 3.x adoption

S

Staszek

Hi

What's the problem with Python 3.x? It was first released in 2008, but
web hosting companies still seem to offer Python 2.x rather.

For example, Google App Engine only offers Python 2.7.

What's wrong?...
 
S

Skip Montanaro

What's the problem with Python 3.x? It was first released in 2008, but
web hosting companies still seem to offer Python 2.x rather.

For example, Google App Engine only offers Python 2.7.

What's wrong?...

What makes you think anything's wrong? Major changes to any
established piece of software takes a fairly long while to infiltrate.
Lots of COBOL and Fortran 77 still running out there. I imagine there
are still more than a few DOS and Windows 3.1 boxes as well. Why
should adoption of Python 3.x be any different?

Skip
 
S

Steven D'Aprano

Hi

What's the problem with Python 3.x?
Nothing.

It was first released in 2008,

That was only five years ago.

I know that to young kids today who change their iPhone every six months,
five years sounds like a lot, but in the world of mature software, five
years is a blink of the eye. People still use Fortran code that is 30
years old. I know of at least one person supporting a Python 1.5 system,
which is about 15 years old. RedHat is still providing commercial support
for Python 2.3, and their Python 2.7 commercial support won't end until
2023 or 2024.

but web hosting companies still seem to offer Python 2.x rather.

For example, Google App Engine only offers Python 2.7.

What's wrong?...

Hosting companies are conservative. Just look at how many still offer old
versions of PHP. These guys offer PHP 5.2 to 5.5:

http://www.a2hosting.com/php-hosting

WordPress will run on PHP 4.1!

So it is no surprise that Python hosting companies still mostly provide
2.7.
 
M

MRAB

That was only five years ago.

I know that to young kids today who change their iPhone every six months,
five years sounds like a lot, but in the world of mature software, five
years is a blink of the eye. People still use Fortran code that is 30
years old. I know of at least one person supporting a Python 1.5 system,
which is about 15 years old. RedHat is still providing commercial support
for Python 2.3, and their Python 2.7 commercial support won't end until
2023 or 2024.



Hosting companies are conservative. Just look at how many still offer old
versions of PHP. These guys offer PHP 5.2 to 5.5:

http://www.a2hosting.com/php-hosting

WordPress will run on PHP 4.1!

So it is no surprise that Python hosting companies still mostly provide
2.7.
Not to mention Windows XP, which is only now being dropped by Microsoft.
 
T

Travis Griggs

Here we go again…

Hi

What's the problem with Python 3.x? It was first released in 2008, but
web hosting companies still seem to offer Python 2.x rather.

For example, Google App Engine only offers Python 2.7.

What's wrong?...

Maybe what it means is that Python3 is just fine, but Google App Engine isn’t seeing a lot of development/improvement lately, that it’s just in maintenance mode. Imagine that, Google not finishing/maintaining something.

I wish amongst the periodic maelstroms of Python2 vs Python3 handwringing, people would look at the new project starts. When I work with someone’s old library that they’ve moved on from, I use python2 if I have to, but anytime I can, I use python3.

Personally, I wish they’d start python4, sure would take the heat out of the 3 vs 2 debates. And maybe there’d be a program called twentyfour as a result.
 
C

Chris Angelico

Personally, I wish they’d start python4, sure would take the heatout of the 3 vs 2 debates. And maybe there’d be a program called twentyfour as a result.

Learn All Current Versions of Python in Twenty-Four Hours?

ChrisA
 
C

Chris Angelico

Totally unfair, Steven D'Aprano amongst others would have a head start :)

Heh. I said "Current" specifically to cut out 1.5.2, and also to
eliminate the need to worry about string exceptions and so on. But
mainly just for the pun.

ChrisA
 
C

Christopher Welborn

Hi

What's the problem with Python 3.x? It was first released in 2008, but
web hosting companies still seem to offer Python 2.x rather.

For example, Google App Engine only offers Python 2.7.

What's wrong?...

My last two hosts have offered multiple versions of python.
I upgraded to python 3.3 recently on my site. I guess its easier for
some folks to offer such a thing, it just depends on their setup.

My host also offered Django 1.5 almost immediately after its release,
and the same with 1.6. They give the user options, and if they
break their site by upgrading too early (without migrating code) it's
the user's fault.
 
P

Piet van Oostrum

Travis Griggs said:
Personally, I wish they’d start python4, sure would take the heat out of
the 3 vs 2 debates. And maybe there’d be a program called twentyfour as
a result.

twelve would be sufficient, I would think.
 
T

Tim Chase

Python 2.7 still does everything 99% of us need to do, and we're too
lazy to switch.

And in most distros, typing "python" invokes 2.x, and explicitly
typing "python3" is almost 17% longer. We're a lazy bunch! :)

-tkc
 
M

Mark Lawrence

And in most distros, typing "python" invokes 2.x, and explicitly
typing "python3" is almost 17% longer. We're a lazy bunch! :)

-tkc

For the really lazy the obvious solution is to switch to Windows where
it's simply "py -2" or "py -3".
 
G

Grant Edwards

And in most distros, typing "python" invokes 2.x, and explicitly
typing "python3" is almost 17% longer. We're a lazy bunch! :)

And my touch typing accuracy/speed drops pretty noticably when I have
to use the top row of keys...
 
T

Terry Reedy

The problem with Python 3.x is Python 2.7. ;)
Cute.


Python 2.7 still does everything 99% of us need to do, and we're too
lazy to switch.

While '99' is rhetorical, the statement is accurate for many. The core
devs do not expect such people* to switch until they think they would
benefit, and even then, only to the version that has enough goodies.

* except for authors of widely used libraries ;-), and even then, it
ends up being a matter of whether such authors think they will benefit
from having 3.x users.
 
B

beliavsky

What makes you think anything's wrong? Major changes to any

established piece of software takes a fairly long while to infiltrate.

Lots of COBOL and Fortran 77 still running out there.

I don't think the Fortran analogy is valid.

The Fortran standards after F77 are almost complete supersets of F77, and Fortran compiler vendors handle even the deleted parts of F77, knowing theircustomer base. Therefore you do not need to rewrite old Fortran code to use it with Fortran 95 or 2003 compilers, and you can easily mix old-style and modern Fortran. Later Fortran standards did not invalidate basic syntax such as print statements, as Python 3 did. Python 2 and 3 are incompatible in ways that do not apply to Fortran standards pre- and post- F77.
 
M

Mark Lawrence

I don't think the Fortran analogy is valid.

Later Fortran standards did not invalidate basic syntax such as print statements, as Python 3 did. Python 2 and 3 are incompatible in ways that do not apply to Fortran standards pre- and post- F77.

A good choice to make, the capability to use "from __future__ import
print_function", or whatever the actual thing is, has been available for
years. 2to3 has been available for years, six was released at the end
of June 2010 and there's now future, see http://python-future.org/
Admittedly there's a problem with the porting of code which mixes bytes
and strings, but that's being addressed right now via PEPs 460, 461 and
possibly others.
 
T

Terry Reedy

I don't think the Fortran analogy is valid.

The appropriate analogy for the changes between Python 2.x and 3.x,
which started about 1 and 2 decades after the original Python, are the
changes between Fortran IV/66 and Fortran 77, also about 1 and 2 decades
after the original Fortran. The latter two have a comparable number of
differences. "In this revision of the standard [F77], a number of
features were removed or altered in a manner that might invalidate
previously standard-conforming programs.
https://en.wikipedia.org/wiki/Fortran
Not mentioned in the wiki article is the change in calling convention
from call by value to call by reference (or maybe the opposite). I
remember a program crashing because of this when I tried it with F77.

Overall, there was more churn in Fortran up to F77 than there was in
Python up to 3.0.
The Fortran standards after F77 are almost complete supersets of F77, and Fortran compiler vendors handle even the deleted parts of F77, knowing their customer base. Therefore you do not need to rewrite old Fortran code to use it with Fortran 95 or 2003 compilers, and you can easily mix old-style and modern Fortran. Later Fortran standards did not invalidate basic syntax such as print statements, as Python 3 did. Python 2 and 3 are incompatible in ways that do not apply to Fortran standards pre- and post- F77.

Since 3.0, we have added new syntax ('yield from', u'' for instance) but
I do not believe we have deleted or changed any syntax (I might have
forgotten something minor) and I do not know of any proposal to do so
(except to re-delete u'', which should only be used as a temporary
crutch for 2&3 code).
Python 2 and 3 are incompatible in ways that do not apply to Fortran
standards pre- and post- F77.

As stated above, I disagree with respect to pre-F77 and F77. Did you
actually program in both, as I did?
 
M

MRAB

On 2014-01-17 23:03, Terry Reedy wrote:
[snip]
Since 3.0, we have added new syntax ('yield from', u'' for instance) but
I do not believe we have deleted or changed any syntax (I might have
forgotten something minor) and I do not know of any proposal to do so
(except to re-delete u'', which should only be used as a temporary
crutch for 2&3 code).
There was the removal of backticks.
 
C

Chris Angelico

On 2014-01-17 23:03, Terry Reedy wrote:
[snip]
Since 3.0, we have added new syntax ('yield from', u'' for instance) but
I do not believe we have deleted or changed any syntax (I might have
forgotten something minor) and I do not know of any proposal to do so
(except to re-delete u'', which should only be used as a temporary
crutch for 2&3 code).
There was the removal of backticks.

Wasn't that removed _in_, not _since_, 3.0?

ChrisA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top