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

Update numpy req to 2 #1051

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Update numpy req to 2 #1051

wants to merge 1 commit into from

Conversation

paulf81
Copy link
Collaborator

@paulf81 paulf81 commented Dec 12, 2024

Update numpy req to 2

Testing an update based on #1030 where the numpy requirement is pushed up to compatiable version of 2.0.

An alternative approach would be to span version 1 and 2 using > and < operators, but I understand this to be non-preferred in semantic versioning, since testing would only apply to newer major version, and so the previous major version is not truly supported.

Using this PR also to check if having the requirement at ~=2.0 raises any incompatibilities.

Related issue

#1030

@paulf81 paulf81 requested review from rafmudaf and misi9170 December 12, 2024 23:13
@paulf81 paulf81 self-assigned this Dec 12, 2024
@misi9170
Copy link
Collaborator

I'm OK with going up to ~=2.0. We'll also be dropping support for python 3.8 in the next minor FLORIS version #1042 , and this feels like a similar thing. However, there are likely to be users that will still be on numpy 1.x, who may be prevented from upgrading to FLORIS 4.3 if we introduce this requirement.

@thebaptiste
Copy link

thebaptiste commented Jan 10, 2025

May be you could check it works with numpy 2 (and fix incompatibilities if necessary) but set numpy requirement to numpy>=1.20 or something like numpy>=1.20,<2.1 (if its possible to have a code working with both numpy 1.20 and numpy 2.0... or even better 2.1 or 2.2 !) in order to let users choose between numpy 1.20 and numpy 2.0 ?

Dependencies with ~= will often be a problem for users if they want to use together floris and other packages... and in any case it's an investment in the future for a user or a project to move from numpy 1 to numpy 2 !

@thebaptiste
Copy link

thebaptiste commented Jan 10, 2025

Here is another problem with requirement numpy~=1.20 : if you want to use together both floris and numpy 2.0 (even numpy 2.2), it's possible ! you have to use... floris 3.5 ! because in floris 3.5 the requirement was numpy>=1.20. Awful isn't it ? (it probably doesn't work but it's possible to install !). Try pip install floris==3.5.

I think there will be more difficulties for the majority of users if you do not upgrade to numpy 2.x than if you upgrade to numpy 2.x
There are less and less packages not compatible with numpy 2.0, Floris is one of them...
I think it's better to encourage users to upgrade to numpy 2 (for their own good) if they want to use new floris functionalities than to keep them in their "dead end" with numpy 1.20...

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