GH-50176: [Python] Explicitly pass exc_type=ImportError to importorskip pyarrow.*#50177
Open
raulcd wants to merge 1 commit into
Open
GH-50176: [Python] Explicitly pass exc_type=ImportError to importorskip pyarrow.*#50177raulcd wants to merge 1 commit into
raulcd wants to merge 1 commit into
Conversation
…rtorskip pyarrow.*
Member
Author
|
@github-actions crossbow submit example-python-minimal-build-ubuntu-venv |
|
|
Contributor
There was a problem hiding this comment.
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=ImportErrortopytest.importorskip("pyarrow.cuda")in multiple CUDA-related tests. - Add
exc_type=ImportErrortopytest.importorskip("pyarrow.flight")in async Flight tests. - Add
exc_type=ImportErrortopytest.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. |
|
Revision: a7c1ba7 Submitted crossbow builds: ursacomputing/crossbow @ actions-acc9ec4d28
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=ImportErrorto thepytest.importorskip("pyarrow.*)callsAre these changes tested?
Via CI
Are there any user-facing changes?
No