uv, Docker, and the Return to Normalcy
Hello friend,
it’s been a while again, but I’ve also been barely at home!
I’ve had an absolutely amazing PyCon US and can recommend everybody to attend it in Pittsburgh next year. After Salt Lake City, that is what it is; Pittsburgh was a lot of fun, and the venue, with its many outdoor spaces, was phenomenal.
They sold out at the last minute last year, so I recommend getting a ticket early for 2025 since I expect interest to grow again. There is just nothing comparable to this opportunity to meet all those people you talk to online all year.
On my way back I also took a quick detour to Boston, which made me enjoy Fallout 4 a few months later a lot more. That’s also where I got my Hynek-Branded hat I proudly wear in my new avatar photo (📷 Mr pedalboard himself Peter Sobot):
I also got to experience the ✨magic✨ of the US health care system due to a chipped tooth, but that’s a story for another day. 😬
Brazil! 💚💛💙
After returning from the US, I almost immediately left again, this time for Brazil, a breathtaking country in every way imaginable.
Flying over the endless city of Sao Paolo, seeing anteaters in Pantanal, floating with anacondas in Bonito, surfing at the Mata Atlântica, cruising on the Rio Negro (that's full of pink dolphins) on a tiny ship, and having $0.50 Caipirinhas with the locals at the beach of Salvador (Bahia)… my brain was appropriately blown!
The only downside is that Caipirinhas outside of Brazil are ruined for me forever.
Unfortunately, coming back was rather unpleasant since I had to deal with sickness – and ultimately death – in my immediate family (I still do, just less frenetically), which, on top of all the stress that accumulates when you’re gone for two months, is the reason you haven’t heard from me.
This is also why I don’t have a video for you yet, and admittedly, I’ve barely begun writing. Starting again after such a long time is psychologically really hard, so thanks to everyone who said nice words about them in the past months – I’m using them to fuel my restart. ❤️
Relatedly, as always: many thanks to my generous GitHub sponsors who keep me afloat – financially and spiritually!
On the bright side, I got to spend my August with this adorable little guy whose owners couldn’t take him with them abroad:
I didn’t plan on making the newsletter so heavy on pictures, but if you have cute dog pictures, whatcha gonna do!?
Astral delivers again: uv 0.3.0
Who wasn’t idle at all, though, is Astral. uv 0.3.0 hit the Python community like a freak wave.
Never have we been closer to a unified Python packaging tool. Cross platform lock files, workspaces, single-file scripts with dependencies, their own version of Pipx… and all of it, of course, Blazingly Fast™.
While we’re not there yet – the devil is still stuck in the details – there are many reasons to be optimistic. 0.3.0 release’s focus was clearly developer experience and it lacked knobs and affordances for production use. But the break-neck speed with which the most important ones have been added ever since gives me confidence we’ll be there soon1.
As for the venture capital aspect of Astral, which I’m not a fan either, I’m going to quote Armin Ronacher from his Rye and uv: August is Harvest Season for Python Packaging:
[T]here is an elephant in the room which is that Astral is a VC funded company. What does that mean for the future of these tools? Here is my take on this: for the community having someone pour money into it can create some challenges. For the PSF and the core Python project this is something that should be considered. However having seen the code and what uv is doing, even in the worst possible future this is a very forkable and maintainable thing. I believe that even in case Astral shuts down or were to do something incredibly dodgy licensing wise, the community would be better off than before uv existed.
New Blog Post!
This takes us to why I’m writing to you today! Of course, I’ve been experimenting with uv's new features, opening issues, and discussing with Astral’s invariably patient and friendly staff. I wanted to write a quick TIL about how to use uv in Docker with my heavily cached multi-stage workflow, but then kinda got sucked into it and made it a proper post:
Production-ready Docker Containers with uv
I hope you find it helpful!
FOSS
Sticking with uv for a second, I’ve tagged a bunch of new releases of setup-cached-uv, and it’s shaping up really nicely! Given GitHub Actions’s poor caching performance, the time savings aren’t always significant (or even there). Still, given the amount of traffic that CIs hammer PyPI with, it makes sense to me to do it anyways. Check it out if you haven’t yet!
I also finally got attrs 24.1.0 out, which was a big, late, and painful release. Notably, it finally shipped three-argument converters and our replacement for __init_subclass__
. It was quickly followed by 24.2.0, because… checks notes… 24.1.0 broke CPython 3.14-dev’s CI (via the amazing Hypothesis). 🏆
I’ve also realized that attrs’s "new" APIs celebrated their fourth anniversary! Given how popular they’ve grown, I’ve decided to make them the default in the API docs. That was a big PR.
The latest notable release was stamina 24.3.0, which added a testing mode and more control around when to retry. 🥳
I hope to find more time to work on svcs now – I’ve got big plans!
But now, it’s time for me to return to the script-writing salt mines. Pray for my soul and expect a new video in September!
Cheers,
—h
-
Given the (relatively speaking) immense popularity of my first uv video, I think I'll do another one once some critical wrinkles are ironed out. ↩