-
Notifications
You must be signed in to change notification settings - Fork 471
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
pint 0.24 / numpy 2.0 / python 3.9 issues #1974
Comments
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. |
I'm not sure how best to handle the |
I would forward #1960 is a documentation-only PR (and from a quick glance I can't see anything wrong), so I think that PR is fine? |
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 0.23 with numpy 2 installed results in the I'm going to update on conda-forge to add a constraint for numpy < 2. |
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 |
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. |
0.24 released |
Thanks Andrew! 🙏 |
If anyone else is still seeing the |
This build is can no longer supported because of known issues with the pint module hgrecco/pint#1974 (comment)
This is an issue on Ubuntu 22.04. Would it be possible to tag a new point release |
Unfortunately I don't think that a new point release with metadata saying it needs numpy 1.x really solves this, because the dependency resolver is still free to pick pint 0.23, which appears to the tools to be compatible with numpy 2.0. In some cases it might decide to downgrade numpy instead, but not reliably. Further complicating it, numpy is an optional dependency of pint. So if you The possible fixes I'm aware of here are:
|
I'm not opposed to this. Was this https://github.com/takluyver/pint/tree/0.23-np-2.0 what you tried? Did you look at making 0.24 work with 3.9? |
numpy=2.0
?
Thanks, that would be great! That was the branch I was trying on, working
forwards from the 0.23 tag and trying to cherry pick the necessary changes.
I tried working backwards from 0.24 first, but quickly got conflicts as I
reverted commits, so I switched the approach. I didn't get far enough to
push that. But I now suspect that was the better plan after all.
I'm away from my computer for a few days, but I can look into this again
next week if no-one else tackles it.
…On Fri, 21 Jun 2024, 08:49 andrewgsavage, ***@***.***> wrote:
- Pint makes a new release that's compatible with both Python 3.9 and
Numpy 2.0. I think this ought to be easy in principle - it's only been a
few months since Pint dropped 3.9 support - but I spent a while on it, and
unfortunately neither undoing the 3.9 changes nor redoing the numpy changes
was straightforward.
I'm not opposed to this. Was this
https://github.com/takluyver/pint/tree/0.23-np-2.0 what you tried? Did
you look at making 0.24 work with 3.9?
—
Reply to this email directly, view it on GitHub
<#1974 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQB5NDECIGA45YSC4GO2DZIPLHXAVCNFSM6AAAAABG6O7422VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSGE4TSNZZG4>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I've got 0.24 working with py39 #2019 so I'll make 0.24.1 available for py39. |
Thanks! Yes, looking at the diff, that was much easier than what I was
trying
…On Fri, 21 Jun 2024, 09:42 andrewgsavage, ***@***.***> wrote:
I've got 0.24 working with py39 #2019
<#2019> so I'll make 0.24.1 available
for py39.
some seemingly unrelated failures though...
—
Reply to this email directly, view it on GitHub
<#1974 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQB5IRWG5VNG4SAM2JSGTZIPRNZAVCNFSM6AAAAABG6O7422VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSGI4TENZUHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I think the all PRs needed to fix issues for 0.24.1 are now merged. would be good to confirm the babel issue #2006 |
0.24.1 released |
Thanks @andrewgsavage ! |
numpy>=2
will include a couple of breaking changes (to be released soonish), so it would be good to have a release ofpint
before that (I'd also love to have #1922 in a release, as it will fix some typing issues onpython>=3.12
)Most of the urgent issues have already been fixed, the only thing left is #1971.
Other than that,
__array__
has gained a optionalcopy
kwarg which we should add (the version of__array__
withoutcopy
will cause a deprecation warning).The text was updated successfully, but these errors were encountered: