Skip to content

writing / 2026 /

Announcing asgiref 3.13.0

async

I happy to announce asgiref version 3.13.0, that's available on PyPI now.

You can see the CHANGELOG for the details.

As well as the usual Python support bumps — we dropped Python 3.10, which let us drop our own timeout implementation in favour of asyncio.timeout(), and added support for the new Python 3.15 — there were a couple of bigger changes to call out.

Local speed up

Local attribute access is now 2-3x faster. Local(...) now uses one of two internal specialisations, selected by thread_critical, instead of checking the mode on every access.

We're talking microseconds (µs) here and in a request measured in milliseconds that may not seem like a lot. But Local is on the hot path for every request and this is a good change that will benefit everyone.

Nested ThreadSensitiveContext

It is now possible to nest ThreadSensitiveContext by providing an explicit executor for thread-sensitive tasks. This enables moving a block of such work away from the parent context's shared worker.

This is the asgiref side of the work to add async transactions support in Django that I wrote about recently.

With this in place, it'll be possible to have an async with transaction.atomic() use a separate database connection for its transaction, separate from the shared connection of the parent context.

Again, read the post for more of a discussion.

Upgrade now

Go get yours:

$ pip install -U asgiref

Enjoy 🚀

Django Chat is back 🎙️

While I've got you, I'll just mention that Will and I are back in the flow for the autumn season of Django Chat.

A couple of episodes to get you started:

  • Hiring in 2026 brings specialist Django recruiter and community member Jon Gould back to discuss the state of things now AI has (supposedly) taken over everything. Lots has changed, sure, but I was mostly taken by how a lot of the advice is still remarkably familiar.

  • Django in Space has us taking to Loes Crama about how they're using Django to contribute to the ESA's NewAthena mission at Cosine Measurement Systems in Sassenheim, The Netherlands. We talk about how (maybe) the Admin can be your application, and the importance of stability when you've got a project spanning decades.

Plenty more in the pipeline. Go give them a listen.