Python Bytes - #458 I will install Linux on your computer

Episode Date: November 17, 2025

Topics covered in this episode: Possibility of a new website for Django aiosqlitepool deptry browsr Extras Joke Watch on YouTube About the show Sponsored by us! Support our work through: Our c...ourses at Talk Python Training The Complete pytest Course Patreon Supporters Connect with the hosts Michael: @mkennedy@fosstodon.org / @mkennedy.codes (bsky) Brian: @brianokken@fosstodon.org / @brianokken.bsky.social Show: @pythonbytes@fosstodon.org / @pythonbytes.fm (bsky) Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too. Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it. Brian #1: Possibility of a new website for Django Current Django site: djangoproject.com Adam Hill’s in progress redesign idea: django-homepage.adamghill.com Commentary in the Want to work on a homepage site redesign? discussion Michael #2: aiosqlitepool 🛡️A resilient, high-performance asynchronous connection pool layer for SQLite, designed for efficient and scalable database operations. About 2x better than regular SQLite. Pairs with aiosqlite aiosqlitepool in three points: Eliminates connection overhead: It avoids repeated database connection setup (syscalls, memory allocation) and teardown (syscalls, deallocation) by reusing long-lived connections. Faster queries via "hot" cache: Long-lived connections keep SQLite's in-memory page cache "hot." This serves frequently requested data directly from memory, speeding up repetitive queries and reducing I/O operations. Maximizes concurrent throughput: Allows your application to process significantly more database queries per second under heavy load. Brian #3: deptry “deptry is a command line tool to check for issues with dependencies in a Python project, such as unused or missing dependencies. It supports projects using Poetry, pip, PDM, uv, and more generally any project supporting PEP 621 specification.” “Dependency issues are detected by scanning for imported modules within all Python files in a directory and its subdirectories, and comparing those to the dependencies listed in the project's requirements.” Note if you use project.optional-dependencies [project.optional-dependencies] plot = ["matplotlib"] test = ["pytest"] you have to set a config setting to get it to work right: [tool.deptry] pep621_dev_dependency_groups = ["test", "docs"] Michael #4: browsr browsr 🗂️ is a pleasant file explorer in your terminal. It's a command line TUI (text-based user interface) application that empowers you to browse the contents of local and remote filesystems with your keyboard or mouse. You can quickly navigate through directories and peek at files whether they're hosted locally, in GitHub, over SSH, in AWS S3, Google Cloud Storage, or Azure Blob Storage. View code files with syntax highlighting, format JSON files, render images, convert data files to navigable datatables, and more. Extras Brian: Understanding the MICRO TDD chapter coming out later today or maybe tomorrow, but it’s close. Michael: Peacock is excellent Joke: I will find you

Transcript
Discussion (0)
Starting point is 00:00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds. This is episode 458, recorded November 17th to 2025. I'm Michael Kennedy. And I'm Brian Akin. And this episode is brought to you by us, all the things that we're doing. We have many fun and useful things to offer you. Pytask books, Pytast courses, talk Python training courses, the Agenic AI programming course about how you take GENTIC AI and turn it from like weird wizardry smushiness into engineering is going incredibly well so check that course out
Starting point is 00:00:35 follow us on the socials by set of them slash alive if you want to see this live for streaming live or see the old shows and be sure to sign up to our newsletter we have tons of people really getting a lot of value that brian's putting that out and yeah it's truly nice it's not just the links of the show notes but it's extra deep information you know background information that kind of stuff And the joke. Always the joke. And we put a link to the joke if we can find a link to the joke in the in the newsletter as well. Exactly. Sometimes the joke has a link and sometimes it's just like a dad programming joke and it just has words. What do you want to talk about first? I actually want to talk about Django. So.
Starting point is 00:01:18 Oh, really? Okay. And actually kind of lightweight. I want to talk about the Django website. But I guess I'd heard about this, but there was a discussion about maybe, maybe redesigning the Django website. It's been like the same for a while. And it works. It's good. But there is, I noticed Adam Hill put out a mockup for what the Django website might look like. So here's his new one.
Starting point is 00:01:46 And I'm kind of liking it. I like the animated thing at the top. It's the task framework. It's the web framework. Did Django just jump like 20 years into the future? Yeah, from where it was to the current day, it was funny. It looks pretty good. It's got like search documentation at the top that's really easy to find.
Starting point is 00:02:06 I mean, I guess there was, yeah, there's no, I don't know where you have to, the search documentation isn't at the top here. I like the search there. I'm liking it. I like the, I like that just the life of it feels good. I think that maybe we should go with it. But, you know, it's just my vote. But you can join the discussion, too, if you'd like to help out.
Starting point is 00:02:30 And there is some assistance that Adam Hill is okay with. So there's, and it's not just him. I'm putting a link to a discussion where he announced what his little, his demo. He said, I'd love help with in the form of PRs to the repo, explicitly not looking for drive-by critical feedback without PRs. It's fine. I guess here's my drive-by feedback. I like it.
Starting point is 00:02:57 I know that's not really feedback, but I do like it. And but you can read, it looks like he kind of picked this up off of other, there was other work. Just a reminder that this doc informed my approach. So there's another document about things. I didn't look at it, actually. But the discussion's been going on for a while.
Starting point is 00:03:17 If I could scroll the top, there's been a discussion on, let you do this, up to September 21st. It looks like he started it, that maybe we had to redesign the website. It's not too long, man, September 21st now. But I think that it would be cool to give it. Why not? Let's go for it. You know, I think, look, Django's a web framework. It should not look like it's 15 years old and outdated and rusty.
Starting point is 00:03:45 I mean, it's a project that's getting tons of love and attention. And I think it's a really good idea to make it feel like it belongs at the cutting edge of web development these days. And, you know, just that website is aged fine. It's like a long time, right? Yeah, it is a long time. But also, even if the, it should be a, to make it feel alive also, the website could be embarked. It could change also. Not that, I mean, even if this one doesn't, I mean, maybe this is great.
Starting point is 00:04:15 And this will be great for, the new one will be great for a long time. But I think that we should be tweaking it on a regular basis just to make sure people understand that it's still moving. Yeah, absolutely. And hat tip to Adam Hill. That is a very nice looking website. Yeah. I think it's neat. Plus, I love the, I got to say, I love the documentation at the top, the search the docs, because that's, I often just go there.
Starting point is 00:04:38 Because I'm used to going to a project homepage to search the docs. So, yeah. Yeah. Yeah. All right. all right what you got oh i want to dive into some concurrent database stuff so i want to talk about a io sequel light pool so there's three concepts here async io sequel light and then a connection pool type of thing so normally you just work with sequel i and it just says hey let's go open up all
Starting point is 00:05:07 the infrastructure to talk to the SQL light database and do you work and then it closes it then it opens it then it closes it, then it opens it. And that's not necessarily the fastest way to do that. Maybe you could just leave it open. But you don't want to leak these connections or have a whole insane ton of them open. So instead the idea is you use this connection pool. So you say, instead of give me a connection,
Starting point is 00:05:28 you say, give me a connection from the pool, right? And it'll keep a certain number of them open and hand them over to you when it needs or wait. If there's already 10 connections running queries, you probably can just better off to wait and try to hit it with another. So that's what this is, and it's not a replacement.
Starting point is 00:05:46 Maybe people have heard of AIO SQLite. AIO SQLite is a way to talk async and await, but to SQLite. And all this is a little bit funky and interesting because SQLite is a file that runs in process. You know, it's stored as a file and it's a thing that runs in your Python process. So you're not going out to the network and waiting and that kind of thing, right? But this AIO SQLite gives you an async programming model, but the way it works is you create a connection, do a query, and then when you do async with, when that width block, that context manager closes, the connection's gone, right? So over and over, it's kind of up and down, right? And so the idea is this AIO SQLite pool wraps this SQLite library for basically three core problems. One, it tries to eliminate connection overhead by avoid, like, repeatedly opening. and closing, you know, syscalls, mem allocation, tear downs, all that kind of stuff, right?
Starting point is 00:06:41 Which I already described. It also has the advantage of potentially faster queries via hot cache. So long-lived connections keep SQL's lights in-memory pagecast hot, right? So once a database has seen a query, it has to look at the query and say, okay, we're going to come up with a query plan. Do we use this index? Are there any indexes? How are we going to sort it?
Starting point is 00:07:01 Is it a table scan? There's all these things, right? And that has to be determined for a query. So it could be kept around and reused better, potentially, and maximize the connection throughput. So there's a bunch of stuff in here and some examples and so on. Again, similar programming model with connection with async width, but you get a connection from the pool. Somewhere down here, though, there are some stats, I do believe. Yes, the very, very bottom.
Starting point is 00:07:27 Let's see. It says just doing 100,000 complex read operations across 20 work. with a reasonable-ish database setup, 5 million comments, 10 million likes, 100,000 posts, and so, like, real data, not just like, there's three items, query them, which one is the, you know, which one's bigger than one? Anyway, with all that, it says, what's your throughput? Without the pool, you get 3,000 operations a second with it. You get 6,000. Basically, for all the metrics you care about, it's like a 2x improvement, almost. Not quite, but almost.
Starting point is 00:08:00 So, like, throughput's almost double. The latencies, almost half, more than... half better than that um so on right so instead of 60 milliseconds it's 20 milliseconds response time that kind of thing so why not you know if this is easy to use so you're gonna like maybe i'm dense but the i can use this and i can have multiple i can have multiple async or multiple parts of my process accessing the same file at the same time yeah okay yeah sequel light supports concurrent access and especially if you're reading, there's no problem reading the file in parallel.
Starting point is 00:08:37 Yeah. Right? So, yeah, anyway, if you're doing SQLite stuff and you're doing async stuff, check this out. There may also be a SQLite pool that is not async. I have no idea. I haven't looked at that. But once you get to the point where, like,
Starting point is 00:08:49 I'm worried about concurrent speed access to my database. You know what? You might just, you're probably already in async land anyway. So here you are. Yeah. Yeah. So the answer is, yes, you're dense. And I'm going to answer you anyway.
Starting point is 00:09:01 But no, thanks. Yeah, yeah. All right, over to you. Okay. I'm going to, I'd like to talk about dependencies a little bit. Last week, I think it was last week, we talked about UV tree or, you know, PIP, Deptree and UVP-Tree. And those are great things. A similar, this sounds similar, but it's not.
Starting point is 00:09:27 I'm going to talk about Deptree, D-E-P-T-R-Y, and I'm pretty sure. this was recommended by somebody, but I can't, I couldn't find the reference. So I'm sorry for losing your name, but thanks to everybody for suggesting topics. So Deptree is D-E-P-T-R-Y, and what it does is it's a command line tool to check for issues with dependencies in a Python project, such as unused or missing dependencies. So the idea is like, so I appreciate the unused part. Missing dependencies, I'm probably going to catch in test, but hopefully, but maybe you don't have thorough tests. So if you're importing something and it doesn't show up in your requirements file or your Pythonproject.comal, it'll flag that. And the reverse is true, too.
Starting point is 00:10:17 So if you have a dependency listed, but maybe you refacted your code, you're not using that dependency anymore. It'd be nice to find out that you don't need it. So that's pretty much what it does. but I really wanted one and so that's and it's pretty easy you install it in your project and and then you run it and it scans everything and lets you know if hey you've got for instance um numpy is imported but you didn't declare it as a dependency and it does have this idea of development in dependencies um versus project dependencies and that's the part that trip me up a little But that's the switch.
Starting point is 00:10:58 It's either development dependency or a project dependency. And it's unfortunately, like, super easy to get started and really easy to get tripped up by it. And I got tripped up because I use optional dependencies for tests often. So I'll do something like list test. In my project, Tom, I'll say project optional dependent. For test, I've got pie test and all my pie test plugins. And then maybe doc for docs for all of my like make docs or something to build the documentation. Pretty standard.
Starting point is 00:11:39 But what Deptree does is it finds these optional dependencies and just includes them in your normal dependencies because it might be your CLI or your GUI, which interesting. I guess I don't get why your GUI or your CLI would be optional. But maybe you have two choices. I don't like it either, but I think I've seen it like I want to install this and only have the CLI or I want to install this. And I do also want to have the GUI and the GUI install might be super heavyweight. You know what I mean? It's just a way to say I want less instead of like the union of all possible use cases.
Starting point is 00:12:15 Actually, I, oh, cool. I wonder if I can work this in test suites because there's times where I want some of it. Anyway, I'm getting off on a tangent, but I think this would be fun to play with with. test suites. Why I'm going down this rabbit hole is because the most common thing of in the usage and configuration, it's way, it's like buried in here. But if I look for pie test, I'm going to have to look for it a couple times, I guess. Here we go. So optional dependencies test of pie test, you have to list it out as you have to add this big pip deptree or tool dot deptree. And then PEP 621 dev dependency.
Starting point is 00:12:55 Z groups. This is kind of verbose guys, but that's what you got to do. If you do that, it all works fine because I just like tried this out on a simple project and it said, you've included pie test, but you don't import it anywhere. No, I don't import it anywhere. I'm using it for my
Starting point is 00:13:11 test. Do you understand what this is for? So, I'm a little thrown that, I think maybe I'll suggest that this, that the their example of using your depend that the dev dependency groups are at the very least test and docs and i think that that should
Starting point is 00:13:31 be the default i don't think you should have to declare that um you know if if if you've got a tests or docs it's it's probably a development dependency not yeah but anyway i had fun with it um i tried it out uh i do like the it's not a whole bunch of rules the rules are like um uh projects should not contain missing dependencies should not contain unused dependencies um Should not use transitive dependencies. That's interesting. Yeah, I kind of agree. You don't depend on, if something's getting imported or installed because you installed a something else,
Starting point is 00:14:08 that third party package might refactor and not include that. So, yeah, you should be transitive. Anyway, I think a fun project and, yeah, I'm going to check it out a little bit more. Very cool. Henry out there says those tests and dock dependencies should be dependency groups. nowadays. Okay. I appreciate that. I don't do nuanced stuff enough to know. So, yes, thanks, Henry. Thanks for that homework, Henry. Yes, exactly. Thanks for the homework, man. So I, you know what, I could find myself on a server or just the terminal and I'm trying to
Starting point is 00:14:44 figure out why are some of my defendantsies missing. Where are my files even? What's going on, Brian? And I came across this thing called Jephton Browser, drop the E. So it's a little bit web 2.0E, but it still is the O, so I don't really know what that means. Anyway, what it is is this is a really neat tool that is basically an interactive, like keyboard-driven and mouse-driven experience, like a finder or Windows Explorer, but for your terminal and works over SSH. So if I SSH into a server, I can say a browser and a folder, and it gives me a tree of all the folders. I can arrow through them. I can click through them and then expand. And when you click on them, it will show on the right the file and on the left the tree of the area starting from where you ran it and down.
Starting point is 00:15:32 Isn't that cool? That is pretty cool. Yeah. And it has, yeah, it has basically the viewing for the files. It has context highlighting. You can even show images and a couple other things like that. So really neat. And I think if you're doing anything super terminal base, I know you can run on your local machine, but I don't know, here's a little tip for people who don't know.
Starting point is 00:15:53 if you're in a folder on macOS you can type open space dot and that will just bring a binder there in windows you can say start space dot and it will open up Windows Explorer focused in that folder so if you're in the terminal you want like a brow like a gooey like thing you're pretty close you're pretty close to have it you got to type browser anyway if you want to get this thing to start but if you're on an SSH connection to a server well there is no alternative but to just LS your way through. And this is a really nice way to just kind of flip through and explore what is in here. As you move through the files, it displays them with syntax highlighting. I like it. I think it's super, super useful. It's going to be part of my server maintenance toolkit, I think,
Starting point is 00:16:34 is what I'll say. Yeah, it's fun. I, you know, I'm also wanted to possibly just use open dot for that, but also, or just cheat and just say code, space, dot, and open. Yes, code. and have the tree directory. I think the O is necessary in the name so that it's bro. So bros are maybe. Bro. Yeah, if you don't, it's not on the GitHub, I don't think, but if you click their domain,
Starting point is 00:17:08 which is effectively like a read-the-docs type of thing, you can actually see it in action with a little animated screen recording. We love animated screen recordings. Yes, so, so nice. so cool all right what you got extras i just have a show and tell extra because i went to an estate sale a couple weeks ago and i got a fun gift that or a fun little broad thing that i just uh that i picked up and so i was going to show it off show and tell um i got this this book called uh micro uh understanding the micro um and it's it's micro computers what they can how how they work
Starting point is 00:17:46 and what they can do and i flipped it's it's it's sort of fun. It's got like, you know, it's for kids and stuff. Um, but the, uh, in the back, there's a, uh, there's a buyer's guide. And, um, I flipped back and I'm like, well, does it have mine? And yeah, sure enough, um, the TRS 80 color computer. That was, that was what I started. Okay. Fun little book. And, uh, I haven't read much of it yet, though, but, um, should be fun. It even talks about basic programming and stuff like that. That's fun. Nice. You see, Brian, I was definitely later in the computer hardware game. My brother out of Commodore, 64,
Starting point is 00:18:25 but I saved up when I was in high school and I got myself a 486 DX, not the SX, but the one with the floating point processor and 33 megahertz. That's where I started off. I think that's close to what I had. I think I must have been a heading a little bit. So I bought a 486 IBM 46 when I was in college
Starting point is 00:18:46 so I could do homework on it. And I think the first thing I bought was Turbo Pascal for it. Nice. I think the first thing I got was Mech Warriors. Yeah. Yeah. All right. Awesome.
Starting point is 00:18:59 Well, there's a whole bunch of stories from that era. But let's go back to this era. And I just want to say, since you gave the recommendation of John Poppa's peacock, I've been playing with it. It is so good. That's fun, right? It is really, really useful. And what I didn't realize, the way it works is if you're in,
Starting point is 00:19:18 something like cursor or VS code or whatever and it has you have to create a workspace not just opening a directory but once you create the workspace it embeds your like styling for that project into the workspace file so it sinks across machines naturally by just doing get push get pull oh yeah it's it's a little bit extra like that so that's pretty cool anyway i just want to give a shout out to a follow up to that i suppose like yeah that was that was awesome still is Cool. I guess you have, do you have more extras? No, I'm without further extras. I had one that I kind of forgot to say. I am still working on the Lean TDD book and I'm almost done with the building on test driven development chapter. So finally, with a book like TDD in the name, I finally talk about TDD in it. I haven't released that yet, but I'm hoping to release that later today or maybe tomorrow.
Starting point is 00:20:14 Oh, very cool. Awesome. I love it. that's great i love the idea and uh brutus out there says peacock is awesome i used it since last week when you talked about it brian thanks cool yeah i love it yeah i do too all right let's do our joke so you know people have threats they can be empty threats or scary threats you know like i'm gonna tell the world about this thing that you did weird or i'm gonna fight you i'm gonna punch you in the gut or whatever but that's not a very common thing that programmers do now programmers have a different version. I will find you and I will install Linux on your computer. Yeah, that's extreme. Yeah. Yeah, you know you've messed up when someone gets over and
Starting point is 00:21:00 you're like, Aurora, all right, who did this? What is this? Reminds me of the, I'm having the bios flavor of the Seleshes or the frozen yogurt or whatever. Yeah, I will, I will downvote your hacker news article no oh yeah exactly i will definitely downfall your your hacker news article or you know this also reminds me of like some of the jokes people used to play oh my goodness what especially with windows if you could change like change the back the background image oh yeah to the blue screen of dress like change a background image to the blue screen of death or or i know when vista came out people were super like do not put this on my computer and the IT people were installing it.
Starting point is 00:21:48 And I know someone who took a screenshot of Vista, put it onto someone else's computer, and then entasts their explorer or something like that. And so they didn't have any. Oh, that's funny. They had no thing overlaying it. So it just was like, no, they did it. And they like click on.
Starting point is 00:22:04 Like, I told you it wouldn't work. Nothing even clicks here. Yeah. I will find you and do stuff your computer is pretty fun. But this one is I will find you on install Linux in your computer. That's funny. Yeah. Be careful.
Starting point is 00:22:16 who's a child you had booked exactly well i'll tell you what i'm i'm not actually going to go install Linux on anyone's computers other than potentially mine so no threats here yeah although henry does point out that these days maybe the opposite is more threatening i'll find you and i'll install windows 11 on your computer yeah oh there's a lot of bad ideas showing on the chat we're not going to share um yeah they're great though made me a lot all right thank you everyone see you all later. Bye. Bye.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.