Add ws_connect to ClientSession.#371
Conversation
…ssion underneath, like client.request
aiohttp/client.py
Outdated
There was a problem hiding this comment.
All parameters except url should be keyword-only.
…d to look at ws_connect func params as well
|
Made the first params fix. |
|
Looks good. |
|
@davebshow do you have something to be done or the PR is ready for merging/final review? |
|
@asvetlov The only thing would be to update the client_reference.rst docs with the new method. I may be able to get to it a bit later tonight. Also there is a comment that I want to remove, will do now. Other than that I think it is ready for final review. |
|
I'm done making changes/adding docs unless there is something else that needs to be changed. Thanks for reviewing @asvetlov! |
|
Build failed when travis couldn't activate python3.3 environment. Should I make another commit and see if it passes? Tried to close and reopen the PR, but then appveyor failed as cancelled. |
There was a problem hiding this comment.
The below changes in this file are side effects of the merge, pollutes the history a bit. Maybe a git rebase will solve this next time. Sorry a bit new the pull ecosystem.
|
This got a bit messy. I'll submit a clean PR with just my changes. |
|
You may just push new code with |
|
Sorry just saw that. I bit of a newb when it comes to PR, moved to #374 |
Add ws_connect to ClientSession (cleaned up version of pull request #371 - figuring out the right way to do this)
|
Changes Unknown when pulling f7b8cdb on davebshow:ws_session into ** on KeepSafe:master**. |
Added
ClientSession.ws_connectmethod. Pretty much a copy paste of oldwebsocket_client.ws_connect. Thewebsocket_client.ws_connectnow is very similar toclient.requestin that it creates aClientSessionwith aTCPConnector(force_close=True)and calls that session'sws_connectmethod.Had to change the mocks in the websocket client tests a bit.
As @asvetlov mentioned in #367, the params for the
ws_connectmethod and function may need some fine tuning.If this is to be merged I will be happy to do docs and doc strings. Thanks in advance for any feedback or suggestions.
(sorry about that extra merge commit)