Skip to content

Fix/relax pyarrow constraint - #922

Merged
ColinLeeo merged 2 commits into
apache:developfrom
ColinLeeo:fix/relax-pyarrow-constraint
Aug 26, 2026
Merged

Fix/relax pyarrow constraint#922
ColinLeeo merged 2 commits into
apache:developfrom
ColinLeeo:fix/relax-pyarrow-constraint

Conversation

@ColinLeeo

@ColinLeeo ColinLeeo commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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

  • Remove the PyArrow upper-bound constraints.
  • Define the minimum PyArrow version by Python version:
    • Python < 3.13: pyarrow>=16
    • Python 3.13: pyarrow>=18
    • Python >= 3.14: pyarrow>=22
  • Align the minimum NumPy and pandas versions with their Python-version support.
  • Keep the build-system and runtime dependency constraints consistent.
  • Adjust DataFrame tests to remain compatible with NumPy 1.26 and pandas nullable floating-point types.

Verification

The following dependency combinations were tested locally:

  • Minimum supported dependency versions on Python 3.12, 3.13, and 3.14
  • Latest available NumPy, pandas, and PyArrow versions

All DataFrame-related tests passed (27/27) for every tested combination.

The complete GitHub Actions validation also passed:

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.txt and pyproject.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.

@ColinLeeo
ColinLeeo merged commit 27655ab into apache:develop Aug 26, 2026
29 checks passed
@ColinLeeo
ColinLeeo deleted the fix/relax-pyarrow-constraint branch August 26, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python SDK: can pyarrow>=18,<20 on 3.10-3.13 be widened to overlap datasets (pyarrow>=21)?

2 participants