Fallback to winkerberos if kerberos is not available (#504)#587
Merged
csringhofer merged 1 commit intocloudera:masterfrom Jun 26, 2025
Merged
Fallback to winkerberos if kerberos is not available (#504)#587csringhofer merged 1 commit intocloudera:masterfrom
csringhofer merged 1 commit intocloudera:masterfrom
Conversation
f4605bf to
7943f05
Compare
rizaon
reviewed
Jun 26, 2025
| # Try importing kerberos, then winkerberos as fallback. Report the original exception for kerberos. | ||
| try: | ||
| import kerberos | ||
| except ImportError as original_ex: |
Contributor
There was a problem hiding this comment.
Maybe log something about kerberos ImportError and fallback here?
Winkerberos is an alternative to kerberos package on Windows and has the same api, so can be used as a drop in replacement. Based on another PR: cloudera#504 The difference is that the current patch prefers kerberos if both are available to avoid the breaking existing workflows. setup.py is also not modified. To use winkerberos it has to be installed independently from impyla and impyla should be installed without [kerberos] extra.
rizaon
approved these changes
Jun 26, 2025
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.
Winkerberos is an alternative to kerberos package on Windows and has the same api, so can be used as a drop in replacement.
Based on another PR:
#504
The difference is that the current patch prefers kerberos if both are available to avoid the breaking existing worklflows. setup.py is also not modified. To use winkerberos it has to be installed independently from impyla and impyla should be installed without [kerberos] extra.