Navigating the Transition: Shifting from IronPython to CPython3

I am writing this topic on behalf of Dynamo users who are transitioning from IronPython 2.x to CPython 3. Perhaps this is the most hesitant topic I share :blush:.

Why do we complicate the issue for users during such transitions? I believe there must be a simpler way for users to transition gradually, at least over a span of 1 to 3 years. Both I and those using the Dynamo product in Revit are currently grappling with old maintenance code that may or may not be feasible to rewrite over several years. I understand that CPython 3 is beneficial for databases, incorporating external libraries, and even offers better security than its predecessors.I’m also have topic MachineLearning long time ago . I presume it will take at least 1 to 3 years for the Dynamo team to recognize the shortcomings that the transition imposes on users and ample time to provide patches for those before reaching the users’ hands.

I hope the Dynamo team takes note of this before introducing something new. Before launching a new feature, let’s consider the risks for users and provide comprehensive guidance on how they can transition gradually, avoiding issues that may become irreparable. As a long-time enthusiast of Dynamo, I don’t wish to switch to another software, at least not right now.

If possible, please provide me with any reasonable explanations. I eagerly anticipate feedback and opinions from both the team and users alike. Your insights are highly valued, and I look forward to constructive discussions on this matter.

Best regards.

1 Like

The explanation is simple: Revit, Civil3D, FormIt, Alias, and all the rest of the tools which Dynamo integrates will not ship code that cannot be secured. And Python 2 falls into that bucket as if 2022, so about a year ago now.

To prep for that, the team released CPython3 in Dynamo 2.7 back in July of 2020. Dynamo 2.23 came out in December of 2021, which was the first ‘CPython first’ build. This meant there was a span of about 1.5 years between the switch having to happen before IronPython2 was unsupported and not shipped, not quite the 3 year timeline you wanted, but more than the year you indicated as a minimum.

The team would have given more time if they could, I believe the original goal was to move to ItonPython3 as that would be easier to convert code, however the IronPython3 team took quite awhile to get that built, and in order to keep dynamo available in core applications they had to start work on a CPython integration or pull Python out entirely.

To give even more runway then team also released the IronPython2 package, which serves as a stopgap for where CPython falls short, or where developers don’t have time to build their scripts up. A Dynamo team member also released a package allowing the use of IronPython3 to further help transition to supported environments.

And so at this point the script authors have had 3.5 years to transition over to CPython. And people like me have built, shared, and presented tools to help bulk test Python engines across your script libraries. As a result most Python work can be converted, but there is a bit which cannot.

The bulk of those ‘can’t upgrade’ at this point are related to issues in the underlaying components of Python nor treating .net objects well. These are things which script authors, Dynamo developers, and Autodesk as a company can’t fix. The change has to happen in PythonNet and other underlaying components. No one has a timeline for a fix on those that I am aware of.

While I don’t want to raise additional concerns here, the 2025 product line has a change to .net which means many other tools are apt to need review again. We can’t give a long timeline for that, and cannot bridge with a ‘run it as the old .net’ command. As such the team has been very vocal about this, with multiple ‘please test your content’ communications (there is actually a pinned post as I write this), which developers and script authors should not just take note of but take action on. Try what you can in Dynamo sandbox. If you need Revit or Civil 3D to test your code look to the beta programs thereof.

2 Likes

I can’t wait to see what happen will comming with 2025 version

I would encourage you to check out the Revit beta, as well as the Sandbox builds of Dynamo 3.0, as the most impactful feedback for the Revit development teams are the ones which come in around this stage of the process. :slight_smile: