Skip to content

Pin numpy<2 in v6.0? #15393

Closed as not planned
Closed as not planned

Description

@pllim

We could do something like #15206 (cc @neutrinoceros) but for v6.0.x when we branch it out. Or do you think v6.0 would be okay with numpy 2.0?

The timing is tricky because numpy 2.0 and astropy 6.0 could possibly happen around the same time, but I don't know which one would come out first.

@astropy/astropy-project-release-team should probably make this call at release time.

Activity

  1. added this to the v6.0 milestone on Sep 26, 2023
  2. mhvk commented on Sep 27, 2023

    @mhvk
    Contributor

    I really hope we won't have to...

  3. bsipocz commented on Oct 3, 2023

    @bsipocz
    Member

    Why would you do this? main works with 2.0dev, and this upper limiting was never the approach for any other versions.

  4. pllim commented on Oct 3, 2023

    @pllim
    MemberAuthor

    Why would you do this?

    In case we have to release before numpy 2.0 comes out. In that case, numpy 2.0.dev would still be in flux and we cannot guarantee that our release would be compatible with numpy 2.0 stable. I think.

  5. bsipocz commented on Oct 3, 2023

    @bsipocz
    Member

    But that could/should be true for any other not yet released versions from cpython down to the bottom of the dependency list (as well as for any releases in the past with an upcoming numpy release looming over them), yet no upper limits are around for any packages (rightfully so).

  6. pllim commented on Oct 3, 2023

    @pllim
    MemberAuthor

    yet no upper limits are around for any packages

    That is not quite true. contourpy pins numpy<2 even in their dev branch, causing me pain with testing both matplotlib dev and numpy dev in the same job.

    Other packages also max pin a bunch of stuff (not numpy in this case) in their dev branches, so such practice is not unprecedented; for example:

  7. bsipocz commented on Oct 3, 2023

    @bsipocz
    Member

    yet no upper limits are around for any packages

    That is not quite true. contourpy pins numpy<2 even in their dev branch, causing me pain with testing both matplotlib dev and numpy dev in the same job.

    I meant that astropy didn't do upper limits in the past. I know that others doing it, and I very well know that it causes pain all over.

    https://iscinumpy.dev/post/bound-version-constraints/

    TL;DR:

    Libraries/packages should be setting a floor, and if necessary excluding known buggy versions, but otherwise don’t cap the maximum version as you can’t predict future compatibility
    
  8. pllim commented on Oct 3, 2023

    @pllim
    MemberAuthor

    I meant that astropy didn't do upper limits in the past

    Ah, okay, that is true. But this is the first time we have to deal with numpy 1 -> 2. 🤷

  9. bsipocz commented on Oct 3, 2023

    @bsipocz
    Member

    I added the TL;DR, still don't see why it should be there. It should not be a preventative step but be done only if there are known and certainly expected issues. Which IMO is not the case.

  10. bsipocz commented on Oct 3, 2023

    @bsipocz
    Member

    (And I don't think the practice of a user-level library/app like bqplot should be applicable here. There are a lot of package depending on the astropy library, adding an upper limit here has a consequence on all of those, while it's less the case for things that are targeting the end-user)

  11. mhvk commented on Oct 4, 2023

    @mhvk
    Contributor

    I agree with @bsipocz that unless we know numpy 2.0 does not work, we should not have a limit. I definitely share the slight despair at the numpy changes for 2.0, but guess we'll just have to keep fixing any problems and then make a new point release... (and I'll continue to try to be quick with helping out!).

    One other thing that I think might help (I can do it), is to ask the numpy folks what more is in the pipeline shortly before our release.

  12. pllim commented on Oct 4, 2023

    @pllim
    MemberAuthor

    Okay, I think the conclusion so far is "no" but I will let @astropy/astropy-project-release-team decide if they want to keep this open or close it. Ultimately, burden of any extra releases would fall to them.

  13. saimn commented on Oct 4, 2023

    @saimn
    Contributor

    I don't see a reason to pin now, we will see when we get closer to numpy/astropy releases but would be better if we can have a release that is directly compatible with Numpy 2.0.

  14. bsipocz commented on Oct 4, 2023

    @bsipocz
    Member

    One other thing that I think might help (I can do it), is to ask the numpy folks what more is in the pipeline shortly before our release.

    I'm certain changes will slow down as Mateusz' internship will wrap up soon and a lot of the 2.0 plans had already happened.
    Big ones coming are:

    Or just have a look at the roadmap: NumPy 2.0 Roadmap

  15. astrofrog commented on Oct 11, 2023

    @astrofrog
    Member

    I think we don't need to pin

  16. pllim commented on Oct 11, 2023

    @pllim
    MemberAuthor

    OK both release managers said no, so closing. Thanks for the discussions, all!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions