cython
cython copied to clipboard
Add option to silence IF deprecation warning
Over in https://github.com/h5py/h5py/pull/2444 the GitHub actions logs get clogged with hundreds/thousands of:
warning: h5py/api_types_hdf5.pxd:710:2: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310
The proper solution is to fix these. But in the meantime, it would be nice if I could:
- Open a GitHub issue about it for
h5pyto keep track of it with milestones etc., and - Silence the warnings in the meantime so the build logs are more readable
This PR moves toward (2). Consider it a proposal-as-PR so feel free to close if it's not the way to go -- I wanted to see if it was doable at all and it turned out not to be too bad to get something that worked for h5py at least, where we could with this PR do cythonize(..., compiler_directives={'warn.deprecated_if': False}).