Fix/relax pyarrow constraint - #922
Merged
ColinLeeo merged 2 commits intoAug 26, 2026
Merged
Conversation
ColinLeeo
requested review from
hongzhi-gao and
jt2594838
and
a lite review from Copilot
August 26, 2026 11:00
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Apache TsFile Python module’s dependency constraints to remove historical upper bounds (notably for PyArrow) and instead express minimum supported versions for NumPy, pandas, and PyArrow based on the active Python version. It also updates DataFrame-related tests to remain compatible with pandas nullable floating dtypes.
Changes:
- Relax dependency constraints by replacing upper bounds with Python-version-based minimums for NumPy, pandas, and PyArrow (kept consistent between
requirements.txtandpyproject.toml). - Update DataFrame float comparisons in tests to compare explicit NumPy arrays (with explicit dtypes) for compatibility with nullable float dtypes.
- Align PyArrow minimum versions to allow co-installation with ecosystems requiring newer PyArrow (e.g.,
pyarrow>=21).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| python/requirements.txt | Updates build/install requirements to Python-version-based minimums for NumPy/pandas/PyArrow (no upper bounds). |
| python/pyproject.toml | Aligns build-system and runtime dependency markers with the new minimum-version policy. |
| python/tests/test_dataframe.py | Makes float/double comparisons robust to pandas nullable float dtypes by using to_numpy(..., dtype=..., na_value=...). |
| python/tests/test_to_tsfile.py | Applies the same float/double comparison adjustment for the DataFrame-to-TsFile roundtrip test. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Description
This PR relaxes and aligns the Python dependency constraints for NumPy, pandas, and PyArrow.
The previous PyArrow upper-bound constraint appears to be a historical restriction rather than a requirement imposed by the current implementation. We verified the Python bindings with newer PyArrow versions, including the Arrow C Data Interface calls used by TsFile, and found no compatibility issues.
Instead of setting upper bounds, this PR defines the minimum supported dependency versions according to the Python version. If a future dependency release introduces an actual incompatibility, we will address it in the implementation or adjust the constraints based on the concrete issue.
Closes #921.
Changes
pyarrow>=16pyarrow>=18pyarrow>=22Verification
The following dependency combinations were tested locally:
All DataFrame-related tests passed (
27/27) for every tested combination.The complete GitHub Actions validation also passed:
9/9passed11/11passed