Skip to content

[python] Fix missing HTTP runtime dependencies#8044

Merged
JingsongLi merged 1 commit into
apache:masterfrom
XiaoHongbo-Hope:fix/pypaimon-requests-runtime
May 31, 2026
Merged

[python] Fix missing HTTP runtime dependencies#8044
JingsongLi merged 1 commit into
apache:masterfrom
XiaoHongbo-Hope:fix/pypaimon-requests-runtime

Conversation

@XiaoHongbo-Hope

@XiaoHongbo-Hope XiaoHongbo-Hope commented May 31, 2026

Copy link
Copy Markdown
Contributor

Purpose

When users install PyPaimon in a clean environment with pip install pypaimon, importing pypaimon can
fail because requests is missing:

ModuleNotFoundError: No module named 'requests'

This was not obvious in 1.3.x because ossfs was still a runtime dependency, and it pulled in requests
and urllib3 transitively. In 1.4.x, ossfs was moved to optional dependencies, so clean installations no
longer get these HTTP dependencies for free.

The issue also tends to be hidden in many user/dev environments because requests and urllib3 are very
common packages and are often already installed by other tools or dependencies.

urllib3 is also declared explicitly because PyPaimon directly imports urllib3.Retry, so we should
not rely on the transitive dependency from requests.

Tests

@XiaoHongbo-Hope XiaoHongbo-Hope force-pushed the fix/pypaimon-requests-runtime branch from 6a2ab9b to 353d82f Compare May 31, 2026 03:53
@XiaoHongbo-Hope XiaoHongbo-Hope changed the title [python] Add missing HTTP runtime dependencies [python] Fix missing HTTP runtime dependencies May 31, 2026
@XiaoHongbo-Hope XiaoHongbo-Hope marked this pull request as ready for review May 31, 2026 03:57

@leaves12138 leaves12138 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.

Thanks for the fix. Adding the HTTP runtime dependencies to the Python requirements is small and targeted, and CI is green. Looks good to me.

@JingsongLi

Copy link
Copy Markdown
Contributor

@XiaoHongbo-Hope Please merge #7960 first and rebase.

@XiaoHongbo-Hope XiaoHongbo-Hope force-pushed the fix/pypaimon-requests-runtime branch from 353d82f to 26e3b9a Compare May 31, 2026 13:56
@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi JingsongLi merged commit 72027ef into apache:master May 31, 2026
6 checks passed
XiaoHongbo-Hope added a commit that referenced this pull request Jun 3, 2026
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.

3 participants