Some modules dropping support for Python 2.7

I just saw this on social networks. Should we start worrying about this? is Python 3.0 being taken into account in the current GhPython or RhinoPython development?


I’m personally not worried. We use python in a slightly different way inside of Rhino than the mainstream; that is to provide access to a large .NET SDK (Grasshopper and RhinoCommon).

1 Like

@stevebaer that’s true but, taking into account that the mainstream is moving to 3.0, is there any plan to do the same with Python in Rhino?

Thanks for the reply.

@Angel that’d be up to the IronPython project.

I’m not so sure I agree with that comment. Python 2.7 was created because python 3 adoption has been so slow. Python 3 has been available for eight years now.

If we changed to the 3.0 syntax, it would break a bunch of existing scripts already written for Rhino. Another thing to point out is that we are using IronPython and not CPython. Many libraries written for CPython are not “pure python” and therefore not compatible with IronPython anyways.

My understanding of the reason Python 3.x uptake was so slow was library conversion was not being pursued very quickly. According to current comments on Code Project and other sources, most of the important Python libraries are available for 3.5 now so the enthusiasm level is increasing. I’m nothing more than a Python groupie, so can’t comment on how this might relate to Rhino, but maybe it is time for a fresh evaluation of 3.5 merits with respect to Rhino?

Again, it is up to IronPython to also actually have a 3.x implementation. AFAIK it doesn’t, so it’s not that relevant until it does.

Partially true, the IronPython team has done some 3.0 work but it is not at an official release point yet. That said, I would need a strong reason to switch syntaxes since it will likely break many existing scripts.

I get that. My thoughts came from the assumption that coders inside Rhino-Python world are a little bit isolated from common python development world (because IronPython, which gives us another amazing features impossible without it) and if everybody is moving forward, perhaps this isolation could grow in the future.

Like you said that is up to IronPython project, what I’m asking here is if Mcneel team is concerned/aware of this and if this is in fact important or just a minor problem (or not a problem at all), like @stevebaer suggested. Right now I can pick any of most of the books published since today or any tutorial or post in Stackoverflow about python and apply what I found to my scripts in Rhino. If this is not going to change I’m not worried at all about this movement towards Python 3.0.

Thanks @stevebaer & @nathanletwory for the opinions and comments. I jut wanted to bring this up and learn about your opinions on this topic plus what thinks Mcneel about it.

The biggest question here is whether such a move (assumption: it is possible) would be useful. As it is I guess the Python scripting API is good, and a big change indeed would break quite a few scripts - not that it is hard to move from 2.7 to 3.x. Note that I haven’t scripted much in Rhino+Python (one small script of ~10 lines sofar, nothing too special).

Personally, I have been there when we moved from Python 2.x to 3.x in Blender. We were the first big project moving to 3.x, probably the entire world thought we were foolish :wink: Many scripts indeed did break, and users did moan for a while. But in the end all useful scripts got converted very quickly, precisely because the change from 2.x to 3.x wasn’t that big. But in cases like this it is always a question of resources. Both on the side of the integrator and the users. Safest path for Rhino in this case I think would be to stick to 2.x, as it means little resource demand increase.


1 Like

Isn’t the support for python 2.7 being dropped in 2020?

I know that Iron-python is a separate project, but still that would probably affect libraries ported/implemented in iron-python.

any plans to break out of the .net world?(that is probably crazy amount of work).

It seems as well it is a lot of work to maintain iron-python and its libraries. (are C implemented python libraries even supported in Iron-python?).

Hey guys how is this topic evolving (looking to RH7)? Any news?


Nothing has changed at this point for the built-in interpreter.

You can run Rhino 7 inside of CPython 3