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

Errors with python3.7 #431

Closed
RouquinBlanc opened this issue Jun 27, 2018 · 13 comments
Closed

Errors with python3.7 #431

RouquinBlanc opened this issue Jun 27, 2018 · 13 comments

Comments

@RouquinBlanc
Copy link
Collaborator

Hi Aymeric,

I may be missing something, but it seems to me that the code is currently not yet compatible with python 3.7 (tested with top of master)

The best way to reproduce is the first test example of the doc:

import asyncio
import datetime
import random
import websockets

async def time(websocket, path):
    while True:
        now = datetime.datetime.utcnow().isoformat() + 'Z'
        await websocket.send(now)
        await asyncio.sleep(random.random() * 3)

start_server = websockets.serve(time, '127.0.0.1', 5678)
asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()

This raises this exception:

TypeError: cannot 'yield from' a coroutine object in a non-coroutine generator

I've seen you are doing some changes at the moment for python3.7, I will be happy to validate further changes. Did not catch it earlier because we were stuck with the pyyaml lib even earlier in our deployment... They are pushing deprecation very strongly!

@Harmon758
Copy link
Contributor

I'm only able to reproduce this with 5.0.1 and not the top of master.
Make sure you're up to date?

@RouquinBlanc
Copy link
Collaborator Author

Indeed... Sorry I mixed up 2 virtualenvs.

So yes I see the same, not working on 5.0.1, but fine on master.

I guess a new patch release is planed for soon then?

Thanks a lot!

@Harmon758
Copy link
Contributor

No problem.
I agree, there should be a new release for 3.7 support now that 3.7.0 has been released.

@adam-stokes
Copy link

Hi, any eta when a new release will be pushed?

@aaugustin
Copy link
Member

Closing as a duplicate of #405.

@battlemidget No ETA on a release but I'll try to take a look at pending issues over the week-end.

@aaugustin
Copy link
Member

Well, it was a nice sunny weekend, so no progress here.

@adam-stokes
Copy link

It's been over a week, any idea on when a new release will be published?

@aaugustin
Copy link
Member

Almost certainly before September.

@aaugustin
Copy link
Member

(I could type python setup.py sdist bdist_wheel; twine upload — I just typed it. But I also need to have enough time to follow up if the release causes regressions for some users, which is almost guaranteed, as I'm no longer using websockets myself.)

@aaugustin
Copy link
Member

#435 suggests that master isn't compatible with Python 3.7 yet.

@aaugustin
Copy link
Member

(which is a release blocker)

@aaugustin
Copy link
Member

#437 is another release blocker.

@aaugustin
Copy link
Member

Version 6.0 adds support for Python 3.7 and is now available on PyPI: https://pypi.org/project/websockets/6.0/#files

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

No branches or pull requests

4 participants