Skip to content

[SPARK-57872][INFRA][4.0] Pin lxml==4.9.4 in Dockerfile for PyPy to recover branch-4.0 CI#56972

Closed
gaogaotiantian wants to merge 1 commit into
apache:branch-4.0from
gaogaotiantian:SPARK-57872-pin-lxml-branch-4.0
Closed

[SPARK-57872][INFRA][4.0] Pin lxml==4.9.4 in Dockerfile for PyPy to recover branch-4.0 CI#56972
gaogaotiantian wants to merge 1 commit into
apache:branch-4.0from
gaogaotiantian:SPARK-57872-pin-lxml-branch-4.0

Conversation

@gaogaotiantian

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR pins lxml==4.9.4 in the PyPy pip install commands in dev/infra/Dockerfile and dev/spark-test-image/pypy-310/Dockerfile on branch-4.0. It backports #56950 (branch-4.1) to branch-4.0.

Why are the changes needed?

The branch-4.0 base image build fails because pip pulls the newest lxml, which builds from source and requires the libxml2/libxslt development headers that are not available in the PyPy build stage:

Error: Please make sure the libxml2 and libxslt development packages are installed.
ERROR: Failed to build 'lxml' when getting requirements to build wheel
ERROR: process "/bin/sh -c pypy3 -m pip install numpy 'six==1.16.0' 'pandas==2.2.3' scipy coverage matplotlib lxml" did not complete successfully: exit code: 1

This is the same failure fixed on master by SPARK-56513, which pinned both meson<1.11.0 and lxml==4.9.4. meson has since been fixed upstream, so only the lxml pin is needed here. 4.9.4 is consistent with the version specified in .github/workflows/build_and_test.yml.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

CI.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Opus 4.8)

… recover branch-4.0 CI

### What changes were proposed in this pull request?
This PR pins `lxml==4.9.4` in the PyPy `pip install` commands in `dev/infra/Dockerfile` and `dev/spark-test-image/pypy-310/Dockerfile` on branch-4.0.

### Why are the changes needed?
The branch-4.0 base image build fails because pip pulls the newest `lxml`, which builds from source and requires the libxml2/libxslt development headers that are not available in the PyPy build stage:
```
Error: Please make sure the libxml2 and libxslt development packages are installed.
ERROR: Failed to build 'lxml' when getting requirements to build wheel
ERROR: process "/bin/sh -c pypy3 -m pip install numpy 'six==1.16.0' 'pandas==2.2.3' scipy coverage matplotlib lxml" did not complete successfully: exit code: 1
```

This is the same failure fixed on master by [SPARK-56513](apache#55369), which pinned both `meson<1.11.0` and `lxml==4.9.4`. `meson` has since been fixed upstream, so only the `lxml` pin is needed here. `4.9.4` is consistent with the version specified in `.github/workflows/build_and_test.yml`.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
CI.

### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8)

@uros-b uros-b left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

gaogaotiantian added a commit that referenced this pull request Jul 6, 2026
… recover branch-4.0 CI

### What changes were proposed in this pull request?
This PR pins `lxml==4.9.4` in the PyPy `pip install` commands in `dev/infra/Dockerfile` and `dev/spark-test-image/pypy-310/Dockerfile` on branch-4.0. It backports #56950 (branch-4.1) to branch-4.0.

### Why are the changes needed?
The branch-4.0 base image build fails because pip pulls the newest `lxml`, which builds from source and requires the libxml2/libxslt development headers that are not available in the PyPy build stage:
```
Error: Please make sure the libxml2 and libxslt development packages are installed.
ERROR: Failed to build 'lxml' when getting requirements to build wheel
ERROR: process "/bin/sh -c pypy3 -m pip install numpy 'six==1.16.0' 'pandas==2.2.3' scipy coverage matplotlib lxml" did not complete successfully: exit code: 1
```

This is the same failure fixed on master by [SPARK-56513](#55369), which pinned both `meson<1.11.0` and `lxml==4.9.4`. `meson` has since been fixed upstream, so only the `lxml` pin is needed here. `4.9.4` is consistent with the version specified in `.github/workflows/build_and_test.yml`.

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
CI.

### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8)

Closes #56972 from gaogaotiantian/SPARK-57872-pin-lxml-branch-4.0.

Authored-by: Tian Gao <gaogaotiantian@hotmail.com>
Signed-off-by: Tian Gao <gaogaotiantian@hotmail.com>
@gaogaotiantian

Copy link
Copy Markdown
Contributor Author

Thank you, merged to branch-4.0

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