detfalskested

Supporting the Python Software Foundation

More than 15 years ago, a colleague introduced me to the web framework Django (back then it was version 0.96) and the programming language Python. And I immediately fell in love with both. Some years later, Django stuff became the thing I do and am good at to the extend that I'm able to make a decent living from it.

But that's not the only thing I got from it. I came for the framework but stayed for the community around it. And for almost a decade, I have been donating money monthly to the Django Software Foundation.

With what has recently been going on in the Ruby and (especially) Rails communities, I've been thinking about how lucky I am to have ended up with Django, Python and the lovely people around it. I feel sorry for all the good people with decent values, for whom Ruby on Rails skills became their way of making a living, that increasingly see themselves alienated by leading figures in their community.

Yesterday, the Python Software Foundation announced their withdrawal of a USD 1.5 million funding proposal, as complying with the funding terms would compromise the values and mission of PSF. That's a tough call. But the right thing to do.

In a response to that, I've just signed up to be a PSF Supporting Member, which is mostly just a way to send some money their way. If you care about Python, the PSF and/or their values, you might want to consider doing the same.

My profile picture around the interwebs for the last 11 years has been of me wearing a Python t-shirt. Today I'm prouder than ever of this.

A torso photo of me talking, while wearing a Python t-shirt

Guido van Rossum on AI

I love how generally unimpressed Guido van Rossum – the creator of the Python programming language – is with the whole AI hype in this interview, despite the value-laden questions.

But these quotes stood out to me:

I am definitely not looking forward to an AI-driven future. I’m not worried about AI wanting to kill us all, but I see too many people without ethics or morals getting enabled to do much more damage to society with less effort. The roots for that abuse have been laid by social media, though — another major computer paradigm shift that changed society but didn’t really affect the nature of software.

And:

I hope that Python’s legacy will reflect its spirit of grassroots and worldwide collaboration based on equity and respect rather than power and money, and of enabling “the little guy” to code up dream projects.

But also:

So I worry that Python’s getting too corporate, because the big corporate users can pay for new features only they need (to be clear, they don’t give us money to implement their features, but they give us developers, which comes down to the same thing).

Prevent Bluetooth headset from appearing as a media player in Gnome notifications

I recently upgraded Debian on my laptop to Trixie. Overall, it's great!

But one issue I had, was that suddenly my Bluetooth headphones would show up as a media device with previous/play/pause/next controls in the Gnome notification area. These controls didn't work or do anything. But what was even worse: They would steal the focus of media keys events from anywhere else. Which meant I was no longer able, with my keyboard, to play/pause music or video playing elsewhere.

A screenshot showing media controls for my Bose Quiet Comfort 45 Bluetooth headset in the Gnome notification area
The headset would show up as the first and primary media player, taking focus of media key input.

I've had a hard time finding a way around it, but did find a solution today.

Someone on the Ubuntu forums had the same problem. Although they didn't find a solution, one of the responses there got me on the right track.

It turns out to be related to something called MPRIS: Via Bluetooth, the headset presents itself as having media control buttons (which it does) and then Gnome decides to show it as a controllable device. As such, a neat feature. But, unfortunately, useless.

On askubuntu.com I found the question Prevent MPRIS from recognizing an application. I'm out of my confort zone here, but with a tool called qdbus (on Trixie, it's called qdbus6 and can be installed with apt install qdbus-qt6), you can look for D-Bus objects. Searching for things related to "mpris", I got these items while my headphones were connected and a tab in LibreWolf was playing some music:

$ qdbus6 | grep mpris
org.mpris.MediaPlayer2.firefox.instance_1_1406
org.mpris.MediaPlayer2.Bose_QC_45

Following the directions in an answer to the askubuntu.com question, I then created the file /etc/dbus-1/session.d/disable-bose-mpris.conf with the following content:

<busconfig>
<policy context="mandatory">
<deny own_prefix="org.mpris.MediaPlayer2.Bose_QC_45"/>
</policy>
</busconfig>

After running sudo killall -s HUP dbus-daemon, per instructions, and turning my headset off and on again, the media controls for the headset have now disappeared from the Gnome notifications and whatever else is playing will receive any media key input. What a relief. And the media controls on my headset even still work.

Tailwind is Brexit for CSS

I don't really have any experience with Tailwind myself. But this made me laugh (my emphasis):

Sometimes I'll start dunking on people and ripping into their shit technologies. And liberals will be like "that's harsh, what have they actually done to harm people?" and INVARIABLY they end up being fascists or adjacent. The thing is, I can tell FROM the tech. The way tech is architected betrays the ideological zealotry that begat it. Tailwind is essentially Brexit for fucking CSS. "CSS is made by standards beaurocrats, let's destroy it"

Django is boring

There, I said it. And I consider it a major feature1!

I recently did a long overdue upgrade of a larger project from Django 2.1.x (last release in December 2019) all the way to the most recent version 5.2.x and it mostly just worked. I only had to tweak a few small things here and there, along the way2, while upgrading to newer versions.

The Django APIs have more or less stayed the same over the years. Because thoughtful decisions were made before they were introduced. And because the Django developers take pride in not breaking things.

The trickier part was upgrading 3rd party packages, but mostly nothing of significance. Except for a single package that was the reason for not being able to move past 2.1, until I've gotten completely rid of it. Which apparently took me way too many years to finally get around to do.

While a much smaller code base, I also just upgraded the version of Django running this blog from a similarly ancient version without any issues at all.

By the way, we're celebrating Django's 20th birthday in Copenhagen on the 10th of October. Come join us!


  1. Along with the lovely community and the great documentation. 

  2. While checking commit messages for the version upgrades, I stumbled upon this one when I celebrated reaching 5.0: "Ladies and gentlemen, this is Django number 5"