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

remove upper bound from numpy version #347

Merged
merged 2 commits into from
Oct 24, 2024
Merged

Conversation

jkittner
Copy link
Contributor

dask/crick#53 was resolved and tests pass locally for me.

This is causing issues for us since other packages started requiring numpy>=2.0

@jkittner
Copy link
Contributor Author

#346 should resolve those 3.11 test failures - it looks like it captures the rasterio warnings?

@j08lue
Copy link
Collaborator

j08lue commented Oct 23, 2024

We can check once that one is merged and we rebase here.

@jkittner
Copy link
Contributor Author

jkittner commented Oct 24, 2024

There are no 3.9 wheels for crick on pypi. It tries to install version 0.0.6 which is compiled with numpy < 2 and hence incompatible with numpy >= 2.

2024-10-24T10:32:57.6608536Z   Downloading crick-0.0.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.1 kB)

However, version 0.0.7 is available - but only with wheels starting at 3.10 since crick 0.0.7 dropped support for 3.9. https://github.com/dask/crick/blob/5b7f0c779ac873dfc895f39d41a6682e519764b6/pyproject.toml#L17 (see: dask/crick#57)

The only way to do this would be this:

diff --git a/setup.py b/setup.py
index 5b16c7e..be42428 100644
--- a/setup.py
+++ b/setup.py
@@ -79,6 +79,7 @@ setup(
         "tqdm",
     ],
     extras_require={
+        ':python_version == "3.9"': ['numpy<2.0.0'],
         "test": [
             "pytest",
             "pytest-cov",

which would mean terracotta would use numpy < 2 and crick 0.0.6 on 3.9 and numpy > 2 and crick > 0.0.6 on > 3.9 - I think that would be fine.

Tbh, quite an annoying mess these dependencies - sorry...

@j08lue
Copy link
Collaborator

j08lue commented Oct 24, 2024

Dask and other surrounding projects have already done this

Dask references NEP 29 — Recommend Python and NumPy version support as a community policy standard for motivation to drop Python 3.9 support (in their changelog).

Should we follow, @dionhaefner?

@dionhaefner
Copy link
Collaborator

Hmm if #347 (comment) works out of the box I think I prefer that

crick version 0.6.0 is the last version to support 3.9. It is compiled against numpy <2.0.0
@dionhaefner dionhaefner merged commit 657b64f into DHI:main Oct 24, 2024
5 of 7 checks passed
@jkittner
Copy link
Contributor Author

macos is missing the postgres binaries: pg_config (or they are not on PATH) that's why it fails compiling psycopg2 and building a wheel.
At least widnows and 3.9 works now...

@jkittner jkittner deleted the unpin-numpy branch October 24, 2024 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants