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

Limiting compatibility with numpy 2.1 #116

Open
hmaarrfk opened this issue Sep 20, 2024 · 3 comments
Open

Limiting compatibility with numpy 2.1 #116

hmaarrfk opened this issue Sep 20, 2024 · 3 comments
Labels

Comments

@hmaarrfk
Copy link

Comment:

Is it worth limiting compatibility with numpy 2.1?

On my personal package, I already limit to numpy 1.X so I don't hit it so much, but I feel like some others might be hitting
pydata/xarray#9403

We personally hit it and added monkey patches around it....

@keewis
Copy link
Contributor

keewis commented Sep 21, 2024

looks like the reason we don't see that in CI (except upstream-dev) is that a dependency already pins to numpy<2.1

@hmaarrfk
Copy link
Author

hmmm, i'm not sure how my previous environments were working with numpy 2.1 + xarray

I tried:

mamba create --name xr xarray>=2022 numpy=2.1 --channel conda-forge --override-channels

and its not resolving.... so maybe something changed....

@hmaarrfk hmaarrfk reopened this Sep 21, 2024
@hmaarrfk
Copy link
Author

Hmm, i just created a fresh envrionment and I noticed my monkeypatching code (that fixex the issue referenced) got triggered (i print a warning).

$ mamba list | grep -E "(xarray|numpy)"
numpy                     2.1.1           py310hd6e36ab_0    conda-forge
xarray                    2024.9.0           pyhd8ed1ab_0    conda-forge

seems to be compatible....

$ mamba create --name xr "xarray>=2024" "numpy>=2.1.0" python=3.10 --channel conda-forge --override-channels

Looking for: ["xarray[version='>=2024']", "numpy[version='>=2.1.0']", 'python=3.10']

warning  libmamba Could not parse mod/etag header
warning  libmamba Could not parse mod/etag header
conda-forge/noarch                                  16.5MB @   3.5MB/s  4.7s
conda-forge/linux-64                                38.2MB @   7.3MB/s  5.3s
Transaction

  Prefix: /home/mark/miniforge3/envs/xr

  Updating specs:

   - xarray[version='>=2024']
   - numpy[version='>=2.1.0']
   - python=3.10


  Package               Version  Build                Channel           Size
──────────────────────────────────────────────────────────────────────────────
  Install:
──────────────────────────────────────────────────────────────────────────────

  + _libgcc_mutex           0.1  conda_forge          conda-forge     Cached
  + ld_impl_linux-64       2.40  hf3520f5_7           conda-forge     Cached
  + python_abi             3.10  5_cp310              conda-forge     Cached
  + ca-certificates   2024.8.30  hbcca054_0           conda-forge     Cached
  + libgomp              14.1.0  h77fa898_1           conda-forge     Cached
  + _openmp_mutex           4.5  2_gnu                conda-forge     Cached
  + libgcc               14.1.0  h77fa898_1           conda-forge     Cached
  + libgfortran5         14.1.0  hc5f4f2c_1           conda-forge     Cached
  + libstdcxx            14.1.0  hc0a3c3a_1           conda-forge     Cached
  + libgcc-ng            14.1.0  h69a702a_1           conda-forge     Cached
  + openssl               3.3.2  hb9d3cd8_0           conda-forge     Cached
  + libgfortran          14.1.0  h69a702a_1           conda-forge     Cached
  + libzlib               1.3.1  h4ab18f5_1           conda-forge     Cached
  + libxcrypt            4.4.36  hd590300_1           conda-forge     Cached
  + libffi                3.4.2  h7f98852_5           conda-forge     Cached
  + bzip2                 1.0.8  h4bc722e_7           conda-forge     Cached
  + ncurses                 6.5  he02047a_1           conda-forge     Cached
  + libuuid              2.38.1  h0b41bf4_0           conda-forge     Cached
  + libnsl                2.0.1  hd590300_0           conda-forge     Cached
  + xz                    5.2.6  h166bdaf_0           conda-forge     Cached
  + libgfortran-ng       14.1.0  h69a702a_1           conda-forge     Cached
  + tk                   8.6.13  noxft_h4845f30_101   conda-forge     Cached
  + libsqlite            3.46.1  hadc24fc_0           conda-forge     Cached
  + readline                8.2  h8228510_1           conda-forge     Cached
  + libopenblas          0.3.27  pthreads_hac2b453_1  conda-forge     Cached
  + libblas               3.9.0  24_linux64_openblas  conda-forge     Cached
  + libcblas              3.9.0  24_linux64_openblas  conda-forge     Cached
  + liblapack             3.9.0  24_linux64_openblas  conda-forge     Cached
  + tzdata                2024a  h8827d51_1           conda-forge     Cached
  + python              3.10.15  h4a871b0_0_cpython   conda-forge       25MB
  + wheel                0.44.0  pyhd8ed1ab_0         conda-forge     Cached
  + setuptools           74.1.2  pyhd8ed1ab_0         conda-forge     Cached
  + pip                    24.2  pyh8b19718_1         conda-forge     Cached
  + six                  1.16.0  pyh6c4a22f_0         conda-forge     Cached
  + pytz                 2024.1  pyhd8ed1ab_0         conda-forge     Cached
  + python-tzdata        2024.1  pyhd8ed1ab_0         conda-forge     Cached
  + packaging              24.1  pyhd8ed1ab_0         conda-forge     Cached
  + python-dateutil       2.9.0  pyhd8ed1ab_0         conda-forge     Cached
  + numpy                 2.1.1  py310hd6e36ab_0      conda-forge     Cached
  + pandas                2.2.3  py310h5eaa309_1      conda-forge     Cached
  + xarray             2024.9.0  pyhd8ed1ab_0         conda-forge     Cached

  Summary:

  Install: 41 packages

  Total download: 25MB

──────────────────────────────────────────────────────────────────────────────


Confirm changes: [Y/n] y
python                                              25.3MB @  10.0MB/s  2.5s

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

i don't know why i couldn't do this before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants