Adam Johnson

@adamj.eu

🐴 @djangoproject.com blogger and contributor ✍️ Author of three books on Django and Git 🍕 Django London co-organizer 🇬🇧 London / 🇵🇹 Lisbon

✍️ time-machine 3.3.0 is out, with Python 3.15 support, performance improvements, subinterpreter support, and various bug fixes. Check it out, and if you’re using freezegun, try the updated Migration CLI to convert and speed up your tests. adamj.eu/tech/2026/07... #Python

Python: time-machine 3.3.0 lets your tests time-travel even faster - Adam Johnson

time-machine is my library for mocking the current date and time in Python tests. I’ve just released version 3.3.0 with a decent number of changes, so here’s a lovely summary for you.

adamj.eu

✍️ New post on using unittest.mock to spy on function calls. 🕵️‍♂️ I recently learned how to use the wraps argument to track calls to a target function for later assertions. Handy for testing things like “is caching working?” without mocking the function completely. #Python adamj.eu/tech/2026/07...

Python: spy on function calls with unittest.mock’s wraps - Adam Johnson

Testing terminology distinguishes between different kinds of test doubles, including:

adamj.eu

✍️ New post introducing django-orjson, my new package integrating the fast JSON library orjson with various Django and DRF components. Claim 10x faster serialization and 2x faster deserialization with minimal code changes. adamj.eu/tech/2026/07... #Django

Django: introducing django-orjson - Adam Johnson

Just as cars painted red are known to be faster, libraries implemented in Rust are also known to be faster. Today’s example is orjson, a Rusty replacement for Python’s built-in json module, boasting 1...

adamj.eu

✍️ New post introducing profiling-explorer, a tool for exploring Python profiling data (pstats files). Use it with the classic cProfile (now called profiling.tracing) or Python 3.15’s new sampling profiler, Tachyon (profiling.sampling). adamj.eu/tech/2026/04... #Python

Python: introducing profiling-explorer - Adam Johnson

I’ve made another package! Like icu4py, which I made in February, it was sponsored by my client Rippling. And like tprof, which I made in January, it’s a profiling tool!

adamj.eu

A billionaire can get what they want with one donation to a political party. The rest of us must fight for years to get even the most basic rights recognised. Money destroys democracy, more than any other cause. The first step towards a better world is to stop the rich buying political outcomes.