Allow drivers requiring extended attributes to use any xattr implementation #194
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.
There are two reasonably popular implementations of "xattr" on PyPI:
They both provide the same importable name, "import xattr", but provide different APIs once you do import it. There can only be one installed to any given python environment. Detect which one is available and utilize its API, rather than assume that the one preferred by this package's install_requires is the one actually installed in the current environment.
This aids people in manually crafting environments containing a mix of packages if any of them require pyxattr specifically. Unfortunately PyPA metadata standards do not support boolean "OR" dependency operators, so this is primarily useful to people installing software using a non-python package manager (such as a linux distro package manager).