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

release before numpy=2.0? #1974

Open
keewis opened this issue Apr 29, 2024 · 7 comments
Open

release before numpy=2.0? #1974

keewis opened this issue Apr 29, 2024 · 7 comments

Comments

@keewis
Copy link
Contributor

keewis commented Apr 29, 2024

numpy>=2 will include a couple of breaking changes (to be released soonish), so it would be good to have a release of pint before that (I'd also love to have #1922 in a release, as it will fix some typing issues on python>=3.12)

Most of the urgent issues have already been fixed, the only thing left is #1971.

Other than that, __array__ has gained a optional copy kwarg which we should add (the version of __array__ without copy will cause a deprecation warning).

@cmutel
Copy link

cmutel commented May 12, 2024

In case anyone is having weird pint errors, or getting this error:

AttributeError: module 'numpy' has no attribute 'cumproduct'. Did you mean: 'cumprod'?

It's because you installed Numpy 2.0.RC1, which isn't yet supported.

@andrewgsavage
Copy link
Collaborator

I'm not sure how best to handle the __array__(copy) issue, we don't handle other optional args at present.
Other than that seems like 2.0 works now - I've added it to the matrix.(maybe too a bit too many places)

@andrewgsavage
Copy link
Collaborator

I think #1978 and #1960 could be merged if someone has the time to review.

Otherwise I think we're ready for a new release. Are there any other PRs that could be merged?

@keewis
Copy link
Contributor Author

keewis commented May 13, 2024

I would forward copy to the wrapped array, but in any case this is not urgent, since not having that argument will warn, not raise.

#1960 is a documentation-only PR (and from a quick glance I can't see anything wrong), so I think that PR is fine?

@dopplershift
Copy link
Contributor

We're officially on the clock here, as NumPy 2.0 will release 16 June 2024.

It would be good to get some kind of release out the door since currently importing pint with numpy 2 installed results in the AttributeError noted above.

I'm going to update on conda-forge to add a constraint for numpy < 2.

@jakirkham
Copy link

Do we know what issues still remain here?

Curious if anyone has tried to run the test suite with NumPy 2. If so, would be curious to know what that reveals

@andrewgsavage
Copy link
Collaborator

We're officially on the clock here, as NumPy 2.0 will release 16 June 2024.

I've released a pre-release. We've said to leave a week before full release so 0.24 can be released on the 8th.

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

No branches or pull requests

5 participants