Skip to content

BUG: fix incoming incompatibilities with numpy 2.4#18732

Merged
neutrinoceros merged 2 commits intoastropy:mainfrom
neutrinoceros:compat/numpy_2.4
Oct 19, 2025
Merged

BUG: fix incoming incompatibilities with numpy 2.4#18732
neutrinoceros merged 2 commits intoastropy:mainfrom
neutrinoceros:compat/numpy_2.4

Conversation

@neutrinoceros
Copy link
Copy Markdown
Contributor

@neutrinoceros neutrinoceros commented Oct 16, 2025

Description

this fixes two incompatibilities. While separable, these create failures at import time so they are harder to test in isolation; hence, I bundled them both into a single PR

  • BUG: fix an import-time incompatibility with numpy 2.4 (np.in1d is removed)
  • BUG: fix an import-time incompatibility with numpy 2.4 (np.quantile's interpolation kwarg is removed)

xrefs:

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@github-actions
Copy link
Copy Markdown
Contributor

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.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

@neutrinoceros neutrinoceros changed the title BUG: fix incoming import-time incompatibilities with numpy 2.4 BUG: fix incoming incompatibilities with numpy 2.4 Oct 16, 2025
@neutrinoceros neutrinoceros force-pushed the compat/numpy_2.4 branch 4 times, most recently from 7eef886 to 4581f27 Compare October 16, 2025 08:17
@neutrinoceros neutrinoceros added the Extra CI Run cron CI as part of PR label Oct 16, 2025
@neutrinoceros neutrinoceros requested a review from mhvk October 16, 2025 08:26
@neutrinoceros neutrinoceros marked this pull request as ready for review October 16, 2025 08:26
@neutrinoceros
Copy link
Copy Markdown
Contributor Author

This is causing failures against numpy nightlies, which are not yet caught up with the changes I'm adapting to. It might be easier to wait a couple days to validate this in CI directly.

Copy link
Copy Markdown
Contributor

@mhvk mhvk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! As you say, let's me sure to run the test with new numpy included so we know this is complete.

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

(Of course I did try it locally. It might however turn out incomplete by the time a new nightly happens, if any other breaking change is merged in the interval)

pllim
pllim previously requested changes Oct 17, 2025
Copy link
Copy Markdown
Member

@pllim pllim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would feel better if we can prove it in devdeps. So I will block merge until that can be done. Thanks!

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

No worries. I didn't mean to suggest otherwise

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

New nightlies are out. I'm re-running failed jobs manually.

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

Everything's green, save for codecov, which I think we can ignore. Merging now so allowed-failure jobs have a chance to pass on other PRs. Thanks all !

@neutrinoceros neutrinoceros dismissed pllim’s stale review October 19, 2025 06:35

Concerns were adressed

@neutrinoceros neutrinoceros merged commit 2309a50 into astropy:main Oct 19, 2025
66 of 71 checks passed
@neutrinoceros neutrinoceros deleted the compat/numpy_2.4 branch October 19, 2025 06:35
@lumberbot-app
Copy link
Copy Markdown

lumberbot-app bot commented Oct 19, 2025

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v7.1.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 2309a502d14d28319aabbb75b52adfed49366042
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #18732: BUG: fix incoming incompatibilities with numpy 2.4'
  1. Push to a named branch:
git push YOURFORK v7.1.x:auto-backport-of-pr-18732-on-v7.1.x
  1. Create a PR against branch v7.1.x, I would have named this PR:

"Backport PR #18732 on branch v7.1.x (BUG: fix incoming incompatibilities with numpy 2.4)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@neutrinoceros
Copy link
Copy Markdown
Contributor Author

manual backport at #18751

mhvk added a commit that referenced this pull request Oct 19, 2025
Backport PR #18732 on branch `v7.1.x` (BUG: fix incoming incompatibilities with numpy 2.4)
@pllim
Copy link
Copy Markdown
Member

pllim commented Oct 20, 2025

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants