-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Made websocket subprotocols conform to spec #181
Made websocket subprotocols conform to spec #181
Conversation
Hmm. |
why do you think a warning is unsuited here? something wants to connect with a protocol that isn’t supported: that’s not normal, and a log entry might help debugging instead of silently succeeding with a return value that might not be checked. |
I see nothing wrong with my code if client requests non-supported protocol. Server code should not changed to "fix" warning, problem is inside incompatible client. |
I'm agree with @asvetlov In this case, I strongly vote to use a logger with warning level. If you use warnings instead of logging for that, I don't receive e-mail that something is wrong with a client. |
it’s up to him then to introduce logging, and this will wait? |
@flying-sheep sorry, I don't follow. |
I meant: this project doesn’t use any logging yet AFAICT. So you should introduce logging how you see fit (central logger with just basicConfig() or per-module logger, maybe even finer grained. using name, hardcoded names or custom logger classes, yadda yadda) and after i see how you want logging to be done, i’ll update this pull request to use logging. |
Do you talk about this: https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/log.py ? |
Yes, I think ./aiohttp/log.py is good place for new logger. You can call it "aiohttp.websocket" for example. |
it appears that i am blind or looked at an old version or something. in any case, i didn’t know of the existence of |
0edbf5d
to
98a5e16
Compare
98a5e16
to
8f881a7
Compare
done! |
Made websocket subprotocols conform to spec
Thanks! |
fixes #178