Repository navigation
TST: add a filter for unactionable warning on windows+numpy2 - #16766
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
👋 Thank you for your draft pull request! Do you know that you can use |
|
devdeps fix was just merged separately, so hopefully after this one, CI will be all green again. 🤞 Thanks!!! |
… on windows+numpy2
…766-on-v6.1.x Backport PR #16766 on branch v6.1.x (TST: add a filter for unactionable warning on windows+numpy2)
|
Yes I guess the warning is expected so it must be catched. It would have been better to filter it on the |
|
There were actually 4 test cases triggering it in that class IIRC, which is why I decorated the whole class: it seemed preferable (to me) to avoid duplicating this filter too much, but let me know if you'd rather have more targeted decorators, I'm happy to switch. |
|
From the list in #16765 it happens only in |
@neutrinoceros , are you able to issue a follow-up PR? If not, let me know and I can. Thanks! |
|
I'm on it ! |
Description
Follow up to #16581 and #16608
Fixes #16765
I think filtering is our only course of action here: the warning happens in the exact situation we identified as potentially problematic (i.e., calling
io.fits.open(..., mode="update")on windows + numpy 2), but it needs to go off before any actual undefined behavior is triggered, so it's bound to also be emitted in applications that are actually safe, like the four tests that we've seen emitting it.This problem affects v6.1.x so this PR needs to be backported.