Coder Social home page Coder Social logo

Comments (9)

bigfootjon avatar bigfootjon commented on August 18, 2024 2

Here we go:

  1. Sessions PR: #2092
  2. Auth PR: #2093

I also noticed an out-of-date fallback import in #2091

from channels.

bigfootjon avatar bigfootjon commented on August 18, 2024 2

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.

carltongibson avatar carltongibson commented on August 18, 2024 1

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.

cclauss avatar cclauss commented on August 18, 2024 1

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.

bigfootjon avatar bigfootjon commented on August 18, 2024

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.

sevdog avatar sevdog commented on August 18, 2024

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:

https://github.com/django/django/blob/43cdfa8b20e567a801b7d0a09ec67ddd062d5ea4/django/db/__init__.py#L62-L63

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.

bigfootjon avatar bigfootjon commented on August 18, 2024

@sevdog thats actually changed recently. Take a look at this PR: #2090

from channels.

sevdog avatar sevdog commented on August 18, 2024

Thank you @bigfootjon, I missed that PR. Nice job.

from channels.

carltongibson avatar carltongibson commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.