cython icon indicating copy to clipboard operation
cython copied to clipboard

Add option to silence IF deprecation warning

Open larsoner opened this issue 1 year ago • 2 comments

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:

  1. Open a GitHub issue about it for h5py to keep track of it with milestones etc., and
  2. 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}).

larsoner avatar Jun 12 '24 17:06 larsoner