Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernizing Python Runtimes #2124

Open
bagnier opened this issue Mar 3, 2024 · 3 comments
Open

Modernizing Python Runtimes #2124

bagnier opened this issue Mar 3, 2024 · 3 comments
Labels
New Feature New feature request [class->Implemented #{number}: {title}]

Comments

@bagnier
Copy link

bagnier commented Mar 3, 2024

I've been following the discussions about the new major version of pyRevit, particularly noting the efforts to migrate to .NET Standard or Core. I believe this may present an opportune moment to modernize the Python Runtimes.

I would love to find in PyRevit 5 a major upgrade to utilize a modern Python 3.12 runtime, enabling seamless interoperability with pip and opening pyRevit to a broader community of developers. This transition would empower developers to leverage the extensive Python ecosystem to create more powerful and communicative add-ins.

Currently, pyRevit ships with IronPython 2.7 and 3.4, both of which are old and unmaintained, while the IronPython project itself not progressing. The next major revision of pyRevit might be a good time to mark IronPython as deprecated and to use Cpython by default.

pyRevit includes CPython 3.8, which, while functional, is aging and will reach end-of-support in October 2024. This older version limits PyRevit's integration with the wider Python ecosystem through tools like pip, hindering its potential for expansion and collaboration. It appears that pyRevit relies on PythonNet to bind with the Common Language Runtime (CLR). While PythonNet is compatible with Python 3.12, the version currently integrated into PyRevit lags significantly behind the upstream, potentially due to compatibility issues. Addressing this discrepancy would be crucial in ensuring pyRevit's compatibility with modern Python runtimes. I understand from discussions on the pyRevit Discourse that there have been challenges with CPython support, with plans to rectify them in the next major version. I wish to help resolving these issues and would appreciate insights into the current status and roadmap for improving CPython integration.

In summary, I hope the time has come to mark as deprecated outdated Python runtimes, embrace modern Python 3.12, and enhance interoperability with the wider Python ecosystem. This initiative would mark a significant milestone in pyRevit's evolution, making it more robust, accessible, and future-proof.

Looking forward to discussing and collaborating on this exciting endeavor.

@bagnier bagnier added the New Feature New feature request [class->Implemented #{number}: {title}] label Mar 3, 2024
@sanzoghenzo
Copy link
Contributor

Hi @bagnier, thanks for sharing your thoughts!

Indeed we planned to update the current python engines, but we haven't discussed about making the cpython engine the default one (I personally don't like doing that, unless we can extensively test and assert that everything works as expected, something that didn't work well for Dynamo, IMHO)

I already got rid of old engines (except for ipy 2711 and cpy 385) in the develop branches, and the next step will be to add the most updated ones.

These days I'm investigating on how to solve the current issues related to the cpython engine (it's not the engine itself, it's mainly how it is managed by pyrevit), and I will gladly make use of an extra pair of eyes! 😉

You are more than welcome to join us on the next virtual meeting to discuss this topic, you can find all the info in the announcement at the top of the forum page

@jj-github-jj
Copy link

cpython as default version not a good idea because cypthon not supported well and crashes so often when used with pyrevit that I have abandoned using it even though I really would have liked to use cpython because it should have access to more of the python ecosystem.

@bagnier
Copy link
Author

bagnier commented Mar 4, 2024

Thank you both for the feedback and insights. I'll definitely catch the video of the meetup and look forward to contributing further to the discussions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Feature New feature request [class->Implemented #{number}: {title}]
Projects
None yet
Development

No branches or pull requests

3 participants