Skip to content

GH-50176: [Python] Explicitly pass exc_type=ImportError to importorskip pyarrow.*#50177

Open
raulcd wants to merge 1 commit into
apache:mainfrom
raulcd:GH-50176
Open

GH-50176: [Python] Explicitly pass exc_type=ImportError to importorskip pyarrow.*#50177
raulcd wants to merge 1 commit into
apache:mainfrom
raulcd:GH-50176

Conversation

@raulcd

@raulcd raulcd commented Jun 15, 2026

Copy link
Copy Markdown
Member

Rationale for this change

Some of our CI jobs are failing due to a breaking change on pytest 9.1:
pytest-dev/pytest#14293

What changes are included in this PR?

Add exc_type=ImportError to the pytest.importorskip("pyarrow.*) calls

Are these changes tested?

Via CI

Are there any user-facing changes?

No

Copilot AI review requested due to automatic review settings June 15, 2026 13:41
@raulcd raulcd requested review from AlenkaF and rok as code owners June 15, 2026 13:41
@raulcd

raulcd commented Jun 15, 2026

Copy link
Copy Markdown
Member Author

@github-actions crossbow submit example-python-minimal-build-ubuntu-venv

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50176 has been automatically assigned in GitHub to PR creator.

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 PyArrow’s Python test suite to remain compatible with pytest 9.1’s changed pytest.importorskip behavior by explicitly specifying exc_type=ImportError when conditionally importing optional pyarrow.* submodules.

Changes:

  • Add exc_type=ImportError to pytest.importorskip("pyarrow.cuda") in multiple CUDA-related tests.
  • Add exc_type=ImportError to pytest.importorskip("pyarrow.flight") in async Flight tests.
  • Add exc_type=ImportError to pytest.importorskip("pyarrow.parquet") in a dataset test that conditionally requires parquet.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
python/pyarrow/tests/test_table.py Make CUDA fixture skip logic explicit under pytest 9.1.
python/pyarrow/tests/test_io.py Make CUDA-dependent buffer test skip logic explicit under pytest 9.1.
python/pyarrow/tests/test_flight_async.py Make optional Flight import skip logic explicit under pytest 9.1.
python/pyarrow/tests/test_dlpack.py Make CUDA-dependent DLPack test skip logic explicit under pytest 9.1.
python/pyarrow/tests/test_dataset.py Make parquet-optional test skip logic explicit under pytest 9.1.
python/pyarrow/tests/test_cuda.py Make CUDA and CFFI optional imports skip logic explicit under pytest 9.1.
python/pyarrow/tests/test_cuda_numba_interop.py Make CUDA optional import skip logic explicit under pytest 9.1.
python/pyarrow/tests/test_array.py Make CUDA-dependent array test skip logic explicit under pytest 9.1.

@github-actions

Copy link
Copy Markdown

Revision: a7c1ba7

Submitted crossbow builds: ursacomputing/crossbow @ actions-acc9ec4d28

Task Status
example-python-minimal-build-ubuntu-venv GitHub Actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants