Repository navigation
RFC: refactor internal usage of copy=False to copy=COPY_IF_NEEDED - #16166
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 |
831d61b to
61d4976
Compare
|
A couple missing labels should be added manually:
|
|
Copying from the today's call notes :
I'll split out the small signature changes to a separate PR so this one stays a pure refactor and can be merged consensually. update: the API change was split out into #16174 |
dd3af2c to
8eb54fa
Compare
pllim
left a comment
There was a problem hiding this comment.
At a glance, this PR looks reasonable. I will give subpackage maintainers some time to review. Thanks!
nden
left a comment
There was a problem hiding this comment.
The changes in modeling look good to me.
8eb54fa to
9aacfd6
Compare
|
I rebased to get around that merge requirements changed after #15603 was merged. As a result, we lost easy access to CI logs that I prepared for reviewers. Hence, I encourage checking out the branch locally and running a fraction of the test suite1 against all commits in the branch if you want to check my story. Footnotes
|
|
closing/reopening to retrigger CI now that pytest-doctestplus was updated |
9aacfd6 to
fc311fc
Compare
fc311fc to
72aeebe
Compare
mhvk
left a comment
There was a problem hiding this comment.
This looks all good. Your extra commits effectively allowed you to test that this covers everything, correct?
Is the idea to get just the one commit in as well? That would seem fine to me.
that's right. I ran the whole test suite at each step so I'm confident that the interesting commit is complete.
Squash-merging should be equivalent to dropping the 4 extra commits, but I'm happy to go with any strategy you like best. |
|
Sorry, I wasn't clear: is the idea that now we know this works, we merge this one too so that the other two can be rebased on it? (Happy to squash-merge) |
|
Oh, sorry I didn't get that ! yes, that is the plan ! |
…6166) Now internally we will be OK regardless of how we deal with the numpy 2.0 change in the meaning of `copy`.
Description
This pull request will be pushed in 5 layers because we need to run CI 5 times to validate it.I'll edit this message once it's ready.
This applies the first step described in #16167: making backward compatibility shims introduced in #16142 redundant for internal usage. It is meant to be reviewed commit-by-commit. Particularly, the exit status of devdeps is crucial.
copy=Falseare preserved) -> devdeps still succeedscopy=Falsebecomescopy=COPY_IF_NEEDEDin signatures) -> devdeps succeeds once again !By construction, 4 out of 6 commits should cancel out, so squash merging is expected.
Also note that commit 3 is, in itself, a pure refactor, and could be backported (but I don't know that it's wanted). Minor API changes from commit 5 are aimed for astropy 6.1, but could also be rerolled in its own PR if requested (its presence in this PR is supposed to help demonstrating that it's needed in the grand scheme of #16167, but maybe that's only making it more confusing ?).