yt-project / yt_astro_analysis

yt astrophysical analysis modules
Other
21 stars 21 forks source link

BLD: switch to Cython 3.0, forbid deprecated Numpy C API in generated code #211

Closed neutrinoceros closed 1 year ago

neutrinoceros commented 1 year ago

Opening as a draft. Build already works (locally) but there may be some performance regressions. Hopefully it'll show in CI.

neutrinoceros commented 1 year ago

Tests are not taking longer than usual, so I think this is good to go ? @matthewturk , would you advise slapping noexcept on every nogil function anyway ?

brittonsmith commented 1 year ago

I'm ok with this going in, but I don't have enough expertise in cython to comment on the question raised.

matthewturk commented 1 year ago

I would advise that, yeah. But it's probably not strictly necessary.

neutrinoceros commented 1 year ago

ok done. I'll merge this and follow-up PRs when tests pass. Thank you both !

neutrinoceros commented 1 year ago

actually, this is causing compilation errors in CI, so I've reverted this part of the patch. Let's just keep in mind that this change may be the first suspect in the event of performance regressions in the near future.