Weeknotes 2020 WK 36
Lots of Releases
Django
Three versions of Django out this week. 3.1.1, 3.0.10 and 2.2.16.
3.1.1 was the biggest. As ever after the .0 release, there was a big rush of Release Blockers under the bug in a new feature clause. With the async views, JSONField, and the admin side-bar we had a lot of features that folks hadn’t had a chance to really try out. So lots of reports when they did.
People trying the async views are finding the limits. One good example is request.user. The authentication middleware will populate this with a SimpleLazyObject as usual, but because this is not actually fetched from the DB you need to wrap the request.user access in sync_to_asyc when fetching.
This kind of thing is going to need to wait for the ORM to have an async story before we’ll be able to provide something more sensible. Lazy attribute access thought isn’t going to be something we’re likely to see working async, I wouldn’t image at this stage. (Andrew gave his PyConAU talk on this this week, which I’m yet to see, so he’ll have begun to outline his thoughts there.)
One easy take home from the initial issues is that you want to be using sync_to_async(..., thread_sensitive=True) with anything that goes near the ORM to ensure you’re using the correct DB connection, and that these are handled as you’d want.
channels_redis
Also snuck out a little update to channels_redis, to 3.1.0, fixing a small memory leak.
Recommend.
Summer of Code
This week marked the official end of the Summer of Code projects.
We had two: Kaçper working on the django-stubs mypy plugin, and Ahmad working on the parallel test runner. Both have gone really well. It on my list to get Ahmad’s work merged in over the next period.
Kaçper project was an interesting change because it was under the Django umbrella but on a project outside the core. I’d like to follow up on this for next year. Maybe the Jazz Band org, or Wagtail, or... would like to take on a student 🤔 — it’s something I want to explore.
Season of Docs
And as one door closes... This week we also kicked on Season of Docs, which is essentially Summer of Code but for technical writers.
We have Gabby Precious working on making the Contributing Guide more accessible. I’m really excited about the project: folks have consistently said that getting started is too much of a barrier.
I’m happy to say, Mikey Ariel, who gave the awesome Docs or it Didn’t Happen keynote at DjangoCon Europe last year, has offered to help mentor. I think this gives us the extra perspective we need to help guide Gabby’s work over the next few months.
Did I say I was excited about this one? 💃
And little side-project...
Over the last year or so, doing Django Chat, it’s become clear that deployment is the big pain point — it comes up every week.
It’s OK if you're a Seasoned Pro™ but I’ve found myself wincing at the thought that this is the story we have to tell for How to get your app online. On the show this has come out as Carlton doesn't like Docker, but it’s not Docker, which is great, but the whole dog-mess around deployment that’s really at stake.
Well, there’s no point complaining. I’ve been motivated to wrap up what I’ve learnt over 20+ years of sticking stuff on web servers and put it out there.
It’ll be called Button. The tag line is A simpler deployment story. It’s coming in 2021.
I don’t have much to say about it immediately, but they’ll be more. For now you can follow @btnapp on Twitter for updates.