- Notifications
You must be signed in to change notification settings - Fork767
Python 3.14#2611
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Python 3.14#2611
Conversation
kunom commentedOct 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Some subjective feedback from my Windows machine with VS 2022:
|
guywithface commentedOct 16, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Also had to replace the target framework from net6.0 to net8.0. Also some feedback for .net 8:
And now getting an access memory violation for PyGC_Collect(); in Runtime.cs |
filmor commentedOct 23, 2025
Status report: After applying the alignment "fix" (thanks!), things work for the most part. There are some crashes in explicit garbage collection, so I have disabled those tests for now. |
filmor commentedOct 24, 2025
Also, we currently apparently have a weird inheritance order for our meta type, which leads to it using the |
kunom commentedOct 31, 2025
@filmor As the CI seems to be pretty broken ( Things not clear to me:
Thanks ;-) |
filmor commentedOct 31, 2025
There you go. There are still pending issues with the embedding tests that are being worked on in#2638, but I'd be fine with releasing a wheel if we get to the point that all Python tests run through without crashes on 3.14. |
This comment has been minimized.
This comment has been minimized.
filmor commentedDec 7, 2025
This is the issue that we run into with the |
filmor commentedDec 7, 2025
@lostmsu Please have a look. It will require quite a bit more work to get everything green again (CI-wise, in particular around the embedding), but with these changes, we should be able to release a wheel for Python 3.14. |
027eb12 to7ca54ffCompare
lostmsu left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, minor comments only.
I noticed a few files have been reformatted (whitespace only). Perhaps undo that. Technically all reformatting should be in separate commits mentioned in.git-blame-ignore-revs
.github/workflows/main.yml Outdated
| -name:Embedding tests (.NET Core) | ||
| run:dotnet test --runtime any-${{ matrix.os.platform }} --framework net8.0 --logger "console;verbosity=detailed" src/embed_tests/ | ||
| if:always() | ||
| if:false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can't we limit the skip to 3.14?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
This is a leftover, will reactivate the tests today.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
47378be to3af5779CompareNot at all sure why this helps, but when assigning `None` instead, theobject is gone at the time of garbage collection.
- The first two run into issues because our meta type's `tp_getattro` is not overridden by its subclasses- The last runs into a `PyErrOccurred` when trying to access its `__len__`, related to our sequence decoding logic
In Python 3.14, the objects __dict__ seems to already be halfdeconstructed, leading to crashes during garbage collection.Since gc in Python is single-threaded (I think :)), it shouldbe fine to have a single static for this. If that is not true,we can always use a thread-local instead.
Python 3.14 introduced a new assertion that prevents us from usingPyObject_GenericSetAttr directly in our meta type. To work aroundthis, we manipulate the type dict directly.This workaround is a simplified variant of Cython's workaround fromcython/cython#6325.The relevant Python change is inpython/cpython#118454
Uh oh!
There was an error while loading.Please reload this page.
Main changes:
ht_token2533df1 (can also skip this, was a red herring)tp_clearworkaround forsubtype_clear can not be called from derived types python/cpython#89429 to .NET (4403d4f)PyObject_GenericSetAttrblocking in Python 3.14 (9472f7d)TODO:
tp_setattroinstead of the generic one