Repository navigation
GH-53954: [Python] Declare NumPy runtime dependency - #53971
Closed
1932819331hy-debug wants to merge 1 commit into
Closed
1932819331hy-debug wants to merge 1 commit into
1932819331hy-debug wants to merge 1 commit into
Conversation
PyArrow's build requires NumPy >=2.0, and the extension rejects NumPy 1.x at import time. Declare the same minimum as a project dependency so installers resolve a compatible runtime version.
1932819331hy-debug
requested review from
AlenkaF,
raulcd and
rok
as code owners
October 16, 2026 11:17
|
|
raulcd
requested changes
Oct 16, 2026
| name = "pyarrow" | ||
| dynamic = ["version"] | ||
| requires-python = ">=3.11" | ||
| dependencies = ["numpy>=2.0"] |
Member
There was a problem hiding this comment.
Numpy is not a required runtime dependency of the project.
Author
There was a problem hiding this comment.
Thanks for clarifying. I understand that NumPy must remain optional, so declaring it in [project].dependencies is not the right fix. The reported failure is triggered when NumPy 1.x is installed; could you point me to the intended resolution for that case? I’ll adjust the PR accordingly.
Member
|
Fully automated PRs are not welcome, see https://arrow.apache.org/docs/developers/overview.html#ai-generated-code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
PyArrow's Python extension requires NumPy 2.0 or newer, but that requirement is currently only declared in the build environment. A user can therefore install the package alongside NumPy 1.x and encounter an import-time failure.
What changes are included in this PR?
Adds
dependencies = ["numpy>=2.0"]to the Python project metadata so package installers resolve the required NumPy runtime version.Are these changes tested?
Not run locally. This metadata-only change should be verified by the project's packaging and CI checks.
Are there any user-facing changes?
Yes. Installing PyArrow from package metadata will require NumPy 2.0 or newer, matching the extension's runtime requirement.
Was AI used for this PR?
PR code and description written by: AI
Reviewed before submission by: AI