- Podcasts
- Python Bytes
- #495 Banned
About this episodeTopics covered in this episode: EuroPython 2026 videos are online The State of Django 2026: Boring is so back htmx 4.0.0 has been released…
- EuroPython 2026 videos are online
- The State of Django 2026: Boring is so back
- htmx 4.0.0 has been released
- 🐍 Functionally Zen
- Extras
- Joke
Transcript
From the publisherThis transcript comes from the podcast’s own feed, shown as the publisher wrote it.
#495 Banned
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds. This is episode 495, recorded on Tuesday, September 8th. I'm Calvin Hendricks Parker. And I'm Michael Kennedy. Glad to have you, Michael. If you want to support the people who make this possible, make sure you support our sponsors, the fine folks at, oh, Talk Python. Make sure you check out Michael's courses. He is doing incredible work over there. It's a great way to brush up on some technology you weren't sure about, try something new. He's got some really cool notes. You just released a couple of new courses, right?
Yeah. Very cool. And then also check out the fine folks over at Six Feet Up. They are the ones who love solving hard problems. They do a lot of Python work. They've been around for 27 years. And we'd love to talk to you about doing some cool projects. If you want to connect with the hosts online, you can find Michael, myself, and the show on Mastodon, Bluesky, and X. And you can also find Michael and I on LinkedIn. But make sure you join us on YouTube for the live stream at pythonbytes.fm/live to be part of the audience. Usually it's Tuesday mornings, Pacific time. Older video versions are available there too. And finally, if you want our artisanal digest of every week's show notes in email form, add your name to our friends of the show list and we'll never share it, but you'll get a really cool recap of everything we talked about.
Exactly the same. And sometimes you don't miss it because you just want to... There's trade-offs, right? Like, I'm going to go to that talk instead of that one. Or, oh, there's a really interesting group of people having this conversation. And the talk is starting now. You got to decide, do I join the group and have the experience that's not going to be recorded or do I go to the talk? So, EuroPython2026 has all of the videos out. And I realize I need to update what I put in the show notes because this is just my subset. So, if you want to watch all the talks for EuroPython, 117 videos are now online on YouTube, which is great.
Because the conference just happened. Yes, I know. It's really, really good. And I went through and said, hmm, what might make an interesting thing that I personally would be interested in? This is not a voting. This is not a ranking. This is not a good, bad. This is Michael wants to watch this for two reasons. Either one is relevant to me, or I might be considering it for a Talk Python episode. Like, for example, the very first one by Giovanni Bairoliari is already out over on Talk Python Oh, nice. As the latest, he did a cool project rewriting asyncio from a perspective of what if there was only free-threaded Python? You wouldn't write asyncio exactly the same because you have the potential to split that work across multiple threads, whereas asyncio is single-threaded, et cetera, et cetera. So I'm finding these really interesting. We've got Marlene Magami. Her talk, her keynote is up. Updates on the JIT, update on free threaded Python by Thomas Warters. Paul Everitt is in here somewhere because it's Paul Everitt.
Yeah, exactly. Stefan Ostrowski deploying Python web apps by Will Vincent, probably with a lean towards Django, hinted to your topics, maybe. Maybe. But anyway, I thought I would make my, like this morning I did it, made my watch list public because I don't know. I went through all 117 videos and said, okay, maybe, probably. And now I'm down to 29. So people can check that out or they can just look at the full list.
I love that you make it a watch list so you get Michael's curated version. And so I can go enjoy what you think might be important because maybe I follow similar topics. So I think more folks should do that with conference videos because it's so hard to go. I mean, there's, you said what, 117 videos, what you said? Yeah, that's a lot. That's a lot of time to invest.
Well, and I just got back from DjangoCon, which was in Chicago. And same time, just shortly afterwards, the PyCharm folks and the Django Software Foundation have released the 2026 State of Django. And I love so that William Vincent also published this over on the PyCharm blog. I love the fact that it's called Boring is Back. If you've ever read the blog post about boring tokens, like you only get to have so many new shiny technologies, shiny tokens, You only get so many new shiny technologies in your project. The good news is you can have Django and you can have Postgres and they're both considered very boring and very stable. If you look through here, it's very thriving. Postgres is actually the database of choice for almost 80% of the respondents who are doing Django work out there, which I think is a really telling mark. Another nice thing to see here is 43% are already on Django 6.0 months after it shipped. So folks are staying up to date and pretty well on the stable side of things. It was 3,500 Django developers across more than 40 countries. So it's a fairly good representation of the world's uses of Django. I'm sure there's a lot more.
Yeah. I mean, they did a good job of promoting it across multiple podcasts and conferences and things like that. And I think it's been really well received. They got a nice little infographic here. What I thought was interesting is this relates to maybe a future topic of yours. HTMX is closing in on React for the front end. You see here we've gone from 2025, 26% of projects maybe using, or we're using HTMX to now 34% catching up to React, which is only at 38% on the front end. I'm pro that. I think that's a really great sign of maybe people are looking for the simpler, more boring side of the web. And Django is a great place to do it. folks obviously using AI. So it's interesting, they had a couple of special sections in here. AI is mainstream, but no workflow is one. So whether they're using it all the time, several days a week, once or more often, AI is dominating the workflow, but it's still supervised, which I think it should be. The AI is here to make us better developers, not replace us as developers. I think we've seen that time and time again, as we talk about AI on the various shows. And so the report here, the stats definitely show it. I mean, that's the way to get the most out of these tools. VM is still the top of the list for managing your Python environment, not necessarily your Python dependencies, but the Python environment. I have a feeling uv will overtake here real soon because once you see uv work for getting your Python version, it's hard to go back seeing how fast and easy that is to be managed. Docker at 31%. So I'm also quite excited to see the fact that folks are containerizing and just using the Python coming out of the containers. That's also a very simple and easy way to just get started on the right foot with Python and Django is use
just kind of coloring slightly outside the lines with one of the standard python ones it could be a c dependency or just a weirdness of you want to install something and it gets it gets hard so i to install this way to go. Rough top of the list for code tooling. No surprises there. I think we should see more pre-commit coming up given what we'll see down here later. There's lots of testing going on. AI is write more code. Verification matters more. You see right here, pytest 45%. So we will, we see lots more testing happening, which I think is also a very good sign. And I'll talk a little bit about that in my second article as well. So I think, yeah, go check it out. This was also part of a fundraiser. So if you are renewing your PyCharm Pro license or looking for one, you can get 30% off. And then you also get 100% of that purchase price goes to the Django Software Foundation. So not an ad for PyCharm necessarily, but they are doing good out there in the world.
I like a lot about this. Specifically, I also think this is a deeper view into Python in general. When I saw the headline for the survey, I thought, oh, it's going to survey Django things. Like who's using this feature, the ORM, and then who's deploying this way versus that way. And no, it's more of a general thing. Just let's ask the Django people what they're up to. Yeah. Yeah. Nope. Really good stuff. It is good stuff. I'm glad you covered it. Speaking of good stuff. Well, I mean, boring is good. But you mentioned HTMX. Well, HTMX 4 is now out. And that's officially released. Officially. And it's a Jeep. No, it's not. Excuse me. No, it's a horse. It's a Land Cruiser, I believe, not a Jeep. Anyway, there's a big picture on the announcement of some Land Cruiser jumping.
Incredible. It is. All right, so there's a lot of interesting changes here. I think, first of all, HTMX has been really broadly adopted by people who are just like, I don't want to take on a React front-end framework or something like that. Even though all of the AI tools leap at using React for stuff, it's still really popular,
Yeah. Why do you want a bunch of build steps and all that stuff just to get your app out? Yeah. If you don't need it, don't go all in. Also, a lot of these front-end frameworks, not HTML, but many of them encourage you to treat your back-end as a dumb pipe that just routes data to the front-end where the smarts live. And it's fine if you want to write your code on the front-end in JavaScript, but if you want to leverage the things that are really nice about Django or Flask or whatever you're writing against, and just Python in general,
well, then it kind of undermines that, right? Yeah, but it's the last you just stay in the batteries included world especially with Django like all the html like filters and helpers that are built in to Django the framework are all still very useful with a tool like this they become useless if you're on react like you're not going to use it right exactly exactly so major changes
attribute inheritance is now explicit it's a little is on a python isn't it um so it used to be you could do like an hx-confirm and if some action was going to happen first a dialogue would pop up and say are you sure you want to delete all the data and you would say yes or no but you could put that in say a div that contains some elements and then there was a button way down if you click the button the confirm would fire that no longer happens so you have to explicitly say at the top
it stops working. That's the only problem. On the older code, so there's an upgrade path. It's not major, but there is, I mean, it's kind of a find and replace upgrade path, so it's not a huge deal. The event names have been changed a little bit. Yeah, we'll go through some examples, I guess. So yeah, there's like, you could do an hx confirm and then a button with an hx delete, and now you've got to say colon inherited. The events are also used to be able to say disinherit, so you could block a child from having stuff inherited upon it? Leave this part alone. Get away from me. Now that's gone. Now that's gone because you just that's the default is not to inherit. So you don't have to say don't cascade it down. Some events were renamed. Here's the find and replace. So it used to be htmx before request now it's htmx colon before colon request and so on. What else? History. This is actually, I didn't know this was happening. This is not ideal. So history support allows you go forwards and backwards, even if, so your forwards and backwards can navigate between HTMX events, not through just the page loads, right? So if I click a button, yeah, and it does a load, it changes something else. And I click another, maybe another row in a grid and a master detail, like another detail thing loads, you can go backwards, forwards between those. I didn't know this. It used to be that in HTMX2, the way backwards and forwards worked is it would save a copy of the pages for restoration and local storage. I forget the storage part. Like, wait, what if that data changed? You know, there's two hard things.
Exactly. There's like two hard things in computer science. Caching, naming things, and off by one errors, right? Love that joke. Yeah, it's there for a reason. The caching is super hard. And this was so, like, I thought it was just reloading it. What's going on? So anyway, that's gone. Nice. It just literally reloads it like I always thought it did. So there's that. And the last one is, well, there's like two things. There's morph swaps. So what this is, I had to look this up, folks, is a morph swap is that instead of saying this portion of the page is changing, so we're going to get the new partial or fragment from the server and just replace that, a morph swap will rewrite the DOM to match the new segment. So for example, it doesn't jump around as much and those kinds of things, right? If maybe only some tiny element, even though you replaced a whole section, changes, it's like, okay, we'll just change the little element because, again, master detail, like there's a whole structure of the HTML there, but really as you click from page to page, it's just the values inside that structure.
I mean, honestly, it's not the point of a framework. It is. I mean, why would you do a framework if you're not going to leverage that? And then the HX partial tag. So this for outer band changes. This is where HTMX used to be really brutal. And honestly, I've worked on a project before. And in the end, I'm like, oh, I kind of wish I didn't choose HTMX for this. Because I want to update something over here and something over there. And this part here. And it was tough. So this lets you specify partials. then um elements of it that change right so pretty pretty neat um that's slick it allows you to to sort of glue that stuff together very nice yeah so there there it is i mean and they definitely get
things. So for the final news article for me, this is actually a local IndyPy person. He presented about two IndyPys ago, Kyle from Testable. He gave a little nice little blog post about functionally Zen. And I kind of like going back over Zen of Python things. It's one of my favorite talks to give at PyCon and other conferences is something more around these initial tenants of Python and simplicity and why we love it. And for those of you who don't know, you can go to your command line, you can type Python minus m this, and you will see the little Easter egg, which is the Zen of Python that is in Python. Everyone should print it out, they should frame it, and you should put it in your, above your sink when you brush your teeth at night so you can read it every night. And you'll become a better human being instantly because you've got the Zen of Python there available to you. But Kyle took the Zen of Python and he actually put, took kind of added into it like seven extra tenants for Python simplicity. So he took specifically the simple is better than complex tenant of Python and then added these seven additional pieces that are about idiomatic code, data, pure functions being simpler than impure functions. It kind of goes on like in class functions being maybe simpler than classes. So it's just a way to think about how to keep your code again simple. There's no reason to get overly complex if you don't have to. And Python gives you all the tools that are right here. So you can talk about, again, he talks about being idiomatic. There's things you need to watch out for. For example, side effects, especially with classes that have constructors, they can have side effects in subclasses that you aren't aware of. So it just adds to the complexity and overhead as a developer. Some good examples in here. So if you looked at the idiomatic code is simpler than non-idiomatic code, some functional programmers might be tempted to use the map function of Python to extend a list. But there's actually a simpler way. Just using a list comprehension is actually a clearer, probably cleaner way for writing what you're looking for there. So this actually loops through and does the x times 2 for x in a list of 1, 2, 3. So now you've got 2, 4, 6.
Well, now the docs should be able to tell us, right? Because I've got the notation for those things in there. It's right in the docs. Data is simpler than functions. This one's a little harder to do. I think the example was a little contrived because if you have an object that has age with a sub-element of weight and a sub-element of lab measurement, I don't know if you'd have that structure necessarily all the time, but if you can get your data structured that way, it's probably easier to use, again, a dictionary lookup, and actually it's probably faster to use a dictionary lookup than it is to run a function that would be taking in arguments and looking up things based on those arguments. So I mostly agree with that example. This is about the impure functions or pure functions versus impure. So this pure function, for example You're certain is always going to return an integer like it has a reliable return to it This the second example where they're talking about fetch doubles The first one was like a double where you just to return x times two So it doubles the number the second one which was like fetch Under double it actually uses requests to get the response and then it tries to return the body looking for an answer key, that is not as stable. It could be it returns two or four. It could be the returns of 500 server error. Could be the returns some other, if a developer makes a mistake someplace, some other not expected answer or a string. So that's just an example of what It might even return an exception, like network not available. And then the pure functions versus classes. I mean, if you look at the example here, a function you can do in as simply as two lines with a definition of the function and a return. When you start talking about classes, you just get a lot more boilerplate going on inside the class. So if you don't need the classes, there's probably no reason to go that direction. And it kind of goes on and on and on here with more and more examples that just show some simpler ways to do that. This is the last one I'll talk about, which is the side effects. If you have a class that has a constructor in it, so you've defined a __init__() method, that __init__() can affect subclasses and you may not be aware of it because you've not looked at the code for it. So they have a time client example here with a __init__() that initializes a token using a request post. So it actually makes an API call in the base class. These other ones for time service and time controller are calling a constructor that uses that client, which means that every one of these will also make an API request. So you may want to manage that a little cleaner and reduce them or say, for example, external calls you're making in that case. The last bit I'll call out in honor of Brian Okken and his Lean TDD book, tests with no mocking are simpler than tests with mocking. I think we can all agree, but I think there's a world that needs to hear it. And there's a book about it. So if you check out Brian's Lean TDD book, he talks about this as well as part of that book. So I thought that was pretty apt and timely that this came up. And thanks, Kyle, for helping remind folks of the simpler ways and the
Yeah, I will. I'll go with the extras first. And continuing in my three-week streak of talking about uv releases and new features. The latest one released four days ago, uv 0.12.10, now ships the trusted publisher token revocation, and it has Python 3.15 support. So uv is on a terror of keeping up with all the latest bits that are going on, including the Python 3.15 releases coming up. So that's really cool that they're doing that. And then the other bit, I saw a fun little right release here making a python interpreter in 1024 bytes so kind of a little example of of if you've ever done code golf and do something in in such and such a number of steps this person implemented a full python interpreter in 1024 bytes of good old c code so that's pretty wild he i think he first attempted with 512 bytes uh which seems kind of crazy yeah good for you austin
When is this actually? I saw that the votes were coming up, but I don't see the actual. Anyway, it's previously been November through December or November through November. I think it's not yet up or just started. Anyway, this is the 2026 one. And so candidates, the nominees are here. Lots of folks I see. Yeah, it's a good list. So check it out, folks. And yeah. So anyway, I just want to give a shout out to that being a thing.
Yes, as in disallowed. Disallowed. We'll only get kicked off Reddit. This is not like a trombone versus trumpet. Like, what can you do with a trombone? You can't hit him with a little slider thing? I don't know. I used to play the trombone. I never really enjoyed it though. It was a requirement. No, the joke is, keep in mind, there's not programming exactly it's it but i think we can all just like enjoy a little it uh stuff you know and it says what single word in it makes you look like this and there used to be a picture that had a ah like i can't take it anymore and sorry this post was removed by reddit's filters and all it was was a picture of somebody making a weird face like honestly i don't know what was wrong with it but someone got up in arms this one this one took me a minute to understand what the the heck it was. It said, hello. Do you know what this is about? Why would this make IT people wig out? Maybe, you know, I didn't either. It's apparently on Teams or Slack. If somebody just says hello, and then they're going to write more, but then they kind of don't, you're like, hi.
I get a direct message along the lines, you got a minute? Or can I ask a question? Yes, exactly. Oh, let's see. So I got to collapse them because they all go down at like, this person says printer. Just no, no. Can't do it. What year is this and we still can't reliably print? I know. I just, this other, just like last week, I print maybe twice a year and I just needed to print. And it's like, the printer's out of ink. Like, I just bought an ink. I haven't printed since the last time I bought an ink. Anyway, but as in, not to interrupt your lunch, but.
Citrix, teams, SAP, you got my vote on SAP. Oh my gosh. Anyway, I thought this was a really fun list. I don't understand why. That was a good thread. I don't understand why they banned it, but whatever. Now that makes it even better. Because it's Reddit apparently. Yeah, I know. Awesome. I put stuff up there and it'll be like, well, it looks like you're trying to share an announcement and that's not allowed. So blocked. Like just, I wrote a blog post. I thought this community would think was interesting. So I wanted to share it. It's like, I'm not selling you anything. I promise. Not in this case anyway. Not on my blog.
