<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Async on ⎨ Saurabh Kumar ⎬</title><link>https://saurabh-kumar.com/articles/async/</link><description>Recent content in Async on ⎨ Saurabh Kumar ⎬</description><generator>Hugo</generator><language>en-US</language><copyright>Copyright © 2025, Saurabh Kumar.</copyright><lastBuildDate>Sat, 13 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://saurabh-kumar.com/articles/async/index.xml" rel="self" type="application/rss+xml"/><item><title>Django ORM: From sync_to_async Threads to Native psycopg3</title><link>https://saurabh-kumar.com/articles/2026/06/django-orm-from-sync_to_async-threads-to-native-psycopg3/</link><pubDate>Sat, 13 Jun 2026 00:00:00 +0000</pubDate><guid>https://saurabh-kumar.com/articles/2026/06/django-orm-from-sync_to_async-threads-to-native-psycopg3/</guid><description>&lt;p&gt;Django shipped async ORM methods back in 3.1, and for years I told people they
were not really async. &lt;code&gt;aget()&lt;/code&gt;, &lt;code&gt;afilter()&lt;/code&gt;, &lt;code&gt;acreate()&lt;/code&gt;, the whole &lt;code&gt;a&lt;/code&gt;-prefixed
surface — the docs called it async support, and in the sense that mattered it was
not. Every one of those calls still blocked a real OS thread. You got coroutine
syntax without coroutine performance.&lt;/p&gt;
&lt;p&gt;Django 6.0 fixed it for real in December 2025. I want to walk through the path
from &amp;ldquo;fake async via threads&amp;rdquo; to &amp;ldquo;native async via psycopg3,&amp;rdquo; because it is not
a story about a feature landing. It is a story about three constraints that
boxed Django in for five years: &lt;code&gt;psycopg2&lt;/code&gt; blocks, connection state lived in
thread-locals, and the entire ORM assumed DB-API2. Once you see those three, every
design decision Django made falls out of them almost mechanically.&lt;/p&gt;</description></item></channel></rss>