Skip to content

Drop support for numpy < 1.24 - #18160

Merged
mhvk merged 1 commit into
astropy:mainfrom
eerovaher:bump-numpy
May 27, 2025
Merged

mhvk merged 1 commit into
astropy:mainfrom
eerovaher:bump-numpy

Conversation

@eerovaher

@eerovaher eerovaher commented May 19, 2025 •

Copy link
Copy Markdown
Member

Description

According to SPEC 0 we do not have to support numpy 1.23 or 1.24 anymore. Removing compatibility code for those versions simplifies our codebase.

SPEC 0 also recommends dropping support for numpy 1.25 starting from June 2025. It's not June yet, but astropy 7.2 will not be released in May, so we could drop support for numpy 1.25 on main already. I haven't done that here yet, but if reviewers would like that then it would be simple enough to add one more commit.

EDIT: I ended up dropping support only for numpy 1.23 here.

  • 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.

@eerovaher eerovaher changed the title Bump numpy Drop support for numpy < 1.25 May 19, 2025
@eerovaher
eerovaher marked this pull request as draft May 20, 2025 12:21
@eerovaher

Copy link
Copy Markdown
Member Author

Turns out that in order to drop support for numpy < 1.24 we should also drop support for matplotlib < 3.7. SPEC 0 allows us to drop support for matplotlib < 3.8 and doing so would get rid of some compatibility code in visualization, but that's best done in a separate pull request.

@eerovaher
eerovaher force-pushed the bump-numpy branch 3 times, most recently from 31d371d to dc4dee3 Compare May 26, 2025 13:24
@eerovaher

Copy link
Copy Markdown
Member Author

Turns out that changing our oldest supported numpy version is not as straightforward as I thought it would be. I had to open two separate pull requests (#18164 and #18173) so that the oldest dependencies CI job could succeed with numpy 1.24 and I can already see the need to open more pull requests to prepare for the next step. Perhaps it's best to limit this pull request to dropping support for numpy < 1.24.

@eerovaher
eerovaher marked this pull request as ready for review May 26, 2025 14:42
@eerovaher eerovaher changed the title Drop support for numpy < 1.25 Drop support for numpy < 1.24 May 26, 2025

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! I think doing just the removal of support for numpy 1.24 is good - it is a large PR as is, but now nice & reviewable.

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.

2 participants