-
Notifications
You must be signed in to change notification settings - Fork 750
Officially support Python 3.9 #1389
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
Comments
The latest release 2.5 already supports Python 3.9 see [2.5.2] (https://github.com/pythonnet/pythonnet/releases/tag/v2.5.2). Version 3.0.0 is still in development. |
Ye, but when I took a look at PyPi, Python3.9 is not written as supported. |
After backporting the Python 3.9 support from master to the 2.5 branch, I noticed crashes in CI (I don't remember the details right now). That's why, even though the support is nominally there, I didn't publish the respective wheels and didn't update the trove specifier. You are welcome to give debugging this a go, development happens on master, though, we haven't done any release planning for 3.0 yet. |
@filmor considering our current master also has crashes on 3.9, random crashes in v2.5 on Python 3.9 could be related. We should consider 3.9 support in v2.5 as-is, e.g. support installation, but not necessarily fix all crashes. |
@lostmsu, is there a recipe for reproducing the current master 3.9 crashes? |
They happen in CI occasionally in both Ubuntu and MacOS with the normal shutdown mode. |
Weird, |
Is there a stack trace? Also, which platform? |
I haven't tried to reproduce it yet. I was just looking at the CI run you linked to. |
The CI crash shows this stack trace:
I noticed in
Does |
That's a very good observation. https://docs.python.org/3/c-api/init.html#c.PyGILState_Release |
@Jeff17Robbins unfortunately, this is not the culprit: https://github.com/pythonnet/pythonnet/pull/1397/checks?check_run_id=1967913124#step:13:144 |
@lostmsu I see a completely different stack trace of a crash on Ubuntu and Macos. What's the difference between the "Soft" tests and the "Normal" tests? And...how hard would it be to upgrade to Python3.9.2 to see if it is still a problem with that minor release of CPython? |
@Jeff17Robbins it's The issue reproduces with different Python minor versions. |
@lostmsu is there a writeup of |
@Jeff17Robbins soft shutdown mode tries to preserve live CLR objects referenced by Python in order to be able to restore them upon the reinitialization of The code in |
On my Windows 10 machine, v2.5.2 built by Christoph Gohlke always fails to import in Python 3.9:
|
Hello, one of our internal frameworks at the company I work at depends on pythonnet. But pythonnet not having wheels for Python 3.9 prevents our users from using Python 3.9. We are on Windows 10 platform. Is there anything I can do to help for the Python 3.9 release of pythonnet? I am not familiar with pythonnet or CPython internals but I can maybe try compiling something using Visual Studio and report logs or run a test suit? |
@canol there's now a preview pip package for pythonnet 3.0, that supports Python 3.9 and 3.10 |
@lostmsu, the preview pip package for pythonnet 3.0 (I have 3.0.0a2) won't run the demo scripts (helloform.py, splitter.py, or wordpad.py). There are failures with generics and not recognizing 1 and 0 as Boolean. Converting 1 and 10 to True and False helps with helloform.py and splitter.py, but I haven't been able to fix wordpad.py because the error messages are too obscure for me:
Obviously this is a Boolean-related error message but I have no clue where to start looking. |
Environment
Details
My project EddingtonGUI is dependant on Pythonnet. I wanted for quite some time to update it to use Python 3.9 as default, but I noticed that you don't support it yet.
When are you planning on officially supporting Python 3.9? What prevents you from currently supporting it?
I'm asking so I could update my release scheduling accordingly.
Thank you!
The text was updated successfully, but these errors were encountered: