EnergySystemsModellingLab / MUSE_OS

Welcome to the MUSE-OS repository
https://muse-os.readthedocs.io/en/latest/
GNU General Public License v3.0
21 stars 9 forks source link

Incompatible with Numpy 2.1.0 #459

Closed tsmbland closed 2 days ago

tsmbland commented 3 months ago

Using Numpy 2.1.0 I get the following error repeated many times throughout the tests

DeprecationWarning: __array__ implementation doesn't accept a copy keyword, so passing copy=False failed. __array__ must implement 'dtype' and 'copy' keyword arguments.

MUSE is still able to run just fine, but this error is causing the the tests to fail

tsmbland commented 2 months ago

@dalonsoa Turns out Numpy 2.1 drops support for Python 3.9, so we're stuck with 2.0 unless we want to stop supporting Python 3.9 https://numpy.org/devdocs/release/2.1.0-notes.html

dalonsoa commented 2 months ago

Up to you and @ahawkes . In principle, 3.9 will receive security updates for one more year, then it's over. So, from October next year, I don't think we should support it. For this year... depends on how many users we have. Maybe add a deprecation warning if the user is using 3.9 saying something like:

"MUSE support for Python 3.9 will be dropped in December 2024. Please, transition to a more modern version of Python."

or something along these lines.

tsmbland commented 2 days ago

Still something to be aware of, but I unpinned the Numpy version in #564, so now it will install the appropriate version depending on which Python version is being used (2.0.2 on 3.9; 2.1.3 on 3.13 as of 20/11/24)