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

Add dedicated websockets package #2881

Merged
merged 1 commit into from
Oct 8, 2020

Conversation

Andrew-Chen-Wang
Copy link
Contributor

Description

Ref: encode/uvicorn#797

There used to be a package automatically installed; not anymore I guess. This came from a separate package and not cookiecutter-django, but the installation was similar.

Rationale

For websockets to work, you need a package like wsproto or websockets (which is not as maintained). Uvicorn at some point might have dropped the auto installation of one of these packages that made websockets unavailable to work with.

Ref: encode/uvicorn#797

There used to be a package automatically installed; not anymore I guess. This came from a separate package and not cookiecutter-django, but the installation was similar.
@@ -25,6 +25,7 @@ flower==0.9.5 # https://github.com/mher/flower
{%- endif %}
{%- if cookiecutter.use_async == 'y' %}
uvicorn==0.12.1 # https://github.com/encode/uvicorn
wsproto==0.15.0 # https://github.com/python-hyper/wsproto/
Copy link
Member

Choose a reason for hiding this comment

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

Good catch, I believe it's because of encode/uvicorn#666. A bit of a shame that there is no extra_require for it from uvicorn. I guess we'll have to pay attention to uvicorn updates in case they remove the integration or provide an extra for it.

Didn't know about this library, looks good.

@browniebroke browniebroke merged commit a85ce02 into cookiecutter:master Oct 8, 2020
@Andrew-Chen-Wang Andrew-Chen-Wang deleted the patch-9 branch October 8, 2020 18:38
@Andrew-Chen-Wang
Copy link
Contributor Author

Andrew-Chen-Wang commented Oct 8, 2020

@browniebroke Nice, I couldn't find the PR for this. Anyhow, it may be necessary to add these packages as well: https://github.com/encode/uvicorn/pull/666/files#diff-2eeaed663bd0d25b7e608891384b7298R53-R54

Those used to come with the standard installation of uvicorn. Although, without them, uvicorn seems to be running properly, I somewhat have my doubts for production mode.

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.

2 participants