astropy: numpy 2 compat: tests failing with default print options
We currently have about 400 tests that don’t pass against numpy 2.0 if we remove the following line
90% of the solution is already isolated in #16416, and we can probably extract backportable solutions for the other 10% from #15065.
I’m seeing ~400 failures (doctests included) on main, 90% of which are resolved by #16416, but not all of what’s left are doctests, which, as discussed in #15095, are not critical and can be post-poned to after numpy 2.0.0 final comes out (supposedly this would be for astropy 7.0.0)
Everything that’s not a doctest, and not already fixed in #16416, should probably be addressed for 6.1.1
Affected modules:
coordinates(1 test) #16427io.fits(4 tests) #16426io.votable(15 tests) #16442table(7 tests) #16433utils(2 tests) #16426 and #16443
I expect solutions were already found by @mhvk in #15065, so it’s mostly a matter of making targeted cherry-picks.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 20 (20 by maintainers)
OK, let’s go that route - then #15065 will probably get in when numpy 2.0 is out (just saw rc2 was released).
Alright, everything was merged, let’s close this ! thanks !
Let’s call it making me an offer I can’t refuse 🤌🏻
Well, I can’t arrest you or anything… 😸 Thanks for opening the issue! It is good to have it out in the open to show people we’re aware of it.
I don’t expect it to get in the way of anyone so it should be very low priority, but I do have a personal reminder to clean it up when the time comes. That said, your phrasing seems to imply that not having an issue isn’t an option, so let me open one now 😃
update: https://github.com/astropy/astropy/issues/16491
Yes !
numpy 2.0 has a release date: https://github.com/numpy/numpy/issues/24300#issuecomment-2125643448
I’d recommend merging the remaining PRs related to this issue and cutting a 6.1.1 release before june 16th FYI @astrofrog @saimn @mhvk @pllim
re https://github.com/astropy/astropy/issues/16423#issuecomment-2102966432: I’m now thinking the bug is actually on our side, specifically in
MaskedFormat.__call__, but I don’t have time to fix it just now. VOTable failures are also a puzzle and are possibly related, so I thinkutils.maskedshould be the next priority. I’ll come back to it later today if time allows.Actually what I’m finding out thusfar is that the failures I’m pointing to in this issue are not resolved by #15065, and require their own solution. Since they are related but separable problems, I don’t think we need to discuss this here.