lesgourg / class_public

Public repository of the Cosmic Linear Anisotropy Solving System (master for the most recent version of the standard code; GW_CLASS to include Cosmic Gravitational Wave Background anisotropies; classnet branch for acceleration with neutral networks; ExoCLASS branch for exotic energy injection; class_matter branch for FFTlog)
218 stars 291 forks source link

Modernising CLASS/classy build #546

Open JesusTorrado opened 10 months ago

JesusTorrado commented 10 months ago

Hi all,

There are at the moment a number of possibly easy-to-fix problems producing warnings and errors during CLASS' build with up-to-date Python (3.11) and requirements (cython v3). This is an issue to gather all three:

  1. Using old setup.py instead of pyproject.yml, and calling setup.py directly --> throws a WARNING, but will fail in the future.

  2. Using the old numpy API --> throws a WARNING, but will fail in the future

    In file included from /home/jesus/.local/lib/python3.11/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929,
                     from /home/jesus/.local/lib/python3.11/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/jesus/.local/lib/python3.11/site-packages/numpy/core/include/numpy/arrayobject.h:5,
                    from /home/jesus/CLASS/python/../python/classy.c:752:
    /home/jesus/.local/lib/python3.11/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
       17 | #warning "Using deprecated NumPy API, disable it with " \
          |  ^~~~~~~
  3. Using cython syntax incompatible with the new cython3 (already reported in https://github.com/lesgourg/class_public/issues/531, where the workaround of installing cython<3 is proposed, and there is a PR fixing it at https://github.com/lesgourg/class/pull/136, but still not merged into class_public).

Could we at least get a mini-release where 3 is fixed, while all this is done?