Closed mgorny closed 4 days ago
I have a feeling that this is a PyO3 issue and that updating PyO3 to 0.22.x could potentially fix it.
I'm afraid I don't really know Rust, and my quick attempts at upgrading pyo3 there failed. If there's anything you wish me to test, please let me know.
I think we have enough information to fix on our side. You are attempting to build from source, which in general will limit the latest Python you can build with. Most of our downstream users download binaries that we build with Python 3.8 and test with 3.8 to 3.12
Oh, that's interesting. The stable ABI wheel (both build via python -m build
and downloaded from PyPI) crashes as well.
Ah, sorry, I've just noticed the same failure in another package that worked previously, and I see that it's a regression with Python 3.13.0b3 (compared to b2). I've filed https://github.com/PyO3/pyo3/issues/4309 for that.
That said, if I downgrade to 3.13.0b2 some tests pass and some crash with another assertion.
tests/digraph/test_adjacency_matrix.py::TestDAGAdjacencyMatrix::test_graph_to_digraph_adjacency_matrix python3.13: ./Include/internal/pycore_object.h:284: _PyObject_Init: Assertion `_PyType_HasFeature(typeobj, Py_TPFLAGS_HEAPTYPE) || _Py_IsImmortal(typeobj)' failed.
Fatal Python error: Aborted
That said, I think it's better to wait for the immediate issue to be fixed. If you upgraded to pyo3 0.22.0, I'd be happy to test again.
It turns out it's a change in CPython 3.13 that PyO3 wasn't adjusted for — but since it also affects the stable ABI, CPython upstream has prepared a revert for the failing assertion, and I've confirmed that it fixes the problem with rustworkx.
As for the other issues with CPython 3.13, I'm going to look into them later. However, given stable ABI, I think they'd also be CPython or PyO3 bugs.
It turns out it's a change in CPython 3.13 that PyO3 wasn't adjusted for — but since it also affects the stable ABI, CPython upstream has prepared a revert for the failing assertion, and I've confirmed that it fixes the problem with rustworkx.
As for the other issues with CPython 3.13, I'm going to look into them later. However, given stable ABI, I think they'd also be CPython or PyO3 bugs.
Thanks for finding an ABI regression on the Python interpreter! This would have been a huge headache, you caught it early on
Information
--with-assertions
What is the current behavior?
The test suite crashes immediately after starting:
Backtrace from gdb
``` #0 0x00007f35bd3d75ac in ?? () from /usr/lib64/libc.so.6 #1 0x00007f35bd380816 in raise () from /usr/lib64/libc.so.6 #2 0x0000556107bfe26c in faulthandler_fatal_error (signum=6) at ./Modules/faulthandler.c:338 #3What is the expected behavior?
Tests passing.
Steps to reproduce the problem
--with-assertions
.rustworkx
(I've usedsetup.py build_rust -i -d
).pytest
(I've used-s
to get the error message in output).