GH-51446: [CI][Python] Fix test collection errors when Parquet encryption is unavailable - #51457
Merged
Merged
Conversation
|
|
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Fixes test collection failures when Parquet encryption is unavailable.
Changes:
- Defers
InMemoryKmsClientresolution until the factory is used. - Preserves encrypted-test behavior.
| File | Description |
|---|---|
python/pyarrow/tests/parquet/test_encryption.py |
Prevents NameError during test collection without encryption support. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Member
|
@github-actions crossbow submit example-python-minimal-build-fedora-conda example-python-minimal-build-ubuntu-venv test-conda-python-3.12-pandas-latest-numpy-latest test-conda-python-3.13-pandas-latest-numpy-2.1.3 test-conda-python-3.13-pandas-latest-numpy-latest |
|
Revision: c30ee4b Submitted crossbow builds: ursacomputing/crossbow @ actions-fc4c60f35b |
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
Fixes test collection failing in nightly builds that don't have Parquet encryption enabled.
What changes are included in this PR?
Don't reference
InMemoryKmsClientin function signatures, it's not defined ifpyarrow.parquet.encryptioncan't be imported.Are these changes tested?
Yes, I reproduced the crash collecting tests without encryption enabled and verified this is fixed, and also verified the tests still work with encryption enabled.
Are there any user-facing changes?
No
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by: