Repository navigation
BUG: avoid deprecated interface for mutating shape attibutes (io.fits) - #19128
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.
|
6c449e1 to
c0f1c04
Compare
c0f1c04 to
42806e5
Compare
|
I dropped part of the patch that turned out to break backward compat. This PR is just aimed at getting trivial changes out of the way so we can focus discussions where needed, so the remaining patch will get a dedicated issue. |
mhvk
left a comment
There was a problem hiding this comment.
I worried slightly about changing the purpose of the test, since how an actual assignment to .data is done, which may trigger a different path. I'd tend to just go for the private method to set the shape, but maybe @saimn can advice.
|
Yeah, as Marten says it changes a bit what happens internally. So if we want to keep the test unchanged we need to use the new |
|
Does it make sense to update: astropy/astropy/io/fits/util.py Line 873 in e5da169 as part of this PR? |
Maybe there's a bit of confusion going on here, at least in the form of typing mishaps, because |
67b9ab7 to
2ef5cdc
Compare
|
@braingram absolutely. I initially left it out intentionally because I was worried the discussion there would be thorny, especially because I wasn't sure others would be okay with resorting to |
|
@neutrinoceros - Yes |
2ef5cdc to
e0cf33e
Compare
|
how about now ? |
| if NUMPY_LT_2_5: | ||
| hdul[0].data.shape = (42, 10) | ||
| else: | ||
| # ndarray._set_shape would is semi-private, but the only |
There was a problem hiding this comment.
| # ndarray._set_shape would is semi-private, but the only | |
| # ndarray._set_shape is semi-private, but the only |
Looks good, thanks (just a minor typo). |
e0cf33e to
8ba14eb
Compare
|
thank you. Fixed |
|
You wanna rebase one more time, just in case? |
8ba14eb to
44fb955
Compare
|
done |
|
Thanks! No need for wait for OSX. Down to 46 warnings/failures and looks like coordinates is the next big one. 🤪 |
…ng shape attibutes (io.fits)
…128-on-v7.2.x Backport PR #19128 on branch v7.2.x (BUG: avoid deprecated interface for mutating shape attibutes (io.fits))
PR: astropy#19159 Issue: astropy#19128 Base commit: f1b530e Changed lines: 21
PR: astropy#19128 Issue: astropy#19126 Base commit: 108d07d Changed lines: 21
Description
ref #19126