Closed marvinvanaalst closed 1 year ago
Yes that makes sense. Feel free to send in a PR that pins numpy to a lower version in the setup.cfg.
Feel free to send in a PR that pins numpy to a lower version in the setup.cfg. This is the wrong solution. It hides the problem of using deprecated numpy-calls, The title wrongly suggests that numpy needs to fix an issue,
Pinning numpy to a lower-version only makes sense when the problem arises in the thirdparty package you cannot control.
in this case the problem is only a single np.float in https://github.com/opencobra/cobrapy/blob/devel/src/cobra/io/dict.py#L71
PR welcome 😉
Feel free to send in a PR that pins numpy to a lower version in the setup.cfg. This is the wrong solution. It hides the problem of using deprecated numpy-calls, The title wrongly suggests that numpy needs to fix an issue,
Pinning numpy to a lower-version only makes sense when the problem arises in the thirdparty package you cannot control.
in this case the problem is only a single np.float in https://github.com/opencobra/cobrapy/blob/devel/src/cobra/io/dict.py#L71
This problem is not confined to cobrapy, but also occurs for example in osqp, see this issue, which is a dependency of cobrapy. Since the corresponding PR has not been merged yet, I don't see a better solution at this point in time
PR welcome :wink:
The PR is here :slightly_smiling_face:
Ah, great. I'm not involved in the OSQP project so I can't help it along unfortunately.
It usually takes a while, but the OSQP folks have always come through in the past.
This has now been fixed in osqp==0.6.2.post9
and cobrapy==0.26.3
. I will remove the numpy pin for the next release.
Problem description
The numpy people marked aliases of builtin types like
np.bool
ornp.float
as deprecated in version 1.20.0. They are effectively deprecated with version 1.24.0 which was just released.This leads to a bunch of
AttributeError
s, likeYour
setup.cfg
states compatability fornumpy ~=1.13
which includes all minor versions >= 13 and thus causes CI to crash on this (but that's on the numpy folks).I've started fixing this in my fork but noticed during the tests that some of the dependencies like osqp have the same issue.
The best short-term fix is probably to exclude numpy versions
>=1.24
until all the dependencies have caught up on this.