Skip to content

Solve static files deadlock bug for django 3.0+ (#1722) #1800

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

Closed
wants to merge 1 commit into from

Conversation

sterliakov
Copy link

#1722
With Django 3.0 and newer we have native ASGI handler. This fast fix removes annoying deadlock exception for development server. I saw we shouldn't focus on it and have to rewrite this part using Django native capabilities, but it can work as temporary simple fix.

@sterliakov sterliakov changed the title Solve static files deadlock bug for django 3.0+ (#1722) Solve static files deadlock bug for django 3.0+ (https://github.com/django/channels/issues/1722) Feb 8, 2022
@sterliakov sterliakov changed the title Solve static files deadlock bug for django 3.0+ (https://github.com/django/channels/issues/1722) Solve static files deadlock bug for django 3.0+ (#1722) Feb 8, 2022
@dr-luke
Copy link

dr-luke commented Feb 8, 2022

This is a decent fix for this problem, I just made a comment on a thread about how people could monkey patch their django installs temperately to avoid this issue until a more permanent fix is approved. Thank you for your contribution, cheers.

@LiteWait
Copy link

LiteWait commented May 5, 2022

Pardon my ignorance. I am running Django 3.2, does this imply I can throw away channels==3.0.4 in favor of something else?

"With Django 3.0 and newer we have native ASGI handler. This fast fix removes annoying deadlock exception for development server. I saw we shouldn't focus on it and have to rewrite this part using Django native capabilities, but it can work as temporary simple fix."

@ktosiek
Copy link

ktosiek commented May 23, 2022

@LiteWait the native ASGI handler only replaces one part of Channels: adapting Django middleware/views system to ASGI. You still need channels if you have any Consumers in your app.

@ktosiek
Copy link

ktosiek commented May 23, 2022

@sterliakov have you tested this on Django 2.2 (which is current minimum for Channels)? I don't think it calls get_response_async.

@carltongibson
Copy link
Member

Django 3.2 will be the minimum required version going forward.

@JulienPalard
Copy link
Contributor

Tested using Django 4.0.5, looks like to solve the issue.

@carltongibson
Copy link
Member

Yes, but this will be removed in favour of Django's own ASGIStaticFilesHandler for the next release.

@carltongibson
Copy link
Member

Superseded by #1890.

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.

6 participants