Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: Pin numpy<2 for v5.3.x #15234

Merged
merged 2 commits into from Aug 30, 2023
Merged

MNT: Pin numpy<2 for v5.3.x #15234

merged 2 commits into from Aug 30, 2023

Conversation

pllim
Copy link
Member

@pllim pllim commented Aug 27, 2023

Description

I think it is reasonable to say that for v5.3.x, we will not support NumPy 2.0 or later? The support for v5.3.x will end anyway when v6.0.x is cut, which is schedule to be by the end of 2023.

Motivations:

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

@pllim pllim added numpy-dev skip-basebranch-check Skip base branch check for direct backports labels Aug 27, 2023
@pllim pllim added this to the v5.3.3 milestone Aug 27, 2023
@pllim pllim requested review from mhvk and a team August 27, 2023 16:27
@github-actions
Copy link

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 "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. 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?
  • Is a milestone set? Milestone must be set but we cannot check for it on Actions; 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.

@@ -211,7 +210,7 @@ def test_bounds_gauss2d_lsq(self, fitter):
ctx2 = nullcontext()
if isinstance(fitter, fitting.TRFLSQFitter):
ctx = np.errstate(invalid="ignore", divide="ignore")
if not NUMPY_LT_2_0 or not SCIPY_LT_1_11_2:
if not SCIPY_LT_1_11_2:
Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm... Looks like this warning somehow went away again in dev scipy?

that now fails in devdeps with scipy dev.
Since this is backport branch and the warning may or may not appear,
let's just blanket ignore the unsuccessful fit because test case
is not well defined to begin with.
@mhvk
Copy link
Contributor

mhvk commented Aug 28, 2023

I think this makes a lot of sense!

@pllim
Copy link
Member Author

pllim commented Aug 28, 2023

@mhvk , wanna approve? 😉

Copy link
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.

@pllim - am happy to approve this, though perhaps good to have someone from the @astropy/astropy-project-release-team approve too? Though, in a way, this really just makes sense...

@@ -2,7 +2,7 @@
requires = ["setuptools",
"setuptools_scm>=6.2",
"cython==0.29.34",
"oldest-supported-numpy",
"numpy>=1.25,<2",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to have the minimum build version higher than the minimum runtime version? That’s generally the thing that has caused problems in the past and is the reason for oldest-supported-numpy.

Copy link
Contributor

Choose a reason for hiding this comment

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

Numpy 1.25 is the first version that supports backward compatible builds. The release notes explicitly mention that the mechanism makes oldest-supported-numpy not needed

Copy link
Member Author

Choose a reason for hiding this comment

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

More discussions happened in #14949

@pllim
Copy link
Member Author

pllim commented Aug 30, 2023

@astrofrog and @saimn gave verbal approval on Slack, so merging. Thanks, everyone!

@pllim pllim merged commit 7a4c713 into astropy:v5.3.x Aug 30, 2023
25 checks passed
@pllim pllim deleted the pin-numpy-lt-2 branch August 30, 2023 15:55
@astrofrog
Copy link
Member

What about v5.0.x? Should we make the same change there?

@pllim
Copy link
Member Author

pllim commented Sep 7, 2023

I already did that much earlier due to something else. So now both of them are pinned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation numpy-dev skip-basebranch-check Skip base branch check for direct backports testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants