Skip to content

Compatibility with Python 3.14 #426

@avalentino

Description

@avalentino

Apparently pysph is not compatible with Python 3.14.
Trying to run the test suite I get the same results:

python3.14 -m pytest -k "not test_sph_evaluator and not TestInterpolator and not test_get_points_from_mgrid and not test_get_surface_points_uniform and not test_compressed_octree_has_lesser_depth_than_octree and not test_parallel_compressed_octree_has_lesser_depth_than_parallel_octree and not test_ldcavity_example and not test_dump_xdmf and not OctreeGPUNNPS2DTestCase and not OctreeGPUNNPSDouble2DTestCase and not OctreeGPUNNPSTestCase and not OctreeGPUDoubleNNPSTestCase and not OctreeGPUNNPSWithSortingTestCase and not OctreeGPUNNPSWithPartitioningTestCase and not TestAccelerationEval1DGPUOctree" 
============================= test session starts ==============================
platform linux -- Python 3.14.0, pytest-8.4.2, pluggy-1.6.0
rootdir: /build/reproducible-path/pysph-1.0~b2
configfile: tox.ini
plugins: typeguard-4.4.4
collected 1046 items / 200 deselected / 846 selected

pysph/base/tests/test_device_helper.py ..s..s..s..s..s..s..s..sFFsFFsFFs [  3%]
FFsFFsFFs..sFFs..sFFs.                                                   [  6%]
pysph/base/tests/test_domain_manager.py FFFFFFFFFFFF                     [  7%]
pysph/base/tests/test_kernel.py ........................................ [ 12%]
.................................................................        [ 20%]
pysph/base/tests/test_linalg3.py .......                                 [ 21%]
pysph/base/tests/test_neighbor_cache.py F..F                             [ 21%]
pysph/base/tests/test_nnps.py .......................................... [ 26%]
.....................FFFFFFFFFFFFFF.............................xx...x.x [ 35%]
x...xFFFFFFFsssssss.......FFFFFFFsssssssFFFFFFFsssssss.....xxFFFFFFFFFFF [ 43%]
FFF........FFFFFFFF....Fatal Python error: Segmentation fault

Current thread 0x00007fa0c2fef100 [python3.14] (most recent call first):
  File "/build/reproducible-path/pysph-1.0~b2/.pybuild/cpython3_3.14/build/pysph/base/tests/test_nnps.py", line 1219 in _make_particles
  File "/build/reproducible-path/pysph-1.0~b2/.pybuild/cpython3_3.14/build/pysph/base/tests/test_nnps.py", line 1183 in test_nnps_sorts_with_valid_gids
  File "/usr/lib/python3.14/unittest/case.py", line 615 in _callTestMethod
  File "/usr/lib/python3.14/unittest/case.py", line 669 in run
  File "/usr/lib/python3.14/unittest/case.py", line 725 in __call__
  File "/usr/lib/python3/dist-packages/_pytest/unittest.py", line 351 in runtest
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 178 in pytest_runtest_call
  File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 121 in _multicall
  File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 512 in __call__
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 246 in <lambda>
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 344 in from_call
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 245 in call_and_report
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 136 in runtestprotocol
  File "/usr/lib/python3/dist-packages/_pytest/runner.py", line 117 in pytest_runtest_protocol
  File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 121 in _multicall
  File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 512 in __call__
  File "/usr/lib/python3/dist-packages/_pytest/main.py", line 367 in pytest_runtestloop
  File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 121 in _multicall
  File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 512 in __call__
  File "/usr/lib/python3/dist-packages/_pytest/main.py", line 343 in _main
  File "/usr/lib/python3/dist-packages/_pytest/main.py", line 289 in wrap_session
  File "/usr/lib/python3/dist-packages/_pytest/main.py", line 336 in pytest_cmdline_main
  File "/usr/lib/python3/dist-packages/pluggy/_callers.py", line 121 in _multicall
  File "/usr/lib/python3/dist-packages/pluggy/_manager.py", line 120 in _hookexec
  File "/usr/lib/python3/dist-packages/pluggy/_hooks.py", line 512 in __call__
  File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 175 in main
  File "/usr/lib/python3/dist-packages/_pytest/config/__init__.py", line 201 in console_main
  File "/usr/lib/python3/dist-packages/pytest/__main__.py", line 9 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main

Current thread's C stack trace (most recent call first):
  Binary file "python3.14", at _Py_DumpStack+0x4a [0x471b89]
  Binary file "python3.14" [0x4eb56f]
  Binary file "/lib/x86_64-linux-gnu/libc.so.6", at +0x3fdf0 [0x7fa0c302fdf0]
  Binary file "/build/reproducible-path/pysph-1.0~b2/.pybuild/cpython3_3.14/build/pysph/base/stratified_hash_nnps.cpython-314-x86_64-linux-gnu.so", at +0x11e84 [0x7fa0be93ee84]
  Binary file "/build/reproducible-path/pysph-1.0~b2/.pybuild/cpython3_3.14/build/pysph/base/nnps_base.cpython-314-x86_64-linux-gnu.so", at +0x3520d [0x7fa0c207d20d]
  Binary file "/build/reproducible-path/pysph-1.0~b2/.pybuild/cpython3_3.14/build/pysph/base/stratified_hash_nnps.cpython-314-x86_64-linux-gnu.so", at +0xf294 [0x7fa0be93c294]
  Binary file "python3.14", at _PyObject_MakeTpCall+0x282 [0x516492]
  Binary file "python3.14", at _PyEval_EvalFrameDefault+0xe9fb [0x542ffb]
  Binary file "python3.14" [0x572bc4]
  Binary file "python3.14" [0x5d0818]
  Binary file "python3.14" [0x58adf9]
  Binary file "python3.14", at _PyEval_EvalFrameDefault+0x4781 [0x538d81]
  Binary file "python3.14" [0x572bc4]
  Binary file "python3.14" [0x51de3e]
  Binary file "python3.14" [0x6152df]
  Binary file "python3.14", at _PyObject_MakeTpCall+0x36c [0x51657c]
  Binary file "python3.14", at _PyEval_EvalFrameDefault+0x65a0 [0x53aba0]
  Binary file "python3.14" [0x572bc4]
  Binary file "python3.14" [0x51de3e]
  Binary file "python3.14" [0x6152df]
  Binary file "python3.14" [0x58ad7d]
  Binary file "python3.14", at _PyEval_EvalFrameDefault+0x4781 [0x538d81]
  Binary file "python3.14" [0x572bc4]
  Binary file "python3.14" [0x51de3e]
  Binary file "python3.14" [0x6152df]
  Binary file "python3.14", at _PyObject_MakeTpCall+0x36c [0x51657c]
  Binary file "python3.14", at _PyEval_EvalFrameDefault+0x65a0 [0x53aba0]
  Binary file "python3.14" [0x572bc4]
  Binary file "python3.14" [0x51de3e]
  Binary file "python3.14" [0x6152df]
  Binary file "python3.14", at _PyObject_MakeTpCall+0x36c [0x51657c]
  Binary file "python3.14", at _PyEval_EvalFrameDefault+0xe9fb [0x542ffb]
  <truncated rest of calls>

Extension modules: numpy._core._multiarray_umath, numpy.linalg._umath_linalg, cyarray.carray, markupsafe._speedups, cython.cimports.libc.math, Cython.Utils, pysph.base.particle_array, pysph.base.point, pysph.base.omp_threads, pysph.base.nnps_base, pysph.base.linked_list_nnps, pysph.base.box_sort_nnps, pysph.base.spatial_hash_nnps, pysph.base.cell_indexing_nnps, pysph.base.z_order_nnps, pysph.base.stratified_hash_nnps, pysph.base.stratified_sfc_nnps, pysph.base.octree, pysph.base.octree_nnps, pysph.base.linalg3, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._pcg64, numpy.random._mt19937, numpy.random._generator, numpy.random._philox, numpy.random._sfc64, numpy.random.mtrand, vtkmodules.vtkCommonCore, vtkmodules.vtkCommonMath, vtkmodules.vtkCommonTransforms, vtkmodules.vtkParallelCore, vtkmodules.vtkCommonDataModel, vtkmodules.vtkCommonExecutionModel, vtkmodules.vtkCommonMisc, vtkmodules.vtkFiltersCore, vtkmodules.vtkRenderingCore, vtkmodules.vtkFiltersGeneral, vtkmodules.vtkImagingCore, vtkmodules.vtkIOImage, vtkmodules.vtkRenderingHyperTreeGrid, vtkmodules.vtkRenderingUI, vtkmodules.vtkRenderingOpenGL2, vtkmodules.vtkFiltersSources, vtkmodules.vtkRenderingContext2D, vtkmodules.vtkInteractionWidgets, vtkmodules.vtkViewsCore, vtkmodules.vtkInteractionStyle, vtkmodules.vtkViewsInfovis, vtkmodules.vtkCommonColor, vtkmodules.vtkViewsContext2D, vtkmodules.vtkImagingColor, vtkmodules.vtkIOXMLParser, vtkmodules.vtkIOXML, vtkmodules.vtkTestingRendering, vtkmodules.vtkRenderingFreeType, vtkmodules.vtkRenderingLabel, vtkmodules.vtkRenderingQt, vtkmodules.vtkPythonContext2D, vtkmodules.vtkRenderingLOD, vtkmodules.vtkRenderingLICOpenGL2, vtkmodules.vtkRenderingImage, vtkmodules.vtkChartsCore, vtkmodules.vtkRenderingGridAxes, vtkmodules.vtkRenderingExternal, vtkmodules.vtkRenderingContextOpenGL2, vtkmodules.vtkFiltersCellGrid, vtkmodules.vtkRenderingCellGrid, vtkmodules.vtkImagingMath, vtkmodules.vtkRenderingVolume, vtkmodules.vtkRenderingVolumeOpenGL2, vtkmodules.vtkParallelMPI4Py, vtkmodules.vtkIOVeraOut, vtkmodules.vtkIOTecplotTable, vtkmodules.vtkIOSegY, vtkmodules.vtkIOParallelXML, vtkmodules.vtkIOCore, vtkmodules.vtkIONetCDF, vtkmodules.vtkIOParallelNetCDF, vtkmodules.vtkIOPLY, vtkmodules.vtkIOMovie, vtkmodules.vtkIOOggTheora, vtkmodules.vtkIOMotionFX, vtkmodules.vtkIOCellGrid, vtkmodules.vtkIOLegacy, vtkmodules.vtkIOGeometry, vtkmodules.vtkIOParallel, vtkmodules.vtkIOMPIParallel, vtkmodules.vtkIOMPIImage, vtkmodules.vtkIOMINC, vtkmodules.vtkIOLSDyna, vtkmodules.vtkIOLANLX3D, vtkmodules.vtkIOImport, vtkmodules.vtkIOIOSS, vtkmodules.vtkIOHDF, vtkmodules.vtkIOGeoJSON, vtkmodules.vtkIOFLUENTCFF, vtkmodules.vtkIOVideo, vtkmodules.vtkIOFDS, vtkmodules.vtkIOInfovis, vtkmodules.vtkRenderingSceneGraph, vtkmodules.vtkRenderingVtkJS, vtkmodules.vtkIOExport, vtkmodules.vtkIOExportPDF, vtkmodules.vtkRenderingGL2PSOpenGL2, vtkmodules.vtkIOExportGL2PS, vtkmodules.vtkIOExodus, vtkmodules.vtkIOEngys, vtkmodules.vtkIOEnSight, vtkmodules.vtkIOERF, vtkmodules.vtkIOCityGML, vtkmodules.vtkIOChemistry, vtkmodules.vtkIOCesium3DTiles, vtkmodules.vtkIOCONVERGECFD, vtkmodules.vtkIOCGNSReader, vtkmodules.vtkIOAsynchronous, vtkmodules.vtkIOAMR, vtkmodules.vtkInteractionImage, vtkmodules.vtkInfovisLayout, vtkmodules.vtkImagingStencil, vtkmodules.vtkImagingStatistics, vtkmodules.vtkImagingGeneral, vtkmodules.vtkImagingMorphological, vtkmodules.vtkImagingFourier, vtkmodules.vtkIOSQL, vtkmodules.vtkRenderingAnnotation, vtkmodules.vtkImagingHybrid, vtkmodules.vtkGeovisCore, vtkmodules.vtkFiltersTopology, vtkmodules.vtkFiltersTensor, vtkmodules.vtkFiltersSelection, vtkmodules.vtkFiltersSMP, vtkmodules.vtkFiltersPython, vtkmodules.vtkFiltersProgrammable, vtkmodules.vtkFiltersModeling, vtkmodules.vtkFiltersPoints, vtkmodules.vtkFiltersVerdict, vtkmodules.vtkFiltersParallelVerdict, vtkmodules.vtkFiltersStatistics, vtkmodules.vtkFiltersImaging, vtkmodules.vtkFiltersExtraction, vtkmodules.vtkFiltersGeometry, vtkmodules.vtkFiltersHybrid, vtkmodules.vtkFiltersHyperTree, vtkmodules.vtkFiltersTexture, vtkmodules.vtkFiltersParallel, vtkmodules.vtkFiltersParallelImaging, vtkmodules.vtkCommonSystem, vtkmodules.vtkParallelMPI, vtkmodules.vtkFiltersParallelGeometry, vtkmodules.vtkFiltersTemporal, vtkmodules.vtkFiltersGeometryPreview, vtkmodules.vtkFiltersGeneric, vtkmodules.vtkCommonComputationalGeometry, vtkmodules.vtkFiltersFlowPaths, vtkmodules.vtkFiltersAMR, vtkmodules.vtkDomainsChemistry, vtkmodules.vtkDomainsParallelChemistry, vtkmodules.vtkFiltersParallelMPI, vtkmodules.vtkDomainsChemistryOpenGL2, vtkmodules.vtkCommonPython, vtkmodules.vtkImagingSources, vtkmodules.vtkInfovisCore, vtkmodules.vtkFiltersReduction, traits.ctraits, mpi4py.MPI, pyzoltan.core.zoltan, pyzoltan.core.zoltan_comm, pysph.parallel.parallel_manager, h5py._debian_h5py_serial._errors, h5py._debian_h5py_serial.defs, h5py._debian_h5py_serial._objects, h5py._debian_h5py_serial.h5, h5py._debian_h5py_serial.utils, h5py._debian_h5py_serial.h5t, h5py._debian_h5py_serial.h5s, h5py._debian_h5py_serial.h5ac, h5py._debian_h5py_serial.h5p, h5py._debian_h5py_serial.h5r, h5py._debian_h5py_serial._npystrings, h5py._debian_h5py_serial._proxy, h5py._debian_h5py_serial._conv, h5py._debian_h5py_serial.h5z, h5py._debian_h5py_serial.h5a, h5py._debian_h5py_serial.h5d, h5py._debian_h5py_serial.h5ds, h5py._debian_h5py_serial.h5g, h5py._debian_h5py_serial.h5i, h5py._debian_h5py_serial.h5o, h5py._debian_h5py_serial.h5f, h5py._debian_h5py_serial.h5fd, h5py._debian_h5py_serial.h5pl, h5py._debian_h5py_serial.h5l, h5py._debian_h5py_serial._selector, h5py.atexit, h5py._errors, h5py.defs, h5py._objects, h5py.h5, h5py.utils, h5py.h5t, h5py.h5s, h5py.h5ac, h5py.h5p, h5py.h5r, h5py._npystrings, h5py._proxy, h5py._conv, h5py.h5z, h5py.h5a, h5py.h5d, h5py.h5ds, h5py.h5g, h5py.h5i, h5py.h5o, h5py.h5f, h5py.h5fd, h5py.h5pl, h5py.h5l, h5py._selector, pysph.tools.mesh_tools, Cython.Plex.Actions, Cython.Plex.Transitions, Cython.Plex.Machines, Cython.Plex.DFA, Cython.Plex.Scanners, Cython.Compiler.Scanning, Cython.StringIOTree, Cython.Compiler.Code, Cython.Tempita._tempita, Cython.Compiler.LineTable, Cython.Compiler.Visitor, Cython.Compiler.Parsing, Cython.Compiler.FlowControl, m_14a6f7790f788ccfe72491eb1e221fe5, m_95acdb9c01176ee8ac2c86c4786d4ea6, pysph.base.c_kernels, pysph.base.gpu_nnps_base, pysph.base.z_order_gpu_nnps, pysph.base.stratified_sfc_gpu_nnps, pysph.base.octree_gpu_nnps (total: 242)
Segmentation fault

Moreover, it seems that pysph uses some deprecated ast features that are no longer available in Python 3.14.

See to full error log at https://buildd.debian.org/status/fetch.php?pkg=pysph&arch=amd64&ver=1.0%7Eb2-2%2Bb1&stamp=1765033570&raw=0.
See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1122067.

Do you have a plat to support Python 3.14?
What would be the timeline?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions