lesgourg/class_public

Modernising CLASS/classy build

Opened this issue · 0 comments

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 #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?