-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Python 3.13 support #16851
Python 3.13 support #16851
Conversation
The Fedora 41 is temporarily added to the CI to get test coverage for Python 3.13, but once the PR is shown to do what it should, the CI commit will be removed. |
c9cc9c4
to
416dc72
Compare
With Python 3.13, some lookup methods like `PyMapping_GetItemString` and `PyObject_GetAttrString` became more strict. They are now always throwing an exception in case the attribute is not found. To make these optional lookups work again, the `GetOptional` family of functions needs to be used. See: * https://docs.python.org/3/c-api/object.html#c.PyObject_GetOptionalAttrString * https://docs.python.org/3/c-api/mapping.html#c.PyMapping_GetOptionalItemString
The failures on Fedora are all gone! Except for the expected one. Hence, I'll leave the Fedora 41 commit in this PR and restart the tests one more time. |
Test Results 13 files 13 suites 2d 10h 21m 21s ⏱️ For more details on these failures, see this check. Results for commit a0b526c. |
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.
Thank you! Feel free to merge once the CI is green
PyObject _CPyCppyy_NullPtrStruct = {_PyObject_EXTRA_INIT | ||
// In 3.12.0-beta this field was changed from a ssize_t to a union | ||
#if PY_VERSION_HEX >= 0x30c00b1 | ||
{1}, | ||
#else | ||
1, | ||
#endif | ||
&PyNullPtr_t_Type}; | ||
PyObject _CPyCppyy_NullPtrStruct = { | ||
_PyObject_EXTRA_INIT | ||
1, &PyNullPtr_t_Type | ||
}; | ||
|
||
PyObject _CPyCppyy_DefaultStruct = {_PyObject_EXTRA_INIT | ||
// In 3.12.0-beta this field was changed from a ssize_t to a union | ||
#if PY_VERSION_HEX >= 0x30c00b1 | ||
{1}, | ||
#else | ||
1, | ||
#endif | ||
&PyDefault_t_Type}; | ||
PyObject _CPyCppyy_DefaultStruct = { | ||
_PyObject_EXTRA_INIT | ||
1, &PyDefault_t_Type | ||
}; |
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 removes the changes done by @silverweed to avoid compiler warnings...
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.
Ah! I have to re-introduce it then, also adding a patch file. Then I won't accidentally revert it anymore
A regression in ROOT 6.32 was unearthed in the process: #16852.