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

clearer error message when ssl is not available #2280

Merged
merged 1 commit into from
Nov 7, 2021
Merged

Conversation

davidism
Copy link
Member

@davidism davidism commented Nov 7, 2021

As pointed out by @cooperlees in PyCQA/flake8-bugbear#190, the error message when SSL was unavailable was not very clear. Now it explains that Python wasn't compiled with SSL support.

@davidism davidism merged commit bdd2e05 into 2.0.x Nov 7, 2021
@davidism davidism deleted the ssl-error-message branch November 7, 2021 20:34
Copy link

@cooperlees cooperlees left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Just some suggestions that make it super clear to me.

@@ -39,7 +39,10 @@

class _SslDummy:
def __getattr__(self, name: str) -> t.Any:
raise RuntimeError("SSL support unavailable") # noqa: B904
raise RuntimeError( # noqa: B904
"SSL is unavailable because this Python was not"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"SSL is unavailable because this Python was not"
"SSL is unavailable because this Python runtime was not"

raise RuntimeError("SSL support unavailable") # noqa: B904
raise RuntimeError( # noqa: B904
"SSL is unavailable because this Python was not"
" compiled with SSL support."

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
" compiled with SSL support."
" compiled with SSL/TLS support."

@davidism
Copy link
Member Author

davidism commented Nov 7, 2021

Thanks, added the extra changes in ff94311.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants