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

build(python): Add support for NumPy 2.0 #17384

Merged
merged 2 commits into from
Jul 3, 2024
Merged

build(python): Add support for NumPy 2.0 #17384

merged 2 commits into from
Jul 3, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Jul 3, 2024

Closes #16998

Changes

  • Pin the numpy crate in Cargo.toml to a git commit that includes NumPy 2.0 support. The git commit is based on Add support for Numpy 2.x PyO3/rust-numpy#429 and includes a minor fix to enable Windows support.
  • Remove < 2.0.0 version constraint for NumPy dependency

We are dependent on the numpy crate for NumPy support. There is a PR open that adds NumPy 2.0 support, however, it is still in review. We understand that reviews in open source take time, since we are open source maintainers ourselves. However, due to the great impact on our users, we elect to build Polars based off of that PR. This passes our full test suite, both on NumPy 1.26 and 2.0.

@github-actions github-actions bot added build Changes that affect the build system or external dependencies python Related to Python Polars labels Jul 3, 2024
@stinodego stinodego force-pushed the numpy-2-support branch 2 times, most recently from 101dd98 to f928029 Compare July 3, 2024 06:30
@stinodego stinodego changed the title build(python): Support NumPy 2.0 build(python): Add support for NumPy 2.0 Jul 3, 2024
@stinodego stinodego marked this pull request as ready for review July 3, 2024 06:38
@ritchie46
Copy link
Member

@stinodego can we for the PR and make it u64 for windows?

Once we can have it running we can also add that feedback to the original PR.

@stinodego stinodego marked this pull request as draft July 3, 2024 07:39
@stinodego stinodego marked this pull request as ready for review July 3, 2024 08:45
@stinodego
Copy link
Member Author

@stinodego can we for the PR and make it u64 for windows?

Once we can have it running we can also add that feedback to the original PR.

Done and provided feedback to the original PR 👍

@ritchie46 ritchie46 merged commit 276655a into main Jul 3, 2024
20 checks passed
@ritchie46 ritchie46 deleted the numpy-2-support branch July 3, 2024 09:14
@stinodego stinodego mentioned this pull request Jul 4, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Changes that affect the build system or external dependencies python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support NumPy 2.0
2 participants