Adam Johnson

Adam Johnson

@adamj.eu

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

3.3K followers266 following816 posts

Adam Johnson reposted

Yesterday, the CSSWG accepted my proposal for mesh gradients and diffusion curve gradients! Want to make gradients like this natively in CSS? Well, we've started the work on it. It's coming! Here's the Explainer: github.com/w3c/csswg-dr...

📣 Join me on Thursday, 8th October, in Lisbon for a small software engineering meetup! Looking forward to meeting more folks out there. adamj.eu/tech/2026/09... #SoftwareEngineering #Python #Django #Lisbon #Lisboa #Portugal

adamj.euPython: join my meetup in Lisbon, 8th October - Adam JohnsonI previously announced my Python optimization workshop in Lisbon, on 10th October (which still has a few places). I am now pleased to add a Python/Django meetup on the Thursday before.

Adam Johnson reposted

Made a fun little utility for myself over the last hour or so. Using Adam Johnson's new django-mcpz created an MCP in my personal cluster to collect "notes" and then an iOS shortcut to launch Claude in voice chat mode so I can add/edit/retrieve notes while on the go

✍️ New post on serving the change password well-known URL in Django Add this one redirect and two tests (you won't believe #2) to make your site more user-friendly for users with compromised passwords. adamj.eu/tech/2026/09... #Django #Security

adamj.euDjango: serve the change password well-known URL - Adam JohnsonWhen a password manager detects that a user’s password has been leaked or reused, it can prompt them to change it, but the password change URL varies by site. The web’s answer to such discovery proble...

This release adds new skip/expected_failure features, fixes a bug when using Coverage\.py's dynamic contexts, and tidies up error messages and usage docs.

None of them had a huge impact (this is a test library, after all), but they were all mistakes. The worst would leave time mocked after a test tearDownClass() failure, which would be pretty hard to debug. Crazy times. These machines can help us build the highest-quality software, if we want.

Adam Johnson reposted

Adam Johnson reposted

"Python has decided to enable frame pointers by default and encourage the ecosystem to do so as well, to make debugging easier for us all, so time-machine is joining the party." Enabled by default for 3.15, do this for older versions: github.com/adamchainz/t... #Python

github.comBuild with frame pointers enabled by adamchainz · Pull Request #627 · adamchainz/time-machine
Adam Johnson@adamj.eu

✍️ 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

✍️ 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

adamj.euPython: time-machine 3.3.0 lets your tests time-travel even faster - Adam Johnsontime-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.

✍️ 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...

adamj.euPython: spy on function calls with unittest.mock’s wraps - Adam JohnsonTesting terminology distinguishes between different kinds of test doubles, including: