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

Improve user feedback if no ws library installed #1023

Merged
merged 1 commit into from
May 27, 2021

Conversation

Vibhu-Agarwal
Copy link
Contributor

Fixes #1022

I've just duplicated the work done in #926

Should we move this logic to a central place like protocols/utils.py?

@Vibhu-Agarwal Vibhu-Agarwal marked this pull request as ready for review April 24, 2021 15:59
Copy link
Member

@euri10 euri10 left a comment

Choose a reason for hiding this comment

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

LGTM

There's been a lot of discussion around this in #926 with @florimondmanca and the consensus was to be less deceptive (ie put a warning message when a user attempts a ws connection without a library) instead of put a warning message every time (which would be the behavior if we put the message above, would it be ?)

Any thoughts on this @florimondmanca , this is the case here a user doesn't install like we advertise, which can and will happen anyway so why not handle that case gently as well.

Copy link
Member

@euri10 euri10 left a comment

Choose a reason for hiding this comment

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

looks good to me, we have this duplicated on both protocols but it feels nicer to have a warning on a ws connection attempt than on every single connection if a user doesnt intend to use websockets

@euri10 euri10 merged commit 06fedab into encode:master May 27, 2021
@euri10
Copy link
Member

euri10 commented May 27, 2021

thanks @Vibhu-Agarwal

Kludex pushed a commit to sephioh/uvicorn that referenced this pull request Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing user feedback if no ws-library has been installed - with httptools installed
2 participants