Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book

#458: I will install Linux on your computer

Published Mon, Nov 17, 2025, recorded Mon, Nov 17, 2025
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by us! Support our work through:

Connect with the hosts

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

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:

Joke: I will find you

Episode Transcript

Collapse transcript

00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:05 This is episode 458, recorded November 17th, 2025.

00:12 I'm Michael Kennedy.

00:13 And I'm Brian Okken.

00:14 And this episode is brought to you by us.

00:16 All the things that we're doing.

00:17 We have many fun and useful things to offer you.

00:20 pytest books, pytest courses, Python training courses,

00:24 the agentic AI programming course about how you take agentic AI

00:28 and turn it from like weird wizardry smushiness into engineering.

00:32 It's going incredibly well.

00:34 So check that course out.

00:35 Follow us on the socials.

00:37 Put them by set up slash live if you want to see this live

00:41 or streaming live or see the old shows.

00:43 And be sure to sign up to our newsletter.

00:45 We have tons of people really getting a lot of value with that.

00:48 Brian's putting that out.

00:49 And yeah, it's truly nice.

00:52 It's not just the links of the show notes, but it's extra deep information, background information,

00:57 that kind of stuff.

00:58 And the joke, always the joke, Brian.

00:59 Always the joke.

01:00 And we put a link to the joke, if we can find a link to the joke, in the newsletter as well.

01:06 Exactly.

01:07 Sometimes the joke has a link, and sometimes it's just like a dad programming joke, and it just has words.

01:13 What do you want to talk about first?

01:14 I actually want to talk about Django.

01:17 Oh, really? Okay.

01:19 And actually, kind of lightweight, I want to talk about the Django website.

01:23 I guess I heard about this, but there was a discussion about maybe redesigning the Django

01:29 website.

01:29 It's been the same for a while.

01:32 And it works.

01:33 It's good.

01:34 But I noticed Adam Hill put out a mock-up for what the Django website might look like.

01:43 So here's his new one.

01:46 And I'm kind of liking it.

01:47 I like the animated thing at the top.

01:51 It's the task framework.

01:52 It's the web framework.

01:55 Did Django just jump like 20 years into the future?

01:59 Yeah, it looks...

01:59 From where it was to the current day, it was.

02:01 It looks pretty good.

02:03 It's got like search documentation at the top that's really easy to find.

02:06 I mean, I guess there was...

02:08 Yeah, there's no...

02:09 I don't know where you have to...

02:10 The search documentation isn't at the top here.

02:13 I like the search there.

02:15 I'm liking it.

02:16 I like just the life of it.

02:20 Feels good.

02:21 I think that maybe we should go with it.

02:23 but you know it's just my vote but that you can you can join the discussion too if you'd like to

02:29 help out and and there is some assistance that that adam hill is okay with so there's and

02:37 it's not just him if you i'm putting a link to a discussion uh where he announced what his little

02:43 his demo um he said i'd love help with in the form of prs to the repo explicitly not looking for

02:50 drive-by critical feedback without PRs. It's fine. I guess here's my drive-by feedback. I like it.

02:57 I know that's not really, but I do like it. And, but you can read, it looks like he kind of picked

03:03 this up off of other, there was other work. Just a reminder that this doc informed my approach. So

03:09 there's another document about things. I didn't look at it actually, but the discussion's been

03:16 going on for a while, if I scroll to the top, there's been a discussion on, let me do this,

03:22 up to September 21st. Oh, it looks like he started it, that maybe we ought to redesign the website.

03:28 It's not too long, man, September 21st to now. But I think that it'd be cool to give. Why not?

03:35 Let's go for it.

03:36 You know what? I think, look, Django's a web framework. It should not look like it's, you know,

03:42 15 years old and outdated and rusty. I mean, it's a project that's getting tons of love and

03:47 attention. And I think it's a really good idea to make it feel like it belongs at the cutting edge

03:53 of web development these days. And, you know, just that website is aged. Yeah, it's like a long time,

04:01 right? Yeah, it is a long time. But also, even if the it should be a the to make it feel alive,

04:08 also the website could be in progress.

04:10 It could change also.

04:11 Not that, I mean, even if this one doesn't, I mean, maybe this is great

04:15 and this will be great for, the new one will be great for a long time.

04:18 But I think that we should be tweaking it on a regular basis

04:21 just to make sure people understand that it's still moving.

04:25 Yeah, absolutely.

04:26 And hat tip to Adam Hill.

04:28 That is a very nice looking website.

04:30 Yeah, I think it's neat.

04:31 Plus, I love that.

04:33 I got to say, I love the documentation at the top,

04:35 the search docs, because I often just go there,

04:38 because I'm used to going to a project homepage to search the docs.

04:41 So, yeah.

04:42 Yeah.

04:44 All right, what you got?

04:46 I want to dive into some concurrent database stuff.

04:52 So I want to talk about aiosqlitepool.

04:55 So there's three concepts here.

04:57 Async IO, SQLite, and then a connection pool type of thing.

05:02 So normally you just work with SQLite And it just says, hey, let's go open up all the infrastructure to talk to the SQLite database and do your work.

05:10 And then it closes it.

05:11 Then it opens it.

05:12 Then it closes it.

05:12 Then it opens it.

05:13 And that's not necessarily the fastest way to do that.

05:16 Maybe you could just leave it open.

05:18 But you don't want to leak these connections or have a whole insane ton of them open.

05:24 So instead, the idea is to use this connection pool.

05:26 So you say, instead of giving me a connection, you say, give me a connection from the pool.

05:30 Right.

05:30 And it'll keep a certain number of them open and hand them over to you when it needs or wait.

05:35 If there's already 10 connections running queries, you probably can just better off to wait and try to hit it with another.

05:42 So that's what this is.

05:44 And it's not a replacement.

05:46 Maybe people have heard of AIO SQLite.

05:49 AIO SQLite is a way to talk async and await, but to SQLite.

05:54 And all this is a little bit funky and interesting because SQLite is a file that runs in process.

06:00 It's stored as a file and it's a thing that runs in your Python process.

06:04 So you're not going out to the network and waiting and that kind of thing.

06:07 But this AIO SQLite gives you an async programming model.

06:12 But the way it works is you create a connection, do a query,

06:14 and then when you do async with, when that with block,

06:17 that context manager closes, the connection's gone.

06:20 So over and over, it's kind of up and down.

06:22 And so the idea is this aiosqlitepool wraps this SQLite library

06:30 for basically three core problems.

06:32 One, it tries to eliminate connection overhead by avoiding repeatedly opening and closing

06:38 syscalls, mem allocation, teardowns, all that kind of stuff, right?

06:41 Which I already described.

06:43 It also has the advantage of potentially faster queries

06:46 via hot cache.

06:47 So long-lived connections keep SQLite's in-memory page cache hot, right?

06:52 So once a database has seen a query, it has to look at the query and say,

06:56 okay, we're going to come up with a query plan.

06:58 Do we use this index?

06:59 Are there any indexes?

07:00 How are we going to sort it?

07:01 Is it a table scan?

07:02 There's all these things, right?

07:03 And that has to be determined for a query.

07:05 So it could be kept around and reused better, potentially.

07:10 And maximize the connection throughput.

07:12 So there's a bunch of stuff in here and some examples and so on.

07:16 Again, similar programming model with connection with async width,

07:19 but you get a connection from the pool.

07:21 Somewhere down here, though, there are some stats, I do believe.

07:26 Yes, the very, very bottom.

07:28 Let's see.

07:29 It says just doing 100,000 complex read operations across 20 workers with a reasonable-ish database setup, 5 million comments, 10 million likes, 100,000 posts.

07:42 And so like real data, not just like there's three items, query them, which one is, you know, which one's bigger than one.

07:47 Anyway, with all that, it says what's your throughput without the pool?

07:51 You get 3,000 operations a second with it.

07:54 You get 6,000.

07:55 basically for all the metrics you care about it's like a 2x improvement almost not quite but almost

08:00 so like throughput's almost double the latency's almost half more than half um better than that um

08:08 so on right so instead of 60 milliseconds it's 20 milliseconds response time that kind of thing so

08:13 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

08:20 and I can have multiple async or multiple parts of my process

08:26 accessing the same file at the same time?

08:28 Yeah.

08:29 Okay.

08:30 Yeah, SQLite supports concurrent access.

08:33 And especially if you're reading, there's no problem reading the file in parallel.

08:37 Yeah.

08:37 Right?

08:38 So, yeah.

08:39 Anyway, if you're doing SQLite stuff and you're doing async stuff,

08:43 check this out.

08:43 There may also be a SQLite pool that is not async.

08:45 I have no idea.

08:46 I haven't looked at that.

08:47 But once you get to the point where you're like, I'm worried about concurrent speed access to my database,

08:51 you know what, you're probably already in async land anyway.

08:54 So here you are.

08:56 Yeah.

08:57 So the answer is, yes, you're dense.

08:59 And I'm going to answer you anyway.

09:02 But no, thanks.

09:03 Yeah, yeah.

09:04 All right, over to you.

09:06 OK.

09:07 I am going to--

09:09 I'd like to talk about dependencies a little bit.

09:11 Last week-- I think it was last week--

09:13 We talked about pipdeptree and uv pip tree.

09:21 And those are great things.

09:24 This sounds similar, but it's not.

09:27 I'm going to talk about DEPTRY, D-E-P-T-R-Y.

09:31 And I'm pretty sure this was recommended by somebody, but I couldn't find the reference.

09:36 So I'm sorry for losing your name, but thanks to everybody for suggesting topics.

09:43 So Deptree is D-E-P-T-R-Y.

09:46 And what it does is it's a command line tool to check for issues with dependencies in a Python project,

09:53 such as unused or missing dependencies.

09:56 So the idea is like, so I appreciate the unused part.

10:02 The missing dependencies I'm probably going to catch and test, but hopefully,

10:06 but maybe you don't have thorough tests.

10:08 So if you're importing something and it doesn't show up in your requirements file or your

10:13 Python project.toml, it'll flag that.

10:16 And the reverse is true too.

10:17 So if you have a dependency listed, but maybe you refactored your code and you're not using

10:23 that dependency anymore, it'd be nice to find out that you don't need it.

10:28 So that's pretty much what it does.

10:29 But I really wanted one.

10:31 And it's pretty easy.

10:33 You install it in your project and then you run it.

10:37 and it scans everything and lets you know if, hey, you've got, for instance, NumPy is imported,

10:45 but you didn't declare it as a dependency.

10:47 And it does have this idea of development in dependencies

10:53 versus project dependencies, and that's the part that tripped me up a little bit.

10:57 That's the switch.

10:58 It's either development dependency or a project dependency.

11:04 And it's unfortunately super easy to get started and really easy to get tripped up by it.

11:10 And I got tripped up because I use optional dependencies for tests often.

11:19 So I'll do something like list test.

11:24 In my project, I'll say project optional dependency.

11:27 For test, I've got pytest and all my pytest plugins.

11:31 And then maybe doc for docs for all of my make docs or something to build the documentation.

11:38 Pretty standard.

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 is interesting.

11:52 I guess I don't get why your GUI or your CLI would be optional, but maybe two choices.

11:58 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.

12:05 And I do also want to have the GUI and the GUI install might be super heavyweight.

12:09 You know what I mean?

12:10 It's just a way to say I want less instead of like the union of all possible use cases.

12:15 Actually, I.

12:16 Oh, cool.

12:17 I've got a.

12:17 I wonder if I can work this as a test in test suites because there's times where I want some.

12:22 Anyway, I'm getting off on a tangent, but I think this would be fun to play with with test suites.

12:26 Why I'm going down this rabbit hole is because the most common thing in the usage and configuration,

12:34 it's like buried in here.

12:36 But if I look for a pytest, I'm going to have to look for it a couple of times, I guess.

12:40 Here we go.

12:41 So optional dependencies test of pytest, you have to list it out as you have to add this

12:49 big pip dep tree or tool dot dep tree and then pep621 dev dependency groups.

12:56 this is kind of verbose guys, but that's what you got to do.

12:59 And if you do that, it all works fine because I just like tried this out on a

13:03 simple project and it said, you're in, you've included pytest,

13:07 but you don't import it anywhere. No, I don't import it anywhere.

13:10 I'm using it for my test.

13:13 Do you understand what this is for?

13:16 So I'm a little thrown that I think, I think maybe I'll suggest that this, that the,

13:23 their example of using your depend that the dev dependency groups are at the

13:28 very least test and docs.

13:30 And I think that that should be the default.

13:31 I don't think you should have to declare that.

13:34 You know, if, if, if you've got a tests or docs,

13:38 it's, it's probably a development dependency,

13:40 not.

13:42 But anyway, I had fun with it.

13:44 I tried it out.

13:45 I do like the, it's not a whole bunch of rules.

13:48 The rules are like projects should not contain missing dependencies,

13:52 should not contain unused dependencies, should not use transitive dependencies.

13:58 That's interesting.

13:59 Yeah, I kind of agree.

14:00 You don't depend on-- if something's depend getting imported or installed because you

14:06 installed something else, that third party package might refactor and not include that.

14:12 So yeah, you should--

14:13 Yeah.

14:14 Yeah.

14:14 --transitive.

14:15 Anyway, I think a fun project.

14:17 And yeah, I'm going to check it out a little bit more.

14:19 Very cool.

14:20 Henry out there says those tests and doc dependencies should be dependency groups nowadays.

14:26 Okay.

14:28 I appreciate that.

14:29 I don't do nuanced stuff enough to know.

14:33 So yes, thanks, Henry.

14:34 Thanks for that homework, Henry.

14:35 Yes, exactly.

14:36 Thanks for the homework, man.

14:37 So you know what?

14:39 I could find myself on a server or just the terminal, and I'm trying to figure out why are some of my dependencies missing?

14:46 Where are my files even?

14:47 What's going on, Brian?

14:48 And I came across this thing called Juftin Browser.

14:53 Drop the E.

14:54 So it's a little bit too Web 2.0y, but it still has the O,

14:57 so I don't really know what that means.

14:59 Anyway, what it is, is this is a really neat tool that is basically an interactive keyboard-driven

15:07 and mouse-driven experience, like a Finder or Windows Explorer,

15:12 but for your terminal and works over SSH.

15:15 So if I SSH into a server, I can say Browser in a folder and it gives me a tree of all the folders i can arrow through them i can click

15:22 through them and then expand and when you click on them it will show on the right the file and on the

15:28 left the tree of the area starting from where you ran it and down isn't that cool that is pretty cool

15:33 yeah and it has yeah it has um basically the viewing for the files it has context highlighting

15:40 you can even show images and a couple other things like that so really neat and i think if you're

15:46 doing anything super terminal based i know you can run on your local machine but i don't know here's

15:51 a little tip for people who don't know if you're in a folder on mac os you can type open space dot

15:58 and that will just bring a binder there in windows you can say start space dot and it will open up

16:03 windows explorer focused in that folder so if you're in the terminal you want like a brow like a

16:09 gooey like thing you're pretty close you're pretty close to having it you got to type browser anyway

16:13 if you want to get this thing to start.

16:15 But if you're on an SSH connection to a server, well, there is no alternative but to just LS your way through.

16:22 And this is a really nice way to just kind of flip through

16:24 and exploit what is in here.

16:25 And as you move through the files, it displays them with syntax highlighting.

16:29 I like it.

16:29 I think it's super, super useful.

16:30 It's going to be part of my server maintenance toolkit,

16:34 I think is what I'll say.

16:35 Yeah, it's fun.

16:37 I, you know, I'm also one to possibly just use open.

16:43 for that, but also or just cheat and just say code space dot and

16:49 open and have the tree directory.

16:53 I think the O is necessary in the name so that it's

16:57 bro. So bros or maybe. Bro.

17:02 Yeah.

17:03 If you don't, it's not on the GitHub, I don't think, but if you click their

17:07 domain, which is effectively like a read the docs type of thing,

17:11 you can actually see it in action.

17:12 with a little animated screen recording.

17:15 We love animated screen recordings.

17:17 Yes.

17:18 So, so nice.

17:20 So.

17:20 Cool.

17:21 All right.

17:22 What you got extras?

17:23 I just have a show and tell extra because I went to an estate sale a couple weeks ago

17:28 and I got a fun gift that, or a fun little thing that I just picked up.

17:33 And so I was going to show it off, show and tell.

17:36 I got this book called Micro, Understanding the Micro.

17:42 And it's microcomputers, how they work and what they can do.

17:48 And I flipped.

17:49 It's sort of fun.

17:50 It's got like, you know, it's for kids and stuff.

17:53 But in the back, there's a buyer's guide.

17:57 And I flipped back.

17:58 I'm like, well, does it have mine?

18:00 And yeah, sure enough, the TRS-80 color computer.

18:05 That was when I started.

18:07 Okay.

18:08 Fun little book.

18:09 And I haven't read much of it yet, though.

18:11 but it should be fun.

18:13 It even talks about basic programming and stuff like that.

18:16 It's fun.

18:17 Nice.

18:17 You see, Brian, I was definitely later

18:20 in the computer hardware game.

18:22 My brother had a Commodore 64, but I saved up when I was in high school

18:28 and I got myself a 486 DX, not the SX,

18:31 but the one with the floating point processor and 33 megahertz.

18:35 That's where I started off.

18:37 I think that's close to what I had.

18:39 I think I must've been ahead of you a little bit.

18:41 I bought a 486 IBM 46 when I was in college so that I could do homework on it.

18:48 And I think the first thing I bought was Turbo Pascal for it.

18:52 Nice.

18:53 I think the first thing I got was MechWarriors.

18:57 Yeah.

18:57 Yeah.

18:58 All right.

18:58 Awesome.

18:59 Well, there's a whole bunch of stories from that era, but let's go back to this era.

19:03 And I just want to say, since you gave the recommendation of John Papa's Peacock, I've

19:09 been playing with it.

19:10 It is so good.

19:11 that's fun right it is really really useful and what i didn't realize the way it works is if you

19:18 are in something like cursor or vs code or whatever and it has you have to create a workspace not just

19:24 open a directory but once you create the workspace it embeds your like styling for that project into

19:31 the workspace file so it syncs across machines naturally by just doing get push get pull oh and

19:38 So yeah, it's a little bit extra like that.

19:42 So that's pretty cool.

19:43 Anyway, I just want to give a shout out to a follow up to that, I suppose.

19:45 Like, yeah, that was awesome.

19:47 Still is.

19:48 Cool.

19:49 I guess I have, do you have more extras?

19:51 No, without further extras.

19:53 I had one that I kind of forgot to say.

19:55 I am still working on the Lean TDD book and I'm almost done with the building

20:01 on test-driven development chapter.

20:04 So finally, with a book like TDD in the name, I finally talk about TDD in it.

20:10 I haven't released that yet, but I'm hoping to release that later today

20:13 or maybe tomorrow.

20:14 Oh, very cool.

20:15 Awesome.

20:16 I love it.

20:17 Anyway.

20:17 That's great.

20:18 I love the idea.

20:19 And Brutus out there says, Peacock is awesome.

20:22 I used it since last week when you talked about it, Brian.

20:24 Thanks.

20:24 Cool.

20:25 Yeah, I love it.

20:26 Yeah, I do too.

20:26 All right.

20:27 Let's do our joke.

20:29 So, you know, people have threats.

20:30 They can be empty threats or scary threats.

20:35 You know, like, I'm going to tell the world about this thing that you did weird.

20:38 Or I'm going to find you.

20:40 I'm going to punch you in the gut or whatever.

20:43 But that's not a very common thing that programmers do.

20:46 Now, programmers have a different version.

20:48 I will find you and I will install Linux on your computer.

20:55 Yeah, that's extreme.

20:56 Yeah, you know you've messed up when someone gets over and you're like,

21:01 Aurora? All right. Who did this? What is this? Reminds me of the, I'm having the bios flavor

21:09 of the slushies or the frozen yogurt or whatever. Yeah. I will downvote your Hacker News article.

21:18 No. Oh yeah, exactly. I will definitely downvote your Hacker News article.

21:25 Or, you know, this also reminds me of like some of the jokes people used to play. Oh my goodness.

21:30 especially with Windows, if you could change the background image.

21:36 Oh, yeah. To the blue screen of death.

21:38 Change the background image to the blue screen of death.

21:41 Or I know when Vista came out, people were super like,

21:44 do not put this on my computer.

21:46 And the IT people were installing it.

21:48 I know someone who took a screenshot of Vista, put it onto someone else's computer,

21:52 and then tasked their Explorer or something like that.

21:56 And so they didn't have any.

21:58 Oh, that's funny.

21:59 They had no thing overlaying it, so it just, like, no, they didn't.

22:03 And they, like, click around.

22:04 Like, I told you it wouldn't work.

22:05 Nothing even clicks here.

22:07 Yeah.

22:08 I will find you and do stuff your computer is pretty fun.

22:10 But this one is I will find you and install Linux in your computer.

22:13 That's funny.

22:14 Yeah.

22:15 Be careful whose child you had booked.

22:18 Exactly.

22:18 Well, I'll tell you what.

22:19 I'm not actually going to go install Linux on anyone's computers,

22:22 other than particularly mine.

22:23 So no threats here.

22:24 Yeah.

22:25 Although, Henry does point out that these days, maybe the opposite is more threatening.

22:30 I'll find you and I'll steal Windows 11 on your computer.

22:35 Yeah.

22:36 Oh, there's a lot of bad ideas shown in the chat.

22:38 We're not going to share.

22:41 They're great, though.

22:42 Made me laugh.

22:42 No, they're good.

22:43 Thank you, everyone.

22:45 See you all later.

22:45 Bye.

22:46 Bye.


Want to go deeper? Check our projects