Home Help Center

Support for Python 3.x ... scheduled?

molimoli Member Morten LindOrganization: Norwegian University of Science and TechnologyProject: Distributed real-time manufacturing control.
Hi ZeroC

I have been trying to search for Ice and Python 3.x. Nothing. However, the search is pretty muddled by searching for Ice and something with "3" obviuosly gives a lot of hits. So, after some time spent searching, I decided to risk spamming the forum. (In that case, sorry about that.)

The main questions: Are there any work on supporting Python 3.x in Ice? If so, what is the release schedule?

Background: In my current project, involving the Blender Game Engine and heavy use of NumPy, everything is tied together with Ice and everything is coded in Python. With the release of Blender 2.5, supporting only Python 3.x, I have been waiting for the release of NumPy 1.5, that also supports Python 3.x. The last thing that blocks my whole upgrade is Ice, and it makes me a bit worried that I find no mention of Ice and Python 3.x.

Best regards, and thanks for superb software,
Morten Lind.

Comments

  • mmarquarmmarquar Member Malte MarquardingOrganization: CSIROProject: Australian SKA Pathfinder software development
    Can anybody answer this question?
  • molimoli Member Morten LindOrganization: Norwegian University of Science and TechnologyProject: Distributed real-time manufacturing control.
    I got an answer by finally contacting a ZeroC staff member, after waiting for an answer to this thread for a considerable amount of time. Basically the answer was: "With Python 2.X being the versions used in practice, and without any specific funding for the task, they will not port to Python 3.X."

    So, we just have to wait for Python 3.X to gain widespread use.
  • molimoli Member Morten LindOrganization: Norwegian University of Science and TechnologyProject: Distributed real-time manufacturing control.
    Dear ZeroC staff and developers.

    At the time of writing, Python version 3.1.3 is in Debian stable. I understand this as Python 3 is supported and used in practice, though, at the moment, with Python 2 still in more frequent use.

    In the light of this, I would like to have an indication of the rough schedule of supporting Python 3 in ZeroC Ice. I am at no position to sponsor such activity, and neither do I "demand" that you undertake it by yourselves for free. All I am inquiring is to what your status is, towards supporting Python 3, and I will be grateful if you will answer this.

    In case you, at this point of progress of Python 3, have paid no consideration to the matter at all, I would take that as an indication that Python will not get any future support. Thus I would conclude, with sadness, that I am in need of another communication middlware. Without any indication I am in a kind of development-limbo ...

    Best regards,
    Morten Lind.
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Morten,

    The situation has not changed in the past few weeks. I am sure we will support Python 3 one day; when depends on interest for commercial projects, and on how quickly Python 3 becomes widely used and supported by other products.

    The availability of Python 3 in Debian is not that significant since we do not support Ice on Debian. Python 3 support in the latest version of Red Hat Enterprise Linux or SuSE Linux Enterprise Server would have more weight.

    If you really need Ice for Python 3 as soon as possible and don't have the budget to sponsor such support, you could try to implement it yourself. Ice is an open-source product, with all its source-code (including build system, test suite etc) available from our download page.

    Best regards,
    Bernard
  • molimoli Member Morten LindOrganization: Norwegian University of Science and TechnologyProject: Distributed real-time manufacturing control.
    Hi Bernard.

    Thanks for the fast reply and the positive signals. I do understand the reasonning for the low priority the task is given by you at ZeroC.

    Yes, I have considered getting my hands dirty, and may start investigating the complexity and magnitude of the task. I would love to be able to contribute to Ice, and hope to get the opportunity.

    Best regards,
    Morten Lind.
  • HanHan Member Han GenuitOrganization: FOM RijnhuizenProject: Database for Magnum PSI (plasma research).
    Hi Morten, if you are planning to implement Ice for Python yourself, you might want to take a look at Cython (http://www.cython.org/). It now supports C++ and makes life for a Python programmer dabbling in C-stuff a lot easier. It also supports seamless integration into Python 2.3 to 3.2, without extra effort.

    I would also be interested in extended NumPy support in Ice, so if you want to work on it, I'd gladly contribute. :)

    Regards,
    Han
  • molimoli Member Morten LindOrganization: Norwegian University of Science and TechnologyProject: Distributed real-time manufacturing control.
    Hi Han

    That was really amazing, Cython. I wonder why I haven't come across it previously. I an developing a robot motion control framework in Python, where the computation time troubles may arise in the control step computation, running in 100Hz. We have some robots that are quite intolerant, with pretty tight deadlines, and it is a challenge to use Python for it; not just the lack of real-time features, but also because of computation time. Cython may clearly help here.

    However, regarding Ice, I seem to understand from the association to Cython, that you suggest to re-implement Ice with Cython in .pyx? I was planning to try to do the necessary code modifications in the Ice code, to be able to build for Python 3.x.

    Please tell me in a bit more detail what you were considering.

    Best regards,
    Morten.
  • HanHan Member Han GenuitOrganization: FOM RijnhuizenProject: Database for Magnum PSI (plasma research).
    Hi,

    The IcePy bindings from ZeroC are a kind of Python C-API wrapping layer around the C++ implementation of Ice, with utility code to convert and handle datatypes from Ice to Python. All of this code is hand-crafted and difficult to port to other C-API versions of Python, like Python 3.
    The beauty of Cython is that it can import the C++ code directly; you can write your own thin layer around the C++ classes in a very Pythonic manner and leave the C-API stuff up to the Cython compiler. That way you would save yourself a lot of headache in porting IcePy to Python 3, while at the same time you can integrate all kinds of nice features into the code at C-level. (Like NumPy array support, extended buffer support, custom compression, and cool Ice features like IceGrid for instance.)

    Because the Ice architecture is already very object-oriented, you could use the same approach for a custom binding.. Well, that was what I had in mind, at least..

    I haven't played with the C++ integration of Cython yet, but it should be doable: Using C++ in Cython — Cython v0.14.1 documentation.

    Anyway, I thought it might be a fun challenge to implement Ice for Python through Cython, that's all. ;)

    Regards,
    Han
  • molimoli Member Morten LindOrganization: Norwegian University of Science and TechnologyProject: Distributed real-time manufacturing control.
    It seems that you have a pretty good grip on the task. I'll be available for diving into it, when I have submitted my phd-thesis in a couple of weeks.

    Just ran some tests with Cython. I'm really impressed!

    I'll get back in touch. Best regards,
    Morten.
Sign In or Register to comment.