Skip to content

[python] Drop pyarrow upper bound for Python >= 3.8 - #7736

Closed
TheR1sing3un wants to merge 1 commit into
apache:masterfrom
TheR1sing3un:py-setup-inline-deps
Closed

TheR1sing3un wants to merge 1 commit into
apache:masterfrom
TheR1sing3un:py-setup-inline-deps

Conversation

@TheR1sing3un

Copy link
Copy Markdown
Member

Purpose

dev/requirements.txt currently pins pyarrow>=16,<20; python_version >= "3.8". PyArrow 20 has been released, so the upper bound now blocks installation in any environment where a newer pyarrow is already resolved (e.g. via a downstream library, or via pip install on a fresh interpreter where 20+ is the latest wheel).

There is no code reason for the cap: pypaimon already uses runtime version gates (_pyarrow_lt_7, _pyarrow_gte_8, etc.) inside pyarrow_file_io.py for the API differences it cares about. Removing the cap lets pip pick the latest compatible release without giving up any correctness guarantee that's actually enforced today.

The 3.7-and-older line (pyarrow>=6,<7; python_version < "3.8") is left untouched because pyarrow 6 is the last release with manylinux wheels for those interpreters.

Linked issue

N/A — surfaced when installing pypaimon into an environment that already had pyarrow 20.

Tests

  • pytest pypaimon/tests/file_io_test.py pypaimon/tests/rest/client_test.py → green locally on pyarrow 16.
  • No code change; the existing CI matrix (3.6 / 3.10 / 3.11) will exercise pyarrow resolution end-to-end.

API and format

No public API change. No file format change.

Documentation

N/A.

Generative AI disclosure

Drafted with assistance from an AI coding tool; rationale verified against the runtime version gates already present in pypaimon/filesystem/pyarrow_file_io.py.

The current pin is `pyarrow>=16,<20; python_version >= "3.8"`. PyArrow 20
has been released, so the upper bound now blocks installation for users
who already have a newer pyarrow on their environment.

The pypaimon code already uses runtime version gates
(`_pyarrow_lt_7`, `_pyarrow_gte_8`, etc.) for the API differences it
cares about, so there is no compile-time reason for the cap. Drop it
and let pip pick the latest compatible release.

The 3.7-and-older constraint (`pyarrow>=6,<7; python_version < "3.8"`)
is left untouched because pyarrow 6 is the last version that ships
manylinux wheels for those interpreters.
@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor

Could you please double check that pyarrow 23.0 work well in OSS?

@TheR1sing3un

Copy link
Copy Markdown
Member Author

Could you please double check that pyarrow 23.0 work well in OSS?

We are currently using pyarrow 23.0.1 on a large scale cluster, and everything seems to be going well for now? Have you encountered any problems with the new version in your practice? Thanks~

@XiaoHongbo-Hope

Copy link
Copy Markdown
Contributor

Could you please double check that pyarrow 23.0 work well in OSS?

We are currently using pyarrow 23.0.1 on a large scale cluster, and everything seems to be going well for now? Have you encountered any problems with the new version in your practice? Thanks~

Yes, we met. pyarrow 23 has some issue, such as AWS Error UNKNOWN (HTTP status 400) during UploadPart operation: Unable to parse ExceptionName: InvalidArgument Message: aws-chunked encoding is not supported with the specified x-amz-content-sha256 value. Not only one user met this issue.

@TheR1sing3un

Copy link
Copy Markdown
Member Author

Yes, we met. pyarrow 23 has some issue, such as AWS Error UNKNOWN (HTTP status 400) during UploadPart operation: Unable to parse ExceptionName: InvalidArgument Message: aws-chunked encoding is not supported with the specified x-amz-content-sha256 value. Not only one user met this issue.

Thank you for your friendly reminder. Let me pending this pr first. After I investigate the issues related to pyarrow version 23, I'll come back and continue the discussion with you! Thanks!

@TheR1sing3un

Copy link
Copy Markdown
Member Author

I did some research and you are indeed right. It seems that this version of pyarrow uses some aws sdk versions with disruptive changes. The reason why we haven't encountered any internal issues might be that we haven't used S3-compatible storage. We are running well on hdfs. Thank you very much for pointing out my wrong judgment. I'm now closing this pr

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.

2 participants