Skip to content

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

Merged
pllim merged 2 commits into
astropy:v5.3.xfrom
pllim:pin-numpy-lt-2
Aug 30, 2023
Merged

pllim merged 2 commits into
astropy:v5.3.xfrom
pllim:pin-numpy-lt-2

Conversation

@pllim

@pllim pllim commented Aug 27, 2023

Copy link
Copy Markdown
Member

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 a team and mhvk August 27, 2023 16:27
@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 "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.

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
Copy Markdown
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

mhvk commented Aug 28, 2023

Copy link
Copy Markdown
Contributor

I think this makes a lot of sense!

@pllim

pllim commented Aug 28, 2023

Copy link
Copy Markdown
Member Author

@mhvk , wanna approve? 😉

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

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

Comment thread pyproject.toml
"setuptools_scm>=6.2",
"cython==0.29.34",
"oldest-supported-numpy",
"numpy>=1.25,<2",

@jdavies-st jdavies-st Aug 28, 2023 •

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.

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
Copy Markdown
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
Copy Markdown
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

pllim commented Aug 30, 2023 •

Copy link
Copy Markdown
Member Author

@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
@pllim
pllim deleted the pin-numpy-lt-2 branch August 30, 2023 15:55
@astrofrog

Copy link
Copy Markdown
Member

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

@pllim

pllim commented Sep 7, 2023

Copy link
Copy Markdown
Member Author

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.

5 participants