hpy icon indicating copy to clipboard operation
hpy copied to clipboard

Update supported Python versions (from 3.10 to 3.13)

Open paugier opened this issue 7 months ago • 3 comments

Mostly to check how much it is broken with Python 3.13.

paugier avatar May 16 '25 10:05 paugier

=========================== short test summary info ============================
FAILED test/debug/test_handles_leak.py::test_leak_from_method
FAILED test/test_hpytype.py::TestType::test_HPyDef_METH[debug]
FAILED test/test_hpytype.py::TestPureHPyType::test_builtin_shape[universal]
FAILED test/test_hpytype_legacy.py::TestLegacyType::test_specparam_base[hybrid]
FAILED test/test_hpyfield.py::TestHPyField::test_gc_track[universal]
FAILED test/test_helpers.py::TestHPyModuleAddType::test_with_spec_only[universal]
FAILED test/test_slots_legacy.py::TestLegacySlots::test_nb_ops_inplace[hybrid]
FAILED test/test_hpytype.py::TestType::test_simple_type[universal]
FAILED test/test_slots.py::TestSlots::test_tp_init[universal]
FAILED test/test_hpytype.py::TestType::test_call[universal]
FAILED test/test_hpyfield.py::TestHPyField::test_store_load[universal]
FAILED test/test_helpers.py::TestHPyModuleAddType::test_with_spec_only[debug]
FAILED test/test_slots_legacy.py::TestLegacySlots::test_nb_ops_inplace[hybrid+debug]
FAILED test/test_hpytype.py::TestType::test_HPyDef_METH_IMPL[debug]
FAILED test/test_slots.py::TestSqSlots::test_sq_repeat_and_sq_inplace_repeat[universal]
FAILED test/test_slots.py::TestSlots::test_tp_finalize_gc[universal]
FAILED test/debug/test_handles_leak.py::test_closed_handles[with stacktrace]
FAILED test/test_slots_legacy.py::TestLegacySqSlots::test_sq_concat_and_sq_inplace_concat[hybrid]
FAILED test/test_hpytype_legacy.py::TestLegacyType::test_simple_type[hybrid]
FAILED test/test_hpytype.py::TestType::test_HPyDef_METH[cpython]
====== 20 failed, 699 passed, 1 skipped, 754 warnings in 77.86s (0:01:17) ======

That's not so bad :slightly_smiling_face:

How could one debug such Fatal Python error: Segmentation fault?

paugier avatar May 16 '25 12:05 paugier

I would say let's start by cleaning up the simple issues and then have a look at the scarier one when the dust settles.

One simple route for debugging segfault's is the faulthandler module -- https://docs.python.org/3/library/faulthandler.html. After that it's GDB, I guess?

hodgestar avatar May 16 '25 18:05 hodgestar

I think that all the segfaults are caused by CPython now using bit 2 of tp_flags, which clashes with HPy_TPFLAGS_INTERNAL_IS_HPY_TYPE. Unfortunately, there are no free bits left, so we can't just redo #304...

rlamy avatar Jul 11 '25 15:07 rlamy