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

WebSocket.send_bytes is a coroutine as of aiohttp 3.0 changing transp… #16

Merged
merged 2 commits into from
Mar 27, 2018

Conversation

xzy3
Copy link

@xzy3 xzy3 commented Mar 20, 2018

…ort.write to await the coroutine if necessary.

Fixes #15

async def write(self, message):
corou = self._ws.send_bytes(message)
if asyncio.iscoroutine(corou):
await corou

Copy link
Owner

Choose a reason for hiding this comment

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

Could we use coro instead of corou? No big deal really

@davebshow
Copy link
Owner

Other than my small inline comment this is LGTM Please update and I will merge. Thanks @xzy3 !

@xzy3
Copy link
Author

xzy3 commented Mar 20, 2018

@davebshow Ok I rebased in the variable name change as requested.

…ort.write to await the coroutine if necessary.
@xzy3
Copy link
Author

xzy3 commented Mar 22, 2018

A follow up: looking through the history of aiohttp it looks like the tp->type refactor took place pre 1.0.0 so these changes should be backwards compatible at least to that version. The alias was left in until the 3.0.0 release.

@mildewey
Copy link

This issue is a blocker. The most basic tutorial in the documentation does not work until this fix goes live. Can we have a new release?

I'm open to suggestions regarding workarounds if not.

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.

None yet

3 participants