You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tsfile.apache.org by ColinLee <sh...@163.com> on 2026/08/26 10:55:43 UTC
[DISCUSS] Adjust Python dependency version constraints
Hi community,
An issue was recently reported in #921 regarding the strict PyArrow version constraints in the TsFile Python package. These constraints may cause dependency conflicts when users install newer versions of PyArrow:
https://github.com/apache/tsfile/issues/921
We reviewed the current implementation and did not find any code-level reason that requires an upper bound on the PyArrow version. Although the implementation uses PyArrow's `_import_from_c` and `_export_to_c` APIs, we tested them with multiple PyArrow versions and found no compatibility issues.
Therefore, we propose adjusting the Python dependency policy as follows:
1. Do not set upper version bounds for NumPy, pandas, or PyArrow.
2. Set only the minimum supported dependency versions according to the Python version.
3. If a future dependency release introduces an actual compatibility issue, we should first try to update the TsFile implementation to support it. A version restriction can be added later if necessary, based on the specific issue.
The proposed minimum PyArrow versions are:
- Python < 3.13: PyArrow >= 16
- Python 3.13: PyArrow >= 18
- Python >= 3.14: PyArrow >= 22
We have also adjusted the minimum NumPy and pandas versions according to their Python version support and aligned the build-time and runtime dependency constraints.
For verification, we tested both the minimum supported dependency combinations and the latest available dependency combinations. All related DataFrame tests passed (27/27) for every tested combination.
The complete remote test and build results are available here:
- Python unit-test matrix, 9/9 passed:
https://github.com/ColinLeeo/tsfile/actions/runs/32955466173
- Python wheel-build matrix, 11/11 passed:
https://github.com/ColinLeeo/tsfile/actions/runs/32955469256
The tests cover Linux, macOS, and Windows with multiple supported Python versions. The wheel builds cover Linux x86_64/aarch64, macOS x86_64/arm64, and Windows with Python 3.9–3.14.
To support the minimum NumPy version, 1.26, we also adjusted several DataFrame test assertions. Before calling `np.allclose`, pandas nullable floating-point Series are now explicitly converted to NumPy arrays. This change only affects test-side data conversion. It does not change the production implementation, actual read/write behavior, or assertion coverage.
Comments and suggestions on this dependency policy and the proposed version ranges are welcome. If no additional compatibility issues are identified, we plan to update the dependency configuration of the TsFile Python package accordingly.
Thanks,
Colin