I chose to use the pyclass proc macro instead of trying to use features or cfgs to reduce the long-term maintenance burden as PySliceContainer is not special when comes to PyClassImpl implementors. This does mean we require PyO3's proc macros and the associated build time hit, but I suspect that the target audience using rust-numpy but not PyO3's proc macros is sufficiently limited to make this worthwhile. (I did not yet check whether there are other places in the code that could benefit from using the proc macros, but I don't expect it.)
@davidhewitt I think it would be good to release this as 0.16.1 if we agree on the approach, so ideally before #285 is merged which will be a breaking change.
I chose to use the
pyclass
proc macro instead of trying to use features or cfgs to reduce the long-term maintenance burden asPySliceContainer
is not special when comes toPyClassImpl
implementors. This does mean we require PyO3's proc macros and the associated build time hit, but I suspect that the target audience using rust-numpy but not PyO3's proc macros is sufficiently limited to make this worthwhile. (I did not yet check whether there are other places in the code that could benefit from using the proc macros, but I don't expect it.)Fixes #287