Skip to content
PodSubs
ShowsPeopleGuestsJobsNewsEvents
More
BlogPodCred
Menu
ShowsPeopleGuestsJobsNewsEventsBlogPodCredNetworksSign in
Join nowSign in
  • Shows
  • People
  • Jobs
  • News
  • More
    • Guests
    • Events
    • Blog
    • PodCred
    • Networks
    Join nowSign in

Python Bytes

Python Bytes artwork

#455 Gilded Python and Beyond

Oct 27, 202539 minAudio

Topics covered in this episode: Cyclopts: A CLI library The future of Python web services looks GIL-free Free-threaded GC Polite lazy imports for Python package maintainers Extras Joke See the full show notes for this episode on the website at pythonbytes.fm/455

Audio and video play straight from the show's own hosting. PodSubs stores and serves no media.

Transcript

From the show. Tap a time to play from there.

Brian OkkenHello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds. This is episode 455, recorded October 27th, 2025. And I'm Brian Okken. I'm Michael Kennedy. And this episode is sponsored by the wonderful people at Python Bytes. Actually, both and everybody here. So please check out the work we do for a little bit of money. We've got Talk Python training with tons of wonderful courses. And his new book, of course, Michael's new book.

Brian OkkenAnd then also, if you want to check out pytest, there's the complete pytest course. Or you can take the pytest course at Talk Python Training. And as always, thank you to our Patreon supporters. You guys rock. We don't shout you out all the time, but we always appreciate you. If you'd like to submit a topic idea or some feedback for us or just say hi, Check out the show notes at pythonbytes.fm. There's links to our socials.

Brian OkkenWe've got the show, and both Michael and I are on Bluesky and Fosstodon, but that's really Mastodon, so wherever you're at there. If you're listening to this and you're like, what, sounds like they're recording live somewhere. We can see it. Yes, we are recording and streaming, but you can watch all the back episodes or participate in the chat if you want to. Check out pythonbytes.fm/live with all the details there and a link to when we're going to record next.

Brian OkkenBefore we get started, one last thing. We do send out a newsletter that's getting better and better as we go along, thanks to both Michael and I working on it a little bit. So there's a newsletter we send out with all the links. So you don't have to take notes. We'll send you out an email. So sign up for the newsletter and we'll send you those links and extra details too. It's a great resource. Yeah, I think people really appreciate it, Brian.

Michael KennedyYou know, if you look at when you send out the email and then book back in the campaign and how many people actually open to the thing that we send out or click on it, those are really close to 100%, which is ridiculous. So that's a really good sign that other people might also like it.

Brian OkkenYeah, I think that people are using it in place of taking notes. And also, if you're in a car or something, you don't want to try to remember. You don't have to. So awesome. All right, Michael, what do you got for us right away?

Michael KennedyWell, let me see what I can do here. Let's see what the Cyclops says. A Cyclops. It's like a little programming kitty, but it's a Cyclops. It's a cute.

Brian OkkenLike Opt, O-P-T. operations cycle.

Michael KennedyI get it. So we've heard of Click. You and I were both just actually singing the praises of ArgPars, which is pretty interesting. I am such a fan of ArgPars these days because it's just built in and it's simple and it's good enough. If you were building something where the CLI API or interface or dev user experience was super important, you might choose something other than ArgPars. So what are your options? You could choose Click, you could choose Typer.

Michael KennedyTyper is actually built on Click, so in a sense it's like Starlette and FastAPI. You choose one, you get the other in a sense. So there's a blend there, and there's others. I know there's a bunch of different CLI building options. But the Cyclops is one that sort of has the second mover advantage over Typer. And their sort of tagline, I don't remember where I saw it, but somewhere in here, it's not actually right here on this page. but no shade at typer, but it says what you thought typer was going to be. And my second boomer advantage is like, all right,

Michael Kennedywe've seen different interface things built based around type information. And now that we've seen the pluses and the minuses, could we do a slightly different version that has more pluses and fewer minuses? And so there's a whole page of the typer comparison here. And I'm not a super expert on typer. My CLI, who is not that great. So there's 13 different things, 13 different components or features or aspects of the API that they chose to address to say, Typer's great.

Michael KennedyWe're basically inspired by Typer. That's what we're doing. However, there's a couple of these 13 areas I think we should make better, right? So you could actually go through and look at all of them. Probably the biggest one is that Typer was made with Python 3.7, 3.8, where Python's types were at an earlier stage in their life. You had to say things like, this is an argument of int, or it is an int when it's actually an argument of int or something like that. And this Cyclops thing was built once annotated was introduced,

Michael Kennedywhich allows you to have sort of a dual role. Like, it really is one of these, but its type could also be like its native value, right? Allowing the removal of proxy defaults. Why does that matter? Because if you build a CLI with Cyclops, and you use types, you can still use it as regular functions as if they just had an integer where it said it took an integer and so on. So things like that. It's got about, I think, a thousand GitHub stars or so. It's not crazy, crazy popular. But if you're really loving that concept

Michael Kennedyof having types for your CLI, give this thing a look.

Brian OkkenYeah, actually, I got a shout out to him for doing things like comparing to Typer because, like you said, a lot of us, I use Cyper as well. And I've used Typer, I've used Click and ArgParse. And so you're probably not going to grab too many of the ArgParse people because they're just using it because it's built in, maybe.

Michael KennedyYou're like the unit test people, Brian. What can you do? You talk pytest for 10 years.

Brian OkkenI yell louder. That's what I do. But I think it's a fair thing because I'd be thinking, well, if I'm not going to use ArgParse, I'm probably going to reach for Typer or Click, lately Typer. But having this comparison here and then even a migration from Typer, I think that's cool to show that. And there's always room for making CLI tools better. We love CLI tools. Yeah.

Brian OkkenYeah, there definitely are.

Michael KennedyBut yeah, so cool. I ran across this and I built something with it recently and it was nice. Oh, did you? Checking out.

Brian OkkenYeah.

Michael KennedyA little, you know, I'm starting to add. I've been kind of, I've drunk the Kool-Aid now that maybe having an actual CLI, even from my own tools, might be a little bit better than just, here's a script I run and maybe I'll pass it something and just look at sys.argv and see if it's in there. Oh, man. Let's do a little bit better. And now that I've started to do that, I've been playing with these different ones, which is, I think, where I kind of got inspired to go down this path and talk about it today.

Brian OkkenYeah, awesome. Cool. I want to talk about the present, the future, a little bit of both. So there is this interesting article, of course, in Python 3.14. Well, we had it in 3.13, is that the GIL was optional with what they call the free threading version, right? Free threaded Python.

Michael KennedyNot the GIL-less, not the galectomy. Free-threaded, I think, is where we landed from the PEP.

Brian OkkenOkay, but is it kind of the same thing? Yeah. Okay. Oh, right. The galectomy was a different project. Yeah, it was.

Michael KennedyGosh. Anyway. Larry Hastings was doing that. But I believe, I mean, the free-threaded stuff, there's a lot of things that had to happen. And actually, my next topic is also on free-threaded Python. And it's not just let's take out the gill, but they had to rework memory management. the structure of object. There's like a lot of moving parts in order to make this possible.

Brian OkkenOkay, cool. Okay, so with the free-threaded Python, so now we have in 3.13, we had two versions of Python released. So if you go to download Python, you get a choice. And with UV2, you can add a T to it, 3.14 T, and you get the free-threaded version. But like, and also definitely encourage everybody test and publish that you've tested. In CI, you go ahead and test it because the CI tools support both.

Brian OkkenWhy do we care about this? Well, because some people are migrating to it because as with 3.14, it's no longer just an experimental thing. So here, I'm going to cover an article by Giovanni Barili. Sorry, Giovanni. I can pronounce that one.

Michael KennedyI'm pretty sure this is the same Giovanni that makes Granian.

Brian OkkenOh, okay. I think so. The future of Python web services looks gill-free. So it starts out with two major changes when comparing free-threaded variant of 3.14 versus 3.13. First, free-threaded support now reaches phase two, meaning it is no longer considered experimental. So everybody's on board with this is what we're going to at least try to do for a while. not just try to do but we're the python core team is supporting this and we're going to do it

Brian Okkenmoving forward what does that mean it means that people can depend on a free threaded version and change their code accordingly if necessary which is great especially for a lot of async stuff like web services so uh secondly the implementation is now completed meaning that the workarounds introduced in 3.13 make code sound without the gil are now gone, and free-threaded implementation now uses the adaptive interpreter as the gil-enabled variant. What does that mean? It means that the

Brian Okkenadditional optimizations... Oh, okay. Also, those facts plus additional optimizations make the performance penalty that we had in 313 way better or way less annoying so in 313 the free thread if you're doing non-async code just straight code you had to face a like a 35 time penalty which sucks um now it's like a five to ten percent difference and i think it's going to shrink even more but um so if you're if you don't need the free threaded don't use it unless or or use it whatever

Brian OkkenBut if it's time critical, don't right now. But I think it's going to get better. And especially if you are using async and stuff, it's way faster to use the free-threaded, of course. So this article does a shout-out to Miguel Grimberg's article about performance. I think we covered it last week. We did. You did. No, maybe I did. We did. I can't remember who started it. So this article has a whole bunch more benchmarks. And I'm not going to walk through all of them, but talks about doing a service with JSON responses and both measuring with WSGI and ASCII implementations.

Brian OkkenAnd yes, talking about using Gradient. So that makes sense. So I'm going to jump down. So there's a bunch of metrics, but basically the end result is if you're using ASCII or ASGI, the free-threaded one is obviously the way to go. And you don't get really much of a hit because of free-threaded implementation at all. You get speedups and memory usage is reasonable. So what I want people to do, if you're going to check this out, is to jump down to the final thoughts because there's some great stuff here.

Brian OkkenEssentially, so what do I want to pick out? On asynchronous protocols like ASGI, despite the fact that concurrency model doesn't change that much, it's a shift from one event loop per process to one event loop per thread. I think that's a big change, actually. Just the fact that we no longer need to scale memory allocations just to use more CPU is a massive improvement. That's cool. Didn't know that. That's neat. For everybody out there coding a web application in Python,

Brian Okkensimplifying the concurrency paradigms and the deployment process of such applications is a good thing, obviously. And the conclusion being, for me, the future of Python web services looks like the Guilfri. So if you're doing web services, try out the free-threaded version. At least one developer there is completely happy with what we have now.

Michael KennedyYeah, super nice. A bit of real-time follow-up. Yes, indeed. It is the same Giovanni. All right. Who creates a Granian. So with any of these web production app servers where you run your Python code when it's running, whether it's Django, Flask, whatever, there's a process that runs your code. Very often, the way that we've got them to work around the gill, like in the web, the GIL is a much smaller problem. It's still a problem, but it's less. Because what we do often is we create a web garden.

Michael KennedySo when you set up gran, you can say, and start four copies of yourself. So that, yes, they all have the gil, but we'll round robin requests between the fours. If you've got four cores, four CPUs, you basically can say, well, each one of these is dedicated to a CPU and it can kind of like match, right? Yeah, so we're running on good stuff. But the thing is, when you have this free threaded option, you can actually have true concurrency in your one worker. So instead of scaling out four copies, you could have just one and just say,

Michael Kennedylet that one take 10 concurrent requests or whatever it needs to take. - Yeah. - Right, so that's how the free thread gets better. And like, well, okay, why? What's like six, one, half dozen, the other? No, the memory becomes a problem when you create these little web gardens because if normally your server would use half a gig and you create four, well now it's two gigs and maybe that bumps you up in another tier and so on, right?

Brian Okken- Yeah, and if you need that memory for data, you don't have it, so.

Michael Kennedy- Yeah, so I think that's kind of one of the angles your writing concurrent code, but the foundations of your code running can do so more efficiently because they're no longer needing to work around processes, limitations like, well, we got to fan out these processes because of the kill. Okay, back to the regular scheduled programming, free threaded Python, let's keep going. So here's an interesting article from a snake wearing a very fast, it's a very fast snake with jet engines that is wearing a garbage collector. So what I

Michael Kennedywant to talk about is unlocking the performance in Python's free threaded future GC optimization. So garbage collection is not something that we frequently talk about a ton in Python. You know, it's just, we don't think a lot about GC. We don't think a lot about memory. I don't know why, like, as you know, Brian, in C, C++, people are like always about it, right? Like, oh my gosh, what size of point and what size of integer are we going to use for this, right? And like, it's just way more sort of in the forefront, but it's nice every now and then to peel back the

Michael Kennedyand get a look at what's going on here. So Neil Schemenauer wrote this article over here from QuantSight. They do a bunch of data science primarily. But here, check this out. This is news to me, actually, even though I'm still interested in these things. It says, first, the most important thing to know is that free-threaded Python uses a different garbage collector than the default Python, the gil-enabled. The gilded, I still want to call it the gilded Python. The gilded Python. So we have the default GC, which people probably understand pretty well.

Michael KennedyWhen you create a number, like a thousand, when you create a list, when you create an object from a class, all of those things have a data structure at the top of them that allows them to manage and track the memory. And people think of the GIL as being a threading thing. The GIL is really a protection mechanism for memory management in Python, right? It's basically protection against a race condition in the reference counting. So basically interacting with this structure that has seven things reference me

Michael Kennedyand I reference it, however, you know what I mean? Like that sort of deal. - Yeah. - And when the thing goes out of scope, it decrements that and that's where the GIL comes in to like make that decrement safe and so on. So that's the regular one, but we don't even have that structure anymore in the free threaded one. So what? So instead, when you allocate stuff, it goes into a special memory managed heap called memalloc, or managed by memalloc, right? And this allows the GC to loop over all these objects

Michael Kennedyand figure out which ones are junk and which ones aren't. A little bit like a mark and sweep garbage collector. So there's a couple of interesting things. One is that most of the mark and sweep garbage collectors and that type of thing, they have generations, like a generational one. So it has Gen 0s where most objects come, then it'll check that frequently and so on. That's also how the garbage collector that looks for cycles in the regular Python goes, right? But it doesn't work here because of unmanaged C extensions

Michael Kennedyand a bunch of stuff like that. So what it does is it can mark all the objects reachable from what it calls known roots. So instead of trying to scan the entire memory space, it says, well, what are globals? What are locals? what are like a you know it sort of follow those and it marks those as active and that can they can automatically be excluded from the search which is kind of like a generational optimization so pretty interesting but here's the takeaway we were talking about making things faster by using free threaded python with this one it's the free threaded gc collection is between two to 12 times faster

than the 3.13 version wow that's pretty yeah that's pretty wild right yeah yeah so depending on how

Michael Kennedyyour algorithms work, do you have a super pointer, pointer, heavy allocation, heavy type of algorithm, then, you know, we'll probably see a bigger benefit than if you allocate a few things and jam on those. So anyway, if you want to peel back the covers and see the GC, I didn't even know they were different, but apparently they're different. And presumably, maybe they could even have like multi-threaded GC stuff going on. That might be cool. Or background thread GC. I know those are a lot of different things that happen in some of these systems. These garbage-coach systems. Yeah. And finally, A little bit of real time, not quite real time, but real world follow up, I'll say.

Michael KennedySo for some reason, I can't remember what I was doing. Something I had to do, I had to go back, go through all the examples of my async programming course at Talk Python. So I went back in there and I said, all right, well, let me just make sure everything's running, update all the dependencies. I can't remember what it was. But anyway, something had to be updated. So I made sure all the dependencies got updated and pinned them to newer ones. And I'm like, well, there's a lot of changes here. Let me make sure they're all running. So go around and I ran every example from the course, probably 25 little apps.

Michael KennedyAnd many of them are like, well, here's a web app, or here's just a way to do multiprocessing, have a look at it. But a lot of them were like, let's actually do this with threads. And in this example with doing IO, you see it does make a difference. In this example doing computational stuff, no difference or slower because there's just overhead and it's still running one at a time, right? Well, I decided to type uv-python 3.14t run those examples and run them free threaded. The ones that used to have no benefit or a net negative are now like seven times faster.

Michael KennedyIt would go like synchronous one, 10.2 seconds. Async or threaded one rather, 10.25 seconds. And now just put the T on the end, three seconds. that's pretty cool that is pretty cool man so to me it's really down to what are the framework what are the packages and libraries that you're using if it's green across the board for free

Brian Okkenthreaded that's pretty interesting it opens up some real possibilities yeah also i i think i'll be looking forward to the i know i don't know if we have a deadline or timeline for this but when we can go back to having one version of Python and it's being the free-threaded one, it'll be, you know, maybe we can switch it to be the default is the free-threaded one. And for a couple of versions, there's the other one also. You got to say 3.14G. Yeah, or something like that.

Brian OkkenAnd I think that would be good because the default way we think about how to program and how to program quickly And the rules of thumb based on the GIL will be gone. So we'll teach people different. Yeah. So anyway. Yeah.

Michael KennedyAnd before we move on real quick, a follow-up to your topic from chart here. Also, if you're on a Kubernetes, if you're on Kubernetes, it makes setting reasonable CPU and memory requests more difficult to have to scale out like the WebGarden type stuff. Oh, okay. Yeah. So if you can just have one process like this is the one, I think it's easier. I believe that's what he was getting at.

Brian OkkenYeah. And also, I mean, from the C++ world, yes, processes and threads both can work. But thinking in threads is easier than thinking about multiprocesses.

Michael Kennedy100%. Because you have shared memory. It just is. You don't have to proxy stuff over and figure out how to sync it back up and copy it.

Brian OkkenTo queues and all sorts of...

Michael KennedyAnyway. Okay. I can't resist. I got to say, I got to put this out there in the world and see what you think. One thing right now, we have the gilded Python and we have the free threaded Python. And I can choose to run the free threaded one, as we've been talking about, if I want that. But what about this, Brian? This is what I want to put out in the world. I want, like right now, if I have a project and I've got some data and I need to process this in parallel on the gilded one, I need to maybe do multi-processing. So that's going to spin up five little baby Python processes all to go jam on that, right?

That's how you get around the GIL.

Michael KennedyWhat about this? what if you could pass a flag to multi-processing and it would start up free-threaded Python with threads instead of a bunch of different processes that can't coordinate on whatever algorithm that you just say run multi-processing, but this time do it in free-threaded Python as your little multi-process burst and then come back to me with the answer. That would be cool.

Brian Okken- Yeah, yeah.

Michael Kennedy- You're not convinced? I mean, you could that way,

Brian Okken'cause you weren't right. - I mean, your code has to be different though.

Michael Kennedy- Just that one function though.

Brian OkkenAnd you don't have to pay, you know what I mean?

Michael Kennedylike this one function that i'm going to call multi-processing on i'm going to write it assuming that it can be it will be an advantage to be threaded or it will be an advantage to be concurrent but the rest of my code i don't have to rewrite like it'd be a cool way to sort of bring kind of like scython lets you bring and say this one function if just this were way faster it would make all the difference you could do that but for free threading i would like to see that would be

Brian Okkeninteresting yeah yeah or just a chunk to say like yeah this um this subsystem is a through with

Michael KennedyWith free threading.

Brian OkkenAll right, go ahead. Okay, completely different tangent is we're going to go back in time by a couple of one or two episodes. We've been, the last few episodes or two or three talking about lazy imports because I thought they were coming in 315. They're proposed in 315, but they're not here. So, or they're not accepted yet. I haven't checked. I don't think that anything's changed. So last episode, I did talk about lazy imports that you can use today.

Brian OkkenResponding to that, Bob Bilderbos had a discussion on LinkedIn. And part of that discussion, we had Will McGugan hop in and said that he's excited about the PEP and that he has a lazy loading mechanism for textuals widgets, which totally makes sense. like widgets, you might just need a button, but you don't need all of the other widgets. Be cool if you could just load what you needed.

Brian OkkenAnd he's got that. So I checked it out. I was checking this out. And I think this is sort of a small topic, but I think it's cool. So the idea that I want to highlight is I presented last week a method for doing lazy loading now or lazy importing now on things that you depend on.

Michael KennedyBut what if you're like, you don't have to wait. You can be lazy today.

Brian OkkenBut what about like, yeah, exactly. What about if you're the package? If you have a big package that you have a bunch of stuff that people might want to import, making it so that you're not the problem, that your package is going to import really fast because behind the scenes, you're doing lazy importing for people. And that's essentially what Textual does. And the implementation is like really easy. So he's using a, basically, when you access anything, he's overriding the git adder function.

Brian OkkenSo if you access a widget, it's going to try to just grab it out of a dictionary. And of course, right away, it's going to fail. And then if it fails, he goes ahead and imports it and then stores it in. So the next time somebody tries to grab it, it's going to be there. And so there's a little bit of misdirection here. But in the end, you get lazy loading on every widget access.

Brian OkkenSo pretty cool. And so I thought, you know, this is pretty neat. I don't want it just to be hidden. It's not hidden. It's an open source project. So I went ahead and wrote all this up in a new post called Polite Lazy Imports for Python Package Maintainers. Very nice. link to that also but i just thought that the implementation is totally clever and um and maybe it's maybe for other package maintainers this is like well yeah that's the way you do it but um it was new to me i thought it was neat so there we go also want to shout out i didn't realize there

Brian Okkenwas both git adder git adder is used for uh for if it's not found for missing items but also there's another one called get attribute. And I did look up, I really appreciate that Trey Hunter had posted this every Dunder method article. So pretty cool. I totally have this bookmarked so that I'm like, if I want to understand the Dunder method in Python, I go here.

Michael KennedyYeah, very cool. I know it for classes, but for modules as well. Interesting.

Brian OkkenYeah, I don't think, and packages. So this is, you go ahead and throw it. Well, I guess, It is for modules, but if you put that in a dendronit file, then it's for your entire package. Yeah, exactly. It's pretty cool.

Michael KennedyI love it. Nice. All right. Is that all your extras? Oh, that's just... Your main thing. That's my main thing. What do you got for extras? I do have one extra.

Brian OkkenThe one extra, so one of the things I've been doing is I've been, you know, I paused Python people a long time ago, And I totally stopped doing testing code. I'm focused on this too and focused on work, but I'm also writing more. And one of the things I'm doing is writing a book on test driven development. And I don't have an announcement yet, but in the next couple of weeks, I think I might have an announcement. But if you'd like to know what, I guess what I'm going to do is I'm going to write it.

Brian OkkenI'm going to write the book, but to motivate me and to make people not have to wait. I'm doing it as a, like a, you know, like Manning does like the early access books and Pragmatic has beta books. I'm kind of doing that. I'm doing a lean, trying to do a lean startup applied to books. And I'm going to release it after I've got, I'm like, you know, do a rough first draft, clean it up a little bit and then release it for every chapter. And then as I go along, incorporate feedback from people.

Brian OkkenAnd then once the whole thing is good and polished, I might bring on an editor or something or maybe just release it. But if you'd like to know more about that, I'll announce it here. But also, if you'd like to know the minute it's available, join the newsletter over at Python Test, and I'll let you know.

Michael KennedyYeah, we really do appreciate when you join our newsletter. You might think, oh, we can just announce these things on social media or on the podcast, but it's not the same people. A lot of people miss it because they miss an episode, or social media is just a screaming feed of stuff. It really makes a difference. So join the newsletter.

Brian OkkenAlso, I want to talk about there's newsletters and then there's newsletters. So this isn't really – I don't do a weekly eight tips on testing. That would be cool. I just don't have time to do that. So it's mostly announcements if there's something to keep track of. But people like you and me and others, we're using things like – I'm using Kit, but there's others. I've used other email things before. I don't keep track of who's subscribed. So I'm not going to sell this to anybody or anything.

Brian OkkenIt's just an announcement thing. And you can unsubscribe anytime. And I don't even know. Like once you're unsubscribed, you're gone. I don't have the access to that. So there's people that abuse newsletters and people that I don't think there's a lot of people in the Python tech space that do, though. So it's not spammy. Anyway, moving on. Do you have any extras for us?

Michael KennedyI actually have a couple. Let's jump over and hear about it. Very exciting news. I am really happy with this new course that I created called Agentic AI Programming for Python Devs and Data Scientists. Cool. Yeah, and the idea is basically, so we have these agentic AI tools like Claude Code and Cursor and Juni and all of them, but how do you actually be successful with them, right? I've talked a few times about just insane productivity and really good outcomes that I've had,

Michael Kennedyand people are like, how are you doing that? So this course is like a real world set of guidelines and examples and best practices for working with agentic AI. So build, spend an hour building like a really detailed application. But we also, it also talks like almost for an hour about like guardrails and roadmaps and how do you get it to do exactly what you want. You're like, when I say build an app, don't just build the app, but build it with uv, write high test tests, format it with rough, with this Tommel.

You don't have to do any, you don't have to, but you know, like how do you get it to give

Michael Kennedyyou what you want? Not something in the vague general space of what you asked for. You know what I mean? So sort of a practical agentic AI programming course. So I really, I'm getting like crazy amounts of good feedback on this course. So people check it out. The link is in the, in the show notes. I think it's talkpython.fm dash slash agentic dash AI. So that one's fun. What else? I'm also going to be on talking with Hugo Bowen Anderson. He's running the Vanishing Gradients podcast.

Michael KennedyHe was on Talk Python a while ago, and now I'm going to be on his show, Data Science Meets Agentec AI. Sort of a follow-up from my Talk Python in production book, plus this course I just talked about. Those are those kind of ideas. We're going to spend some time riffing on that. So that's tomorrow night US time. So check that out. All right. Also, OpenAI introduced an AI browser wrapping Google Chrome called Atlas. This is interesting. I played with it. I'm not convinced yet. I mean, it's kind of fine.

Michael KennedyI don't know. I don't even know what to think about these things. That's not why I included it. Maybe it's sort of interesting as a side note. But I linked to the Ars Technica article. Holy smokes, you guys. Check out the comments. They are not loving it. And it's not OpenAI's fault exactly. It's just this idea of AI taking over everything is not. At least if there's not everyone hating on it, there's a very vocal group of people who don't love it. So, and I just noticed that Kyle Orland wrote this and he actually wrote a whole book on Minesweeper,

Michael Kennedywhich, you know, props to him for that.

Brian OkkenBut check out the- - Oh, that's awesome. I gotta check that out.

Michael Kennedy- I'm like, geez, it's been a long time to thought about Minesweeper. Anyway, this is actually just a really interesting cultural like touch point, I think. So people can check that out. All right, James Abel, one of the, I think he was behind Pi Bay this year, but yeah. In the San Francisco area said, Hey, we somehow we were talking about dunder name. If dunder name equals dunder main today, I have a package. It's real, real simple. But instead of writing this, if you want to like get people started, you can just import my thing and say, if is main as a simpler, saner way, it should, that maybe

Michael Kennedyshould be a built in, don't you think? Python. Yeah. Or what I would rather see is if isn't main, here's what I would like to see, but I don't know that Python has a mechanism for it. I would like to say at the top, something to the effect of register this function as me, and then when it's done parsing the file, then it runs it because even this, which is super helpful, it's still, if you accidentally put code below it, it's a problem, you know what I mean? I would like Python to enforce, like we'd load the whole file and then it runs

Michael Kennedylike a cool mechanism for that. But still, this is pretty nice. And at first I thought I was just like wrapping if name is main, right? But in fact, it's like doing some a little bit different here. It's using the inspect stack to go back and then look at the value. Because obviously, it itself is not main, so it can't do that test. So I don't know, kind of cute. Yeah. If you don't want to have a dependency on this library, you could take that line of code and put it somewhere as a utility class in yours.

Brian OkkenBut, okay, I'm just going to throw this out there. If you want to do something really fast, make sure you time this. Because every time I've added inspect, I love the inspect library. But whenever I add it, it slows things down. Okay. Just benchmark. Benchmark it. All right. Benchmark it.

Michael KennedyAll right. Inline. All right. If you're an IntelliJ person like PyCharm, wouldn't it be nice, Brian? Wouldn't it be incredible if while you're working, a little pet could walk around in the bottom? Anthony Shaw, I believe, is the one who added this to VS Code. Yeah. PyCharm people can love animals too. So you could install the pet into your PyCharm now. Oh, cool. Nice. I don't know that I'm going to be doing it. This is a last minute edition. I just got a brand new M5 iPad. How insane is that?

Michael KennedyI've had the last one I had, I got five years ago. I'm like, it's probably time. And I got a 13-inch iPad Pro, which is an insanely large iPad. But I started using it as the second monitor for my laptop. if I'm traveling or if I'm at a coffee shop or something. And that's a super cool experience. Just put them side by side. If they're on the same network or the cable, they just do real, real low latency, dual monitor stuff. And yeah, it's pretty neat.

Brian OkkenSo just a little shout out to that. That's incredible. It's like having a new laptop, a second laptop for the price of a second laptop.

Michael KennedyYes, it is. But here's the thing. Yes, I agree. But it's also a really nice reading device, which I do a lot of reading and stuff. And I was going to get one of the cheaper ones. One of the things that drives me, I have a MacBook Air as my main laptop computer and the same chip for my main computer. I don't have a high end computer and it's plenty good for Docker stuff or programming stuff, all these things. It's totally fine. But here's the thing. The iPad Air, while great, it's peak brightness is something like five or 600 nits.

Michael KennedyAnd if you're working, like I like to work in my back outside area in the summer, like that's kind of not relevant right now. But in general, you know, sit outside, enjoy the weather, get out of the office. And if it's at all bright through a window or somewhere, it's like really a pain. This thing is like the best screen you can buy on a Mac, period, whatever. And it's a thousand nits. So you could push the computer to the side and just put the laptop in front of you and type on it. It's really nice. Anyway, that's the main reason. I want a brighter screen without having a MacBook Pro.

Brian OkkenI feel so bad for you having to deal with like working outside in such bright light.

Michael KennedyIt's really horrible. I know. You should really. It's hard. It's hard doing me.

Brian OkkenAll right.

Michael KennedyCarrying on with the jokes. No, go ahead.

Brian OkkenWell, before we get to the joke, I wanted to, I guess, highlight, going back to my announcement of possibly a book. Japanol7 says, a TDD book by Brian. Can't wait. Also, Talk Python training courses are great. Kudos. Yeah. I'm awesome. Yeah. I'm looking forward to getting that book out, and I'm looking forward to that AI course of yours.

Michael KennedyYeah, same.

Brian OkkenAll right.

Michael KennedyI'm not looking forward to surgery, I'll tell you what. And it's getting to be weird, Brian. I mean, like doctors using AI and stuff. Actually, we probably are going to get better diagnoses as for certain things. Oh, dear. But here's a surgeon situation. There's a person who just, they're in post-op, okay? They're laying there like, oh, man, a little woozy from the anesthesia coming out of it. And the doctor, which is a robot with a ChatGPT-like, I don't think it's, is it the same? know something an ai logo for a robot face and the patient says but why is the scar on the left

Michael Kennedyif the appendix is on the right the ai surgeon says you're absolutely right let me try that one more time please don't try it one more time it's so bad it's pretty bad it's pretty funny that

Brian Okkenactually drives me nuts when when i'm like this doesn't sound right is this you know

Michael KennedyThe user is pointing out I've made a mistake.

Brian OkkenOh, you're right. Yeah. Oh, well. Yeah.

Michael KennedySo, yeah, just get a second opinion. So if opening is going to operate on you, have Anthropic be the backup, I guess, is the moral of the story. I don't know.

Brian OkkenI don't think that's the moral of the story.

Michael KennedyYou don't think so? Okay.

Brian OkkenMaybe somebody trained in medicine.

Michael KennedyTrained on medicine? I'm sure they are.

Brian OkkenTrained with heavy medication.

Michael KennedyYeah, exactly.

Brian OkkenAll right, cool.

Michael KennedyWell, fun as always.

Brian OkkenWell, definitely fun as always. And we'll see everybody next week.

Open the transcript file

Hosts and Guests

Nobody is credited on this episode yet.

Credit the people on this episode

Be the first to rate this episode

More episodes

All episodes
  1. #505 Introducing diskcache-oxide

    Nov 17, 202640 minAudio

    Topics covered in this episode: tinyjobs: a SQLite job queue goes free-threaded funkycache: cache Python functions in SQLite Ghostman - a keyboard-driven terminal API client diskcache-oxide: A shared, durable disk cache...

    Credit the people on this episode

  2. #504 Who turned the GIL back on?

    Nov 10, 202630 minAudio

    Topics covered in this episode: PyPI's redesigned project pages now warn when provenance changes gilguard catches the import that turns the GIL back on pip 26.3: pylock extras, and pip says plainly that untrusted wheels...

    Credit the people on this episode

  3. #503 It’s not 85% HTML

    Nov 3, 202630 minAudio

    Topics covered in this episode: Your GitHub language bar is lying (how to fix it) Python Typing Survey 2026: developers mix type checkers, and AI is writing the hints Flask Vibe - Build Apps You Can Understand Python on...

    Credit the people on this episode

  4. #502 Introducing chameleon-rs

    Oct 27, 202634 minAudio

    Topics covered in this episode: PHP wasn’t the only problem last week chameleon-rs Bringing uv and ty together Stlite runs Streamlit apps entirely in the browser Extras Joke Watch on YouTube About the show Connect with...

    Credit the people on this episode

  5. #501 A Nod to Sir-Mix-Alot

    Oct 20, 202638 minAudio

    Topics covered in this episode: Nod: pause your Python program and open a notebook at any line Polars 2.0 ships: streaming engine by default, spill-to-disk, and a row-order gotcha django-cachalot caches your ORM queries...

    Credit the people on this episode