Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the check for extra dependencies required by certain providers #1568

Merged
merged 2 commits into from Jun 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lexicon/client.py
Expand Up @@ -115,7 +115,7 @@ def _validate_config(self) -> None:
if not available:
raise ProviderNotAvailableError(
f"This provider ({provider_name}) has required extra dependencies that are missing. "
f"Please run `pip install lexicon[{provider_name}]` first before using it."
f"Please run `pip install dns-lexicon[{provider_name}]` first before using it."
)

if not self.config.resolve("lexicon:action"):
Expand Down
2 changes: 1 addition & 1 deletion lexicon/discovery.py
Expand Up @@ -50,7 +50,7 @@ def _resolve_requirements(provider: str, distribution: Distribution) -> bool:
raise ValueError("Error while trying finding requirements.")

requirements = [
re.sub(r"^(.*)\s\(.*\)(?:;.*|)$", r"\1", requirement)
re.sub(r"^(.*)\s\(.*\)(?:\s*;.*|)$", r"\1", requirement)
for requirement in requires
if f'extra == "{provider}"' in requirement
]
Expand Down