Skip to content

ENH: fix compatibility with numpy 1.23 - #12535

Merged
mhvk merged 1 commit into
astropy:mainfrom
neutrinoceros:fixup_numpy1.23_compat
Nov 29, 2021
Merged

mhvk merged 1 commit into
astropy:mainfrom
neutrinoceros:fixup_numpy1.23_compat

Conversation

@neutrinoceros

@neutrinoceros neutrinoceros commented Nov 29, 2021 •

Copy link
Copy Markdown
Contributor

Description

Fixes #12534
This is not necessarily sufficient to fix compatibility with numpy 1.23 completely but it should at least address the problem I stumbled upon.

for reference the breaking change upstream is from numpy/numpy#20414

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • 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 "When to rebase and squash commits".
  • 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.
  • 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 a milestone set? Milestone must be set but astropy-bot check might be missing; do not let the green checkmark fool you.
  • 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.

@neutrinoceros
neutrinoceros force-pushed the fixup_numpy1.23_compat branch 2 times, most recently from 6965334 to ab9ecf3 Compare November 29, 2021 14:28
@neutrinoceros

Copy link
Copy Markdown
Contributor Author

I don't know if this warrants a changelog entry, please tell me if I need to write one.

@nstarman
nstarman requested review from mhvk and pllim November 29, 2021 16:06
@nstarman nstarman added this to the v5.0.1 milestone Nov 29, 2021

@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 very much for noticing that and sending the fix!! It looks all good. We should back-port this.

@mhvk mhvk added no-changelog-entry-needed zzz 💤 merge-when-ci-passes Do not use: We have auto-merge option now. labels Nov 29, 2021
@mhvk

mhvk commented Nov 29, 2021

Copy link
Copy Markdown
Contributor

The numpy-dev job passed, which included the numpy commit that removed the deprecated functions, so this PR is tested also for that.

@mhvk
mhvk merged commit ee293f3 into astropy:main Nov 29, 2021
@lumberbot-app

lumberbot-app Bot commented Nov 29, 2021

Copy link
Copy Markdown

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 v5.0.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -m1 ee293f35829f6a5d2984284640e5ab231d48cd20
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #12535: ENH: fix compatibility with numpy 1.23'
  1. Push to a named branch:
git push YOURFORK v5.0.x:auto-backport-of-pr-12535-on-v5.0.x
  1. Create a PR against branch v5.0.x, I would have named this PR:

"Backport PR #12535 on branch v5.0.x (ENH: fix compatibility with numpy 1.23)"

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.

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.

BUG: astropy.units fails to import with numpy 1.23.0dev

3 participants