-
-
Notifications
You must be signed in to change notification settings - Fork 859
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 to NumPy v2 and bump versions for several dependent packages #4925
Update to NumPy v2 and bump versions for several dependent packages #4925
Conversation
First failure is with building NumPy itself
which is just because it's included in |
The new error shows that the static libs are placed in newer paths as well. From https://github.com/numpy/numpy/blob/2176571e1c7e5040df7a3cdfd9f7d859f4feb014/numpy/_core/npymath.ini.in#L18 I see that it moved to |
2275a61
to
e47a0e1
Compare
Cooool! That's awesome. I agree that this should go to 0.27. While we try our best to update packages as much as possible to support Numpy 2.0, I think it is also an option to disable some of them temporarily if they do not support Numpy 2.0. |
@ryanking13, thanks for your input, I can look into disabling packages once I have further progress. Would you know of a way to reliably run the Selenium code in |
Could you share with me the error you get? Some of the package versions in our docker image (e.g. pytest) is outdated so it may cause some error, but I am not sure. |
Ah, I see it's a very standard error: $ python packages/numpy/test_numpy.py which gets me
I upgraded |
b9e4c84
to
b6b3238
Compare
NumPy test suite passing (not sure if this is the best way to handle the buffer), but I'll move on to the rest now. |
|
Here, I have updated OpenCV ( |
I think you need to call pytest not python.
FYI: I generally prefer verbose mode + chrome browser when testing locally.
|
Updating the package version is not required, but updates are always welcome. If you're having trouble updating, you can leave it for later.
Awesome! Thank you for updating these packages! |
Looks like we are good to merge now. Surfacing @ryanking13's suggestion from above:
I'll be doing this in follow-up PRs for PyArrow and LightGBM, and we don't need to wait for them for this PR. Thanks! |
I confirmed that all tests for all packages are passing by temporarily removing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much @agriyakhetarpal for all your hard work on this!
Actually, PyArrow requires a small patch to build it with NumPy 2.0, which I am working on upstreaming. |
I started https://github.com/pyodide/pyodide-numpy-2.0-rebuilds as a repository with my own account to build LightGBM and PyArrow separately, and upon transfer to the Pyodide organisation, GitHub decided to revoke my access to the repository's settings completely for some reason, just before I was going to finalise and release the built wheels (it's much better for the community for the wheels to point to a Pyodide repository rather than mine). We can archive the repository a bit later when we have a permalink to release artifacts. We also have the option of using the "dev" xbuildenv, as @ryanking13 had mentioned in #4925 (comment). The only reason why I didn't pursue this was because it, too, requires the CI job on the @hoodmane, could you please make me an administrator for that repository (or grant the "core" team administrator access to repositories, whichever is simpler) so that I can complete the rest of the work? I will never understand teams on GitHub 😅 |
@agriyakhetarpal I gave you admin role for |
Thanks! I went ahead with it, and a release is now up: https://github.com/pyodide/pyodide-numpy-2.0-rebuilds/releases/tag/v1.0.0. Attestations to verify the build provenance of the wheels are also included. I guess we can go ahead with merging this PR because all tests are passing, and focus on adding these two wheels in follow-ups (#5265 and #5266). |
Thank you, all, for those involved with the code review and guidance – and especially the recipe maintainers, for their relentless assistance with package updates. |
…pten, and update Pyodide-related documentation (#45072) ### Rationale for this change This change would allow building PyArrow correctly with NumPy 1.X and NumPy 2.X, since we are trying to do the latter for pyodide/pyodide#4925. This PR closes gh-45071. ### What changes are included in this PR? This PR - issues a correction for the NumPy header files when building under Emscripten - updates Pyodide-related build instructions ### Are these changes tested? Yes, working here: https://github.com/agriyakhetarpal/pyodide-numpy-2.0-rebuilds/actions/runs/12399351376/job/34619554658#step:8:4547 via agriyakhetarpal/pyodide@b651698 that applies a subset of the changes as a patch (the CI job is failing for unrelated reasons, please ignore). ### Are there any user-facing changes? Yes, users trying to build a WASM wheel via Pyodide are now requested to use newer Pyodide and Emscripten versions, and the latest stable version of `pyodide-build` available. * GitHub Issue: #45071 Authored-by: Agriya Khetarpal <74401230+agriyakhetarpal@users.noreply.github.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Description
This PR bumps the NumPy version in-tree to version 2.0.0, released on June 16, 2024. A lot of packages here are expected to fail with their builds because there has been an ABI change in NumPy, and many packages are being tracked in numpy/numpy#26191 – let us hope there won't be too many of them here. I would suggest that this goes into v0.27 rather than 0.26.2, not that there is a lot of time in 0.26.2 anyway... I shall try my best to update as many failing packages as I can in this PR, or open separate PRs for each of them if that would be better. I should be able to get an estimate once the CI runs. Versions of packages that are compatible with v2.0.0rc1 should be ABI-compatible with NumPy v2.
Checklists