Skip to content

[MNT]: Which NumPy version to use for the weekly build? #26730

Closed

Description

@oscargus

Summary

We install both NumPy -pre-version (1.26) and 2.0, but still build MPL with 1.25:

Install Python dependencies:

Collecting numpy
  Obtaining dependency information for numpy from https://files.pythonhosted.org/packages/f9/86/7b6d8e66fa9c2138516b33f6dab9854eae0736c5ab89205398c4622ed37f/numpy-1.26.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
  Downloading numpy-1.26.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (58 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.5/58.5 kB 19.2 MB/s eta 0:00:00
...
Downloading numpy-1.26.0rc1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.2/18.2 MB 98.3 MB/s eta 0:00:00

Install the nightly dependencies

Collecting numpy
  Downloading https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/numpy/2.0.0.dev0/numpy-2.0.0.dev0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.3/18.3 MB 14.8 MB/s eta 0:00:00

Install Matplotlib


Collecting numpy>=1.25
    Obtaining dependency information for numpy>=1.25 from https://files.pythonhosted.org/packages/69/1f/c95b1108a9972a52d7b1b63ed8ca704[66](https://github.com/matplotlib/matplotlib/actions/runs/6129239432/job/16637131200#step:11:67)b59b8c1811bd121f1e6[67](https://github.com/matplotlib/matplotlib/actions/runs/6129239432/job/16637131200#step:11:68)cc45d8/numpy-1.25.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
    Downloading numpy-1.25.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.6 kB)
...
  Downloading numpy-1.25.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.3/18.3 MB 107.1 MB/s eta 0:00:00

Proposed fix

Wouldn't it make sense to also use one of the upcoming versions during installation?

Activity

  1. ksunden commented on Sep 11, 2023

    @ksunden
    Member

    This conversation may be reignited at some point, but I think I'm largely okay with using the nightly wheels for now.

    There is a bit of a compatibility dance that needs to be done, but I'm not aware of further code changes that I expect to require on our end for np 2.0, and so I think testing against installing main with 2.0 is probably a good thing.

    That said, there are ABI changes planned, so code compiled with np<2 may not work with np==2, though the opposite is intended to continue working, to my knowledge.

    Official np guidance is to pin to numpy<2.0 for releases (something we have not done for prior releases, but have done for 3.7.3 (#26706) and I am going to do the same for the 3.8 release branch.)

    However, mpl is used in numpy's doc building, so they may be forced to do source installs (and potentially git installs) for that to work once the ABI changes hit.

    Until quite recently, the nightly wheels, which are built from numpy main, were actually closer to 1.26 than they were to 2.0. So far it is only python deprecations/cleanups that they have merged on main, which we have addressed in our code, so the failures we are seeing are due to third parties (xarray/pandas, mostly)

  2. oscargus commented on Sep 12, 2023

    @oscargus
    MemberAuthor

    My point is rather that we don't build MPL for testing with the nightly wheels, although we install them prior to build MPL, as if the purpose was to actually build it as well. But I may have misunderstood your reply.

  3. QuLogic commented on Jul 13, 2024

    @QuLogic
    Member

    We always use --no-build-isolation now, so the nightly build will be against the nightly wheels automatically.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions