If you encounter segmentation faults when running pytest in a Python 3.14 free-threading environment, it is likely caused by C-extensions (like pyteomics.cmass or pyyaml) compiled with an outdated version of Cython.
Fix: Ensure Cython is at least version 3.3.0 before installing dependencies.
- Upgrade Cython:
pip install "cython>=3.3.0" - Reinstall affected packages (e.g., pyteomics) to trigger a rebuild against the new Cython version.
When running pytest after upgrading Cython, if pyximport fails with a compilation error regarding __pyx_vectorcallfunc in dynamically generated .c files, the .pyxbld cache contains stale C files generated by the old Cython version.
Fix:
Clear the pyximport build cache to force regeneration of the C files:
rm -rf ~/.pyxbld