[Python-ideas] from __past__ import division, str, etc
Steven D'Aprano
steve at pearwood.info
Wed Jan 8 23:01:05 CET 2014
On Wed, Jan 08, 2014 at 05:22:02PM +0100, Alejandro López Correa wrote:
[...]
> Anyway, I understand it is not a clean way to proceed, but something along
> these lines might be the only way to speed up the adoption of python 3
One assumption in this discussion, and the various related discussions
on Reddit and other places, is that adoption of Python 3 is too slow and
needs to be sped up. I don't believe this is true. I believe adoption
is just right and exactly what should be expected.
Alex Gaynor wrote a blog post a week or so ago claiming that, five years
since Python 3 was first released, everyone should have migrated by now
and that since only "five percent" (a figure which I believe he pulled
out of thin air) have migrated, Python 3 has been a failure.
I challenge that belief. I've been hanging around here and on the
Python-Dev list for a long time, and while I can't find any official
pronouncement, the sense has always been that Python 3 adoption will
take ten years, not five. (That's my recollection -- if any of the core
developers wish to correct me, please do.) Rates of adoption are much,
much higher than gossip on the Internet suggests. About 70% of the top
200 projects on PyPI support Python 3, and downloads of Python 3 are
very healthy, possibly even higher than downloads of Python 2. On the
tutor list, I see a significant number of beginners using Python 3.
It seems to me that given the circumstances, Python 3 adoption is right
where we should expect it to be half-way through a decade-long process.
There will be a period at the start when hardly anyone will migrate,
then a period of accelerating migration, which will accelerate further
when the mainstream Linux distros start shipping Python 3 as their
system Python (ArchLinux is not mainstream, but Fedora is planning the
change), followed by a sudden rush in another four or five years when
people realise that Python 2.7 becoming unmaintained is no longer a
distant prospect but is about to happen.
For many people, waiting until the last minute is the most sensible
thing that they can do. This gives time for the early adoptors to
discover and iron out all the wrinkles and difficulties. Rather than
approaching this as "Python 3 has been a failure, what can we do to save
it?" we should be approaching this as "Python 3 has been a success, what
lessons can we take from the early adoptors to make it even easier for
the next wave of adoptors?"
"from __past__ import spam" does not make it easier to adopt. It just
makes it easier to *put off adopting*.
> and minimise the risk of defection to other languages.
People threaten that, but it is an irrational threat. (Mind you, people
do silly, irrational things every day.) If you think its hard to migrate
from Python 2 to 3, when you get to keep 90% of your code base and most
of the backward-incompatible changes are a few libraries that have been
renamed and a handful of syntax changes, how hard will it be to throw
away 100% of your code and start again with a completely different
language?
--
Steven
More information about the Python-ideas
mailing list