[IPython-dev] [sympy] Treating Python 3 as a first-class citizen
Bradley M. Froehle
Tue Aug 6 00:59:59 CDT 2013
On Mon, Aug 5, 2013 at 9:05 PM, Ondřej Čertík <firstname.lastname@example.org> wrote:
> On Mon, Aug 5, 2013 at 9:24 PM, Aaron Meurer <email@example.com> wrote:
>> On Mon, Aug 5, 2013 at 1:40 PM, Thomas Kluyver <firstname.lastname@example.org> wrote:
>>> On 5 August 2013 19:32, Ondřej Čertík <email@example.com> wrote:
>>>> Though the PEP above says that eventually "python" should point to python
>>> Debian developers are strongly against ever making that change. It's
>>> possible that they'll change their minds in a few years, but I wouldn't bank
>>> on it.
>> They will change their minds. I thought that Arch was stupid making
>> "python" point to Python 3, but that was because at the time, no
>> libraries were Python 3 compatible. Nowadays, all major libraries are
>> compatible. In the future, Python 2 will be defunct, and it will be
>> stupid to never call Python "python".
> I think so too.
I have to think that this will eventually be the case as well,
but even very recent conversations  on the debian-python list
suggest that many outright reject the notion that `python` would
ever launch Python 3.
>> Once you switch to a single codebase, you start to see things
>> differently. Python 3 is just another version of Python. Supporting
>> Python 2.6 - 3.3 is no different than supporting Python 2.4 - 2.7.
>> The Python community made a big fuss about it, but I think that was a
>> mistake, and it has kept people from transitioning.
> Exactly. I recently wrote this blog post:
> and I got a lot of feedback --- and unless I missed any, everybody
> agreed that "of course, single code base is the way to go" and "of
> course, Python 3.x is just another version of Python, with single code
> base there is no difference in supporting 2.6-2.7 or 2.6-3.3", as
> Aaron said.
I agree with the general sentiment that a single code base is
preferable. In terms of the install process I'd expect that
eventually we'll just install a `ipython` script which uses the
same interpreter as during installation. Distributions which want
a ipython3.3 script can clean up what we do in post-processing.
As you mentioned, it's nearly impossible to develop using Python
3 in these projects which require 2to3 translation. I struggled
with this a year ago when trying to develop IPython using Python
3. Among other things, I ended up writing a rather crazy
'Runtime 2to3'  meta path hook which could do a (cached) 2to3
conversion on the fly.
We've discussed making IPython natively support 2.x and 3.x in
the same code base [3,4], and while I don't see it on the roadmap
, its probably in several developers' minds in the somewhat
distant future. At the moment the lack of unicode literal support
in Python 3.2 is pretty much a showstopper, but once we require
Python >= 3.3 I don't see a technical reason why we couldn't have
a unified code base.
In the mean time, we should continue the judicious examination of
issues like this one which improve Python 3 end user experience
because Python 3 is the future and we are all going to have to
migrate there eventually.
More information about the IPython-dev