Comments (9)
Here we go:
I also noticed an out-of-date fallback import in #2091
from channels.
Actually we’re blocked on me having a bit of time to review other PRs! The auth PR will have to wait for Django 5.2 (since the underlying change it depends on in core make the 5.1 cut)
I’ve got a few other changes I’m trying to fit into this release, I’ll tag you on them when they’re ready for a final review!
from channels.
Hey @bigfootjon — thanks for this.
So, yes, we should definitely leverage the new APIs where we can.
The standard approach would be to try and import the new code (or branch on Django version number), use it if it's available, otherwise fallback to our existing code.
We won't drop 4.2 support until 5.2 is released (and maybe a teeny bit after that) but that's no reason we can't get folks on the latest versions updated.
We test against Django main branch, which is already 5.1 (although pre-alpha), so no-reason not to already begin with the code for the upcoming version.
from channels.
Perhaps separate pull requests for sessions
and auth
to simplify testing and code review and also to provide more flexibility in deploying the PRs.
from channels.
Sounds good, I'll put up 2 different PRs and import testing to see if the new features exist.
While figuring out what would be needed to do that I noticed some bits in the docs that need to be updated for async django ORM support: #2090
from channels.
The usage of django async method is very useful, also because it is easier to write tests with django built-in testcases.
My concern is: currently there is nothing in the flow of channels which performs database connection cleanup while django uses request_started
/request_finished
signals to perform such task:
IMO the only good part left in database_sync_to_async
is to invoke the close_old_connections
, without it how are we going to clean-up those connections?
from channels.
@sevdog thats actually changed recently. Take a look at this PR: #2090
from channels.
Thank you @bigfootjon, I missed that PR. Nice job.
from channels.
And now we just need to push forward these last few bits and get the new version out.
@bigfootjon I'm fairly sure I'm blocking something. Just let me know and I'll get to it 🫡
from channels.
Related Issues (20)
- OriginValidator could raise exception/log message for denied connections HOT 1
- Unable to collect code coverage when using `ChannelsLiveServerTestCase` HOT 14
- error in channel layer explanations HOT 2
- adding a check if group_name exists method for channel_layer HOT 1
- Small messages are getting concatenated HOT 2
- How can I change the schema in the database? HOT 1
- How to test send_json() contents when passing close=True HOT 2
- Handler declaration by decorator/annotation (in order to prevent potential method leaks) HOT 1
- django-q2 and django-channels together HOT 1
- Channel Layer's group_send() Not Working When Called From Django View HOT 3
- Add CORs middleware HOT 1
- Breakage in routing.py on django/main pre-5.1.
- Django Channels Memory Leak on every message or connection HOT 27
- WARNING daphne.server ASGIStaticFilesHandler WebRequest took too long to shut down and was killed HOT 4
- Use group_send() when group is empty HOT 1
- Session Data Corrupted HOT 1
- Error with send_json Function in AsyncJsonWebsocketConsumer HOT 6
- Getting TypeError: SSEConsumer() missing 2 required positional arguments: 'receive' and 'send'
- django.core.exceptions.SynchronousOnlyOperation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from channels.