Michael Kennedy: Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds. This is episode 452, recorded October 9th. I'm Michael Kennedy. And I'm Brian Okken. And this episode is brought to you by DigitalOcean. I love DigitalOcean. Brian and I both use DigitalOcean. I was literally just working with them a few minutes ago. How about that? So check them out at pythonbytes.fm/digitalocean-gen-ai. The link is right at the top of the show notes and then use most importantly however you sign up use the code do4bytes all caps the number four and you'll get up to 200 of free credit you get 200 for credit if you are not already an existing customer and that is pretty awesome so free money to go do cloud things always great connect with us on the socials links here in the show notes and if you want to be part of the live episode pythonbytes.fm/live shows you if we're live streaming you can jump right to it If not, well, then it takes you to old, old episodes.
Michael Kennedy: And once you're over on YouTube, do us a favor, subscribe there and press the bell to get notified.
Michael Kennedy: That's the way when we do go live at the wrong time because things kept happening.
Michael Kennedy: I have a bit of a story for that.
Michael Kennedy: You'll get notified that we're going live.
Michael Kennedy: You can check it out.
Michael Kennedy: Usually that's Mondays at 10 a.m. Pacific time.
Michael Kennedy: And sign up to our newsletter.
Michael Kennedy: Brian puts that together every week and sends it out.
Michael Kennedy: And it's got more than just a rehashing of the show notes.
Michael Kennedy: It's got a bunch of extra info.
Michael Kennedy: So that's, that's always fun.
Michael Kennedy: Brian, one of the reasons, there are many reasons that we are on an alternate schedule this week.
Michael Kennedy: I had a very, very dark time fall upon House Kennedy.
Michael Kennedy: There were people, I live where there are tons of tall trees.
Michael Kennedy: In Oregon, there are tall trees, but I live especially where there are many tall trees, like right along the street.
Michael Kennedy: And so that we don't get the power taken out by these trees.
Michael Kennedy: In the winter, the power company goes along and trims back the trees.
Michael Kennedy: Well, the geniuses at the top of that thing cut through the fiber optic cable that provided power to my house.
Michael Kennedy: and I have one bar of LTE level of cell coverage at my house.
Michael Kennedy: So when that happened Sunday night or Sunday afternoon, and then we're supposed to record Monday morning, it was like, mm-mm.
Brian Okken: That ain't happening.
Michael Kennedy: It ain't happening.
Michael Kennedy: So sorry, folks.
Michael Kennedy: That's a part of the reason why we're a little bit off schedule.
Michael Kennedy: But light has shone upon us again.
Michael Kennedy: The fiber is flowing.
Brian Okken: And then, of course, we were going to do noon today, and then I had a contractor that was supposed to be here at 3,
Michael Kennedy: showed up at quarter to noon so we had to push back there it is there it is well what do you got to push down to everyone listen well i'm excited because one of the things we get to talk
Brian Okken: about that we wouldn't have been able to talk about if we were recording on monday was is that two days ago on tuesday python 3.14 got released and i wish i had some party poppers or something to pop up because i'm like totally stoked about this um i know so um i don't know if other people are but there's some really cool stuff in 3.14 or three the pi by release by yeah I don't know um uh 3.1 are they gonna do like for the bug fix releases instead of going like 3.4.0 this 3.14.0 right now and then it'll go dot one dot two but I think it should go dot one and then one five and
Michael Kennedy: then one five nine yes that'd be fun yes come on let's do it it's still and it's still incrementing Let's do it.
Brian Okken: It's still, yeah, bigger.
Brian Okken: Anyway.
Michael Kennedy: And look, they were guaranteed to not run out.
Michael Kennedy: It's an irrational number that goes on forever.
Michael Kennedy: It's going to be fine.
Brian Okken: Yeah, I think it would break some people to have like a really long version.
Brian Okken: But I'm cutting into our logo.
Brian Okken: OK, so we're linking.
Brian Okken: I'm going to link to what's new in the release.
Brian Okken: And there is a ton of stuff in here.
Brian Okken: So please check it out.
Brian Okken: I think there's some great stuff.
Brian Okken: I wanted to highlight a handful of things that I'm pretty excited about.
Brian Okken: Template string literals, and I have to admit, I still don't quite get it.
Brian Okken: I'm going to have to do a project that actually uses template string literals, the new template strings.
Brian Okken: The prefix T instead of F, so t-strings.
Brian Okken: Are we calling them t-strings?
Brian Okken: I don't know.
Michael Kennedy: Yes, we are calling them t-strings.
Michael Kennedy: I had Paul Everett and some other folks, who I'm sorry, I'm forgetting, on Talk Python last year to talk about it when it was proposed.
Michael Kennedy: Yeah, t-strings.
Brian Okken: Okay.
Brian Okken: I should, I guess, just go back and listen to that episode.
Brian Okken: Anyway, excited to try this.
Brian Okken: And I think I am excited to see what people build on top of this as well.
Brian Okken: Possibly we can have some cool stuff built on top of two strings.
Brian Okken: What else?
Brian Okken: This is pretty cool, actually.
Brian Okken: Seems kind of minor, but PEP758 is allow, accept, and accept star expressions without brackets.
Brian Okken: So what's the deal here?
Brian Okken: Well, if you had multiple exceptions that you were catching, like in the example, they have timeout error and connection refused error.
Brian Okken: Those had to be in brackets, but now they can just be just like there.
Brian Okken: They're just, you don't have to have brackets.
Brian Okken: It's a minor thing, but it saves typing.
Brian Okken: I love it.
Brian Okken: Okay.
Brian Okken: Improved error messages, always better.
Brian Okken: Like if you typed while with two L's or something, more highlighting of where you have a syntax error.
Brian Okken: Perfect.
Brian Okken: More better tracebacks are always helpful.
Brian Okken: What else?
Brian Okken: So one of the things that came in is some, oh, default interactive shell.
Brian Okken: So the default, there's a couple of improvements to the shell.
Brian Okken: So when you just, the rebel, when you type like Python or Python-I or whatever, the interactive thing, it's in color now.
Brian Okken: And one of the things is it's in color and also it does syntax highlighting.
Brian Okken: So that's pretty cool.
Brian Okken: I thought I had a screenshot.
Brian Okken: Yeah, so fun to have colors in the REPL.
Brian Okken: I know there were other non-standard REPLs that did this, so I'm glad that the standard was.
Brian Okken: Yeah, that's great.
Brian Okken: What else we got?
Brian Okken: I thought I had a couple other things.
Brian Okken: Default and directive shell.
Brian Okken: In improved modules, I'm actually pretty excited about the arg parse stuff.
Brian Okken: The arg parse, if you're writing a command line interface tool, like a CLI tool that takes arguments.
Brian Okken: You can use click or typer, but the built-in one is arg parse, which I've been using more and more for small projects.
Michael Kennedy: So have I.
Michael Kennedy: If it doesn't have a dependency, but you wanted to take arguments, just use arg parse.
Brian Okken: Yeah.
Brian Okken: So then a couple of things, if name equals main or not.
Brian Okken: So if you say Python-M and then your module, your project, that didn't quite work right before or it was like, I don't know.
Brian Okken: I didn't try it with arg parse, but apparently that's better now.
Brian Okken: So that's cool.
Brian Okken: The other thing that I'm pretty excited about is this suggest on error.
Brian Okken: So this is a thing where you basically, if you type in a, it's not on by default, but if you turn it on and you pass an argument to your command line interface thing and you mistype it, it can say that isn't here, but did you mean?
Brian Okken: And I love that sort of a feature.
Brian Okken: So that's pretty cool.
Brian Okken: And then colored help text.
Brian Okken: That's pretty neat.
Brian Okken: And what do I have?
Brian Okken: Oh, last thing I thought was just fun.
Brian Okken: This is a whole bunch of stuff.
Brian Okken: Check it out.
Brian Okken: But the date, the calendar.
Brian Okken: Do you ever use this?
Brian Okken: I occasionally use the calendar module.
Michael Kennedy: I've never used the calendar.
Michael Kennedy: I know what it does, but I've never used it.
Brian Okken: Okay, so if you do Python-M calendar, and then it has some flags and stuff you can use too.
Brian Okken: It just prints out of the calendar.
Brian Okken: But now with this release, it highlights the current date.
Brian Okken: So you can say like calendar 2025 10 for October of 2025.
Brian Okken: And it highlights that it's the ninth today.
Brian Okken: And if you do the, if you just do the whole year, it'll show you the whole year and it does the ninth.
Brian Okken: So this is pretty handy if you just have a ripple around to, if you're like, when is the, if somebody says, hey, can you meet on the 15th?
Brian Okken: When is the 15th?
Brian Okken: Is it Tuesday?
Brian Okken: Whatever.
Brian Okken: You can pull this up.
Brian Okken: Yeah, that's pretty cool.
Brian Okken: Lots of great stuff.
Brian Okken: Check out the what's new and upgrade.
Brian Okken: As an aside, I wasn't going to get ready for today, but I didn't get a chance because of all the contractor stuff.
Brian Okken: I'm going to get up.
Brian Okken: Probably by the time you listen to this, I'll have an article up on Python test for all the changes you need to make sure you make to test your project for 3.14.
Brian Okken: It's the normal stuff, but I figured I'd just write it down and I'll do a post about that too.
Michael Kennedy: Awesome. Yeah, looking forward to it.
Michael Kennedy: I have a few follow-ups, a few rough edges.
Brian Okken: Okay.
Michael Kennedy: I have one smooth, nice edge, and then a couple rough edges.
Michael Kennedy: So the smooth edge is that Charlie Marsh announced that uv and rough both shipped Python 3.14 support the day 3.14 came out, which is pretty cool.
Michael Kennedy: So if you uv, V, E, and V, and you don't have anything installed, or if you specify 3.14, you'll get the 3.14.0 release, which is awesome.
Michael Kennedy: But remember that you have to actually update the uv binary.
Michael Kennedy: It doesn't look at a web service or something.
Michael Kennedy: So if you've got an old uv that's not 0.9, it doesn't know about the new one.
Brian Okken: So uv self-update.
Michael Kennedy: Yes.
Brian Okken: If you have it globally installed.
Michael Kennedy: Which is how I do it.
Michael Kennedy: Indeed.
Michael Kennedy: Okay, so that's the smooth edge.
Michael Kennedy: The rough edge is for Python bytes, I use uv loop for the asyncio operations on Python bytes.fm.
Michael Kennedy: Well, I thought, ah, what the heck?
Michael Kennedy: Let me just swap out the virtual environment locally and see what happens today.
Michael Kennedy: You know, just try it out.
Michael Kennedy: Why not?
Michael Kennedy: I'll be able to say we're using 3.14.
Michael Kennedy: I'll just roll it out.
Michael Kennedy: And then guess what?
Michael Kennedy: It didn't like it.
Michael Kennedy: It crashed and it literally wouldn't load the website because apparently uv does not support 3.14.
Michael Kennedy: UV loop rather.
Brian Okken: Sorry, not uv, uv loop.
Michael Kennedy: There are different things.
Michael Kennedy: So uv loop is a way to speed up the asyncio event loop for async and await.
Michael Kennedy: And it's been fine for a long time.
Michael Kennedy: It was updated like three weeks ago, but it's not updated for this.
Michael Kennedy: So I just took it out and said, you know what, we're just going to fall back.
Michael Kennedy: Python's got a lot faster since I added that way, way back when.
Michael Kennedy: And so just run on the standard old asyncio event loop.
Brian Okken: Well, it's a good thing you checked.
Brian Okken: But everybody that's got a project out there that other people are depending on, most of the Python versions that we roll to, there's no problems.
Brian Okken: But occasionally, something you're doing might be an issue.
Brian Okken: So please test and roll out new versions.
Michael Kennedy: I have another sharp edge for you.
Michael Kennedy: I have no idea if this is true in VS Code, though it may be.
Michael Kennedy: But honestly, I haven't tried it.
Michael Kennedy: I don't know.
Michael Kennedy: But in cursor, I can tell you that you cannot debug something in Python 3.14.
Michael Kennedy: You hit run, it says, cannot find underscore underscore handle crash or something along those lines, at least the projects that I tried.
Michael Kennedy: So a few people got some updating to do.
Brian Okken: Brian, here's the thing, though.
Michael Kennedy: Wasn't this stuff available for like six months?
Brian Okken: Yeah, it's been available.
Michael Kennedy: I mean, I'll give the uv loop guys a pass, right?
Michael Kennedy: Like that's not a main thing they're working on and like whatever.
Michael Kennedy: Maybe it needs testing.
Michael Kennedy: But I mean, a product such like Cursor that's got so, they update that thing like daily.
Michael Kennedy: There should probably have been somebody that tested that.
Brian Okken: Also, before we move on, one of the things that I think projects should do, it's questionable whether you should bump your version, right?
Brian Okken: So if you've got a project that other people are depending on and it just runs fine, you run it locally, you test it on 3.14 and it works fine.
Brian Okken: Maybe you even turn on testing in CI at 3.14.
Brian Okken: but you didn't have to make any changes should you do another version.
Brian Okken: And I think at least even a minor version bump so that you can add the Trove classifier to say this one runs on the new version.
Brian Okken: I think it's worth it.
Brian Okken: It's also, I look, other people look, and if a project hasn't had a release in a few years or a couple of years, I don't know that anybody's looking at it.
Brian Okken: - Yeah, it might be dead.
Brian Okken: - So I think once a year when we roll out new versions, that might be a time to bump your version just to let people know it's still alive and it's fine.
Michael Kennedy: - Yeah, I agree with that.
Michael Kennedy: That sounds cool.
Michael Kennedy: All right, let's go back and talk about, checking your libraries for versions that work.
Michael Kennedy: So I bring you, zoom out a little so it looks a little better, the Python compatibility checker for free threaded Python.
Brian Okken: - Okay.
Michael Kennedy: - Okay, so this is a heat map of, over over it, where do I get it like that?
Michael Kennedy: It doesn't do anything, you can click it.
Michael Kennedy: But it's a heat map of the most popular libraries, If I scroll down here somewhere, you can see it's got the most installed ones.
Michael Kennedy: So Boto3, Care Set Normalizer, URL3, requests, BotoCore, et cetera.
Michael Kennedy: And most importantly, it tells you, is that thing thread safe in the sense that can I use it with Python T instead of Python, right?
Michael Kennedy: The free threaded version of Python.
Michael Kennedy: I don't know.
Michael Kennedy: It's more blue than red, but there's still a lot of red out there.
Brian Okken: Yeah.
Michael Kennedy: There's failed.
Michael Kennedy: There's no data.
Michael Kennedy: So I put this out there as a way for if you're involved in the top 1000 packages, maybe give this a look, see what they're testing, give Python 313, 314T a test, like work into your test mix.
Michael Kennedy: And if you don't want to support it, fine, be like, just be explicit about it.
Michael Kennedy: But if there's just a super minor little threading issue or some condition or
Brian Okken: whatever, you know, it'd be cool if it was supported.
Michael Kennedy: Like that's, that's the primary reason that the two to three thing was so rough.
Michael Kennedy: It was like, not that we all couldn't decide to start writing Python 3 style code.
Michael Kennedy: It was like, well, the library I need to do this depends on a library that doesn't work in 3.
Michael Kennedy: And we've got a similar story for free threading here, although I suspect it's less.
Michael Kennedy: Anyway, I present to you ft-checker.com.
Michael Kennedy: And you can see if the things that you care about support free threaded Python.
Brian Okken: Tina, is there, how many things are they checking?
Brian Okken: Oh, 500 things, top 500.
Michael Kennedy: Well, I think I can scroll in and let me look.
Michael Kennedy: I think it's the top 1,000 or almost.
Michael Kennedy: Almost like top 987.
Michael Kennedy: Maybe they couldn't get information about some of them.
Michael Kennedy: Top thousand.
Michael Kennedy: What else is cool?
Michael Kennedy: Our sponsor.
Brian Okken: Yes.
Brian Okken: Thank you so much to DigitalOcean.
Brian Okken: This episode of Python Bytes is brought to you by DigitalOcean.
Brian Okken: DigitalOcean is a comprehensive cloud infrastructure that's simple to spin up, even for the most complex workloads.
Brian Okken: And it's a way better value than most cloud providers.
Brian Okken: At DigitalOcean, companies can save up to 30% off their cloud bill.
Brian Okken: DigitalOcean boasts 99.99% uptime, SLAs, and industry-leading pricing on bandwidth.
Brian Okken: It's built to be the cloud backbone of businesses small and large.
Brian Okken: And with GPU-powered virtual machines plus storage, databases, and network capabilities all in one platform, AI developers can confidently create apps using what their users love.
Brian Okken: Devs have access to the complete set of infrastructure tools they need for both training and inference so they can build anything they dream up. DigitalOcean provides full-service cloud infrastructure that's simple to use, reliable no matter the use case, scalable for any size business, and affordable at any budget. VMs start at just $4 a month and GPUs for under a dollar per hour.
Brian Okken: Easy to spin up infrastructure built to simplify even the most intense business demands. That's DigitalOcean. And if you use D-O-4-bytes, that's D-O, the number four, and B-Y-T-E-S, you can get $200 in free credit to get started. Take a breath. DigitalOcean is the cloud that's got you covered. Please use our link when checking out their offer. You'll find it in the podcast player show notes. It's a clickable chapter URL as you're hearing this segment, and it's at the top of the episode page at pythonbytes.fm. Thank you to DigitalOcean for supporting Python Bytes and for having an awesome service.
Brian Okken: Absolutely.
Brian Okken: Yeah, they do really good stuff.
Brian Okken: I just recently moved a bunch of stuff to, what do they call it?
Brian Okken: DigitalOcean Spaces to save some, store some things.
Michael Kennedy: I was working at DigitalOcean Spaces 30 minutes before we started.
Michael Kennedy: Like I said, very cool.
Michael Kennedy: Good stuff.
Michael Kennedy: So was I using AI?
Michael Kennedy: Was I not, Brian?
Michael Kennedy: That's the question.
Michael Kennedy: There's a big new model out there.
Michael Kennedy: So I want to give a shout out to Claude Sonnet 4.5.
Michael Kennedy: I think this is worth checking out.
Michael Kennedy: if you're using something that lets you choose a model there are many of them now as we'll see using sonnet 4.5 is quite good so have you been playing with this yet it only came out like a couple days ago or maybe a week ago it came out basically the day we recorded last now i have not had a chance to play with it so faster than the older clods a little bit better i say it's even better than the opus one which was like setting money on fire if you tried to use that thing it It was like 100 times more expensive or something.
Michael Kennedy: It was out of control.
Michael Kennedy: So let's see.
Michael Kennedy: I took a few notes of some of the things that I thought were kind of noteworthy of it.
Michael Kennedy: So apparently it ranks as the top programming model, which is pretty cool.
Michael Kennedy: And we live in such weird times.
Michael Kennedy: Our programming tool has reduced concerning behaviors like sycophancy, deception, power seeking, and a tendency to encourage delusional thinking.
Michael Kennedy: Hey, I guess it's good if your programming tool doesn't do that.
Michael Kennedy: Isn't that right?
Michael Kennedy: I mean, would you want your programming tool to be sycophant?
Michael Kennedy: No.
Michael Kennedy: Come on, not really.
Michael Kennedy: A little sycophant is good, but not too much.
Brian Okken: Michael, if you don't want it to be, then that's a good thing.
Michael Kennedy: That's right.
Michael Kennedy: You're absolutely right.
Michael Kennedy: I didn't think of that.
Michael Kennedy: Good job.
Michael Kennedy: Gosh, I was confused.
Michael Kennedy: I've been a bad bot.
Michael Kennedy: They've also, as part of this, released the Cloud Agent SDK, which is what they use to build Claude Code.
Michael Kennedy: So that's pretty cool.
Michael Kennedy: If you want to bring that into your own platform and do it.
Michael Kennedy: And speaking of which, JetBrains, their AI platform now allows you to use Sonic 4.5 as well, built right into PyCharm.
Brian Okken: That's pretty sweet.
Michael Kennedy: And of course, Klein.bot supports it because that one lets you just put in your key and you get your thing.
Michael Kennedy: That plugs into both PyCharm and VS Code and Cursor and all the things.
Michael Kennedy: On cursor, you can pick it.
Michael Kennedy: And cloud code, obviously, you can pick it because it's from them.
Michael Kennedy: Here you can even see at the top.
Michael Kennedy: New cloud sign at 4.5 is live and client.
Michael Kennedy: So anyway, I encourage people to check it out.
Michael Kennedy: I've been doing some significant work with it.
Michael Kennedy: I actually did two PRs to Python by set FM.
Michael Kennedy: One is like 4,300 lines.
Michael Kennedy: One is 3,000 lines just in the last day.
Michael Kennedy: And they came out incredibly.
Michael Kennedy: I haven't had time to show you, Brian, but after this, I can show you and see what you think.
Michael Kennedy: It's pretty neat.
Michael Kennedy: Did the first one change all the quotes to double quotes
Brian Okken: I'm going to change all the double quotes to single quotes.
Michael Kennedy: That's a good question.
Michael Kennedy: No, I actually, I have a bunch of rules that tell it it has to run ruff format and rough check before and after it does everything.
Michael Kennedy: So it's like, it's always sort of staying in sync with the way that I want.
Michael Kennedy: It won't cycle back and forth like that.
Brian Okken: Yeah.
Brian Okken: I'm curious about what was it?
Brian Okken: The, Hacktober.
Brian Okken: is it,
Michael Kennedy: Oh yeah.
Michael Kennedy: That's going to be different, isn't it?
Brian Okken: Yeah.
Brian Okken: With all the tools.
Michael Kennedy: Although to be fair, I don't know if it's going to be better or worse because I know some of those Hacktoberfests, I would get the dumbest things like, oh, if you submit a PR to an open source project, guess what?
Michael Kennedy: You get a star.
Michael Kennedy: And I would get this like, I'm correcting this bit of grammar in your readme.
Michael Kennedy: Like, I'm not even sure that's the correct grammar.
Michael Kennedy: And no, I'm not taking a PR that you put like a semicolon or instead of a colon here because you want a Hacktoberfest thing.
Michael Kennedy: Get away from me, people.
Brian Okken: Yeah.
Brian Okken: Well, and I kind of am jealous about some of the popularity of projects.
Brian Okken: A lot of the projects I work on are not that popular, which is fine.
Brian Okken: But also in October, I'm not that upset about it because I just ever heard from, for example, David Lord already said that he's gotten a bunch of stuff.
Michael Kennedy: Yeah.
Brian Okken: Anyway.
Michael Kennedy: Before we move on from this, a follow-up on the 3.14 thing from Jared says, I'm really looking forward to Python 3.14's REPL letting you tab complete import statements.
Brian Okken: Oh my gosh, please.
Brian Okken: I didn't notice that.
Brian Okken: That's great.
Brian Okken: Let it happen.
Michael Kennedy: I'm so tired of like, I hit up arrow and it like goes line by line through a loop or there's no autocomplete or I'll type part of a thing and come back and it's like, no, you didn't type anything.
Michael Kennedy: We're just going to cycle through what you did.
Michael Kennedy: Like, no.
Michael Kennedy: So all those improvements are very welcome.
Brian Okken: Yeah.
Michael Kennedy: Indeed.
Brian Okken: Cool.
Brian Okken: Well, as grateful as I am for Python 3.14, I'm looking forward to 3.15.
Michael Kennedy: Ryan, don't be lazy.
Michael Kennedy: Work with the stuff that you got.
Michael Kennedy: Come on.
Brian Okken: Okay.
Brian Okken: Well, in Python 3.15, one of the things that's coming is explicit lazy imports.
Brian Okken: And boy, this is an inside baseball kind of thing.
Brian Okken: But that's what this podcast is all about, isn't it?
Michael Kennedy: I'm here for it.
Michael Kennedy: I am so here for this idea.
Brian Okken: I am too.
Brian Okken: PEP 8.10, explicit lazy imports.
Brian Okken: So the idea is actually, it's just common.
Brian Okken: We put imports at the top of the file, right?
Brian Okken: But if you do that, then everything that imports it imports all your imports also.
Brian Okken: And you don't actually have to do that.
Brian Okken: You can put, anyway, we'll get back that.
Brian Okken: You can put them in a function or something and they'll get imported for the entire module the first time they're used.
Brian Okken: That's the way we do lazy imports now.
Brian Okken: In the future, it'll do that automatically if you just throw a lazy in front of it.
Brian Okken: So it'll work with lazy import.
Brian Okken: You can say lazy import JSON, and JSON won't get imported until the first time.
Brian Okken: Or you can do lazy import JSON from, or lazy from JSON import dumps or something.
Brian Okken: You can do the from thing as well.
Brian Okken: So either way, it won't load it until it's needed.
Brian Okken: And this is a minor little syntax thing that's going to save a lot.
Brian Okken: I love this.
Brian Okken: So do you have any thoughts on this?
Michael Kennedy: I am here for it.
Michael Kennedy: So it drives me crazy that just because I want to allow my code to use a library, it has to process all of that all the time.
Michael Kennedy: And if there's some kind of weird edge case, like it depends upon some configuration, but the configuration environment variable is not set, it'll crash during import.
Michael Kennedy: Like there's all these weird cases.
Michael Kennedy: And I talked a little while ago about, I think I said, Michael learns a lesson, right?
Michael Kennedy: I had something that was a little utility built inside of Talk Python's code base or the course's code base or whatever.
Michael Kennedy: And I'm like, oh, I'll just reuse these few little utility things.
Michael Kennedy: And because of that, just the import statements to load up all of that code made it take several seconds to start.
Michael Kennedy: I put it in its own file and copied a few utilities over and it took like 100 mil.
Michael Kennedy: It was like 10 times faster.
Michael Kennedy: And it's exactly because of this.
Michael Kennedy: It didn't use any of that stuff or hardly any of that stuff.
Brian Okken: It just pulled it in because it's got to get the library
Michael Kennedy: from a sub package.
Michael Kennedy: So off it goes, you know what I mean?
Brian Okken: Yeah, where I get hit a lot is, And actually, we have a side.
Brian Okken: Maybe I jumped the gun on this from Hugo.
Brian Okken: Lazy Imports.
Brian Okken: I forgot.
Brian Okken: This is a draft.
Brian Okken: It's not approved yet.
Brian Okken: It's a draft.
Brian Okken: So maybe it comes in at 315.
Michael Kennedy: Right-click and say Inspect Element, and then you can just edit the status.
Michael Kennedy: It'll be fine.
Brian Okken: It's a wiki, right?
Brian Okken: I can just change it?
Brian Okken: That's for you.
Brian Okken: So PEP 810 is still in draft and under discussion.
Brian Okken: It's not submitted to the steering council yet.
Brian Okken: So thanks, Hugo.
Brian Okken: But I guess here's my vote.
Brian Okken: I hope it gets in.
Brian Okken: Yeah.
Brian Okken: And I hope this is in as well.
Brian Okken: Thanks, you guys.
Brian Okken: One of the, but another article I should probably write is how to do this with testing, because I do this with testing a lot.
Brian Okken: I'll throw, it's common to have a test module that like has to import quite a few things to test things or report things or draw a graph or all sorts of stuff you can do.
Brian Okken: But what pytest does is it imports all of your test code before it starts running.
Brian Okken: And even if you want to, so if you're going to just run one test file, like one test within your file, it'll do all the imports.
Brian Okken: So it is nice to separate your heavy imports.
Brian Okken: And there's ways to measure to figure out which ones your heavy imports are and move those into a lazy method or lazy import.
Michael Kennedy: But anyway, hopefully it'll come in.
Michael Kennedy: I hope so too.
Michael Kennedy: I'm here for this idea.
Michael Kennedy: By the way, I also see you, Dino Veland and Brittany Reynoso and some of the folks from the Cinder team at Meta.
Michael Kennedy: I think some of these ideas originally came out from Cinder.
Michael Kennedy: I don't know 100% for sure,
Brian Okken: but that'd be pretty cool to see some of that work coming over, right?
Michael Kennedy: That's where Free Threaded Python came from as well.
Michael Kennedy: Yeah.
Michael Kennedy: All right.
Michael Kennedy: From Sam Gross.
Michael Kennedy: Awesome.
Michael Kennedy: Okay.
Michael Kennedy: That's it for all of our stuff.
Brian Okken: How are you feeling?
Michael Kennedy: Are we done?
Brian Okken: I'm done.
Michael Kennedy: Okay.
Brian Okken: Well, I have extras though.
Michael Kennedy: Yeah, why don't you go first?
Brian Okken: Okay.
Brian Okken: This was sent in to us from Patrick of the band Friends in Real Life.
Brian Okken: He just said that, and I don't know how to do the fancy thing where you'll have to listen to the song.
Brian Okken: They made a music video.
Brian Okken: I'll just play it.
Brian Okken: They made a music video.
Brian Okken: It prints out while the music's going on.
Brian Okken: It prints all the stuff.
Brian Okken: And it's really fun near the end.
Brian Okken: It starts going fast.
Brian Okken: And I love the end.
Brian Okken: I'm just going to fast forward to the end part because it's like super fun.
Brian Okken: It just starts taking off.
Brian Okken: We'll click ahead.
Brian Okken: Yeah, just starts flying.
Brian Okken: It's so fun.
Brian Okken: Anyway, he said he wrote it with Python and there's the code that he wrote.
Brian Okken: And there's even test code, which is kind of cool.
Brian Okken: And it'd be fun to do it.
Brian Okken: I'll do a PR against something that's already done.
Brian Okken: Anyway, it's just a fun extra thing, right?
Brian Okken: Making a music video with Python.
Brian Okken: Love it.
Michael Kennedy: Yeah, and it's built with rich and stuff.
Michael Kennedy: It's a good song.
Michael Kennedy: I enjoy it.
Michael Kennedy: Got a little movable typography, kinematic text or whatever.
Michael Kennedy: Yeah, it's very fun.
Brian Okken: The other thing I wanted to, just a short one.
Brian Okken: I was trying to write this article about testing.
Brian Okken: Testing is 3.14.
Brian Okken: And I went through a project and I realized that I needed to change one of my, I needed to get a new token from test PyPI.
Brian Okken: My pypi.org is fine, but the test one, it has different credentials.
Brian Okken: You have to log into it too.
Brian Okken: And I lost my primary email login.
Brian Okken: So yeah, I'll have to fix that.
Michael Kennedy: Oh, boy.
Michael Kennedy: Yeah, it kind of does bug me that there's different logins and stuff.
Brian Okken: I like that it's a separate one, but I don't get why it's a different login.
Brian Okken: It should just be the same credentials, I think.
Michael Kennedy: Yeah, exactly.
Brian Okken: There's probably a good reason for it.
Brian Okken: Yeah. All right. Your extras, please, sir.
Michael Kennedy: Yes, indeed. My extras are coming. So I don't know. Did I tell you about how frustrated I got with my old blog?
Michael Kennedy: So I had this blog over at WordPress.com and I'd had it since 2006 and I'd written about 160 articles.
Michael Kennedy: Many of them are kind of like, yeah, they're not really in stuff that I care that much about anymore.
Michael Kennedy: But that's 10 years of writing or 15 years of writing before I moved to my newer website.
Michael Kennedy: I don't really want to throw that away, but have your own domain.
Michael Kennedy: You have to pay WordPress.com.
Michael Kennedy: And I'm just like, you know what?
Michael Kennedy: It's on my own domain.
Michael Kennedy: I have to leave it there.
Michael Kennedy: If I take it off, that's even worse.
Michael Kennedy: But every year I was paying $48.
Michael Kennedy: Remember the joke we had?
Michael Kennedy: It was like a person sweating over which of the two buttons to press.
Michael Kennedy: And one said, pay $12.
Michael Kennedy: The other one said, admit the dream is over.
Michael Kennedy: It's kind of like that.
Michael Kennedy: It's like, I'm never going to write again for this, but I don't want it to go away.
Michael Kennedy: So I'm like, well, what am I going to do?
Michael Kennedy: So I actually, I'd been thinking about this for a year or two, and I tried to like download it with web scraping and just the way that WordPress works and just, it was always like really messed up.
Michael Kennedy: So it occurred to me, I'm sitting there like, I bet you that Claude, Sonnet 4.0, by the way, at the time, I bet Claude could get it.
Michael Kennedy: So I just tell it, Hey, Claude, here's a WordPress website.
Michael Kennedy: I want to take all of this and convert it to Markdown in Hugo format and then put it into my Hugo website.
Michael Kennedy: And I just turned it loose on it.
Michael Kennedy: And it said, great.
Michael Kennedy: It looks like the RSS feed is what we want.
Michael Kennedy: pulled down the RSS feed, generated me a bunch of posts. I'm like, that's really cool. So then I got it to give me the regular expression I put into Nginx so that I could completely keep all of my SEO. So if there's somebody that's got a link to a blog post 15 years ago and they click it, it'll still 301 permanent redirect exactly to my Hugo site. And I did a little slash R for archived for all the posts that are, so I can look at the URL and go, oh, that's an old imported one, No, that's one that I wrote from scratch in Hugo.
Michael Kennedy: I'm like, yeah, that's it.
Michael Kennedy: We're done.
Michael Kennedy: That took like an hour.
Michael Kennedy: And then I realized WordPress is just amazing.
Michael Kennedy: It like only returns 50 articles out of the 160.
Michael Kennedy: Crap.
Michael Kennedy: So back, all right, now your job is to go parse it.
Michael Kennedy: And so basically I wrote up this article called Goodbye WordPress, Thanks AI, where I talked about how I got it to just go and parse all that.
Michael Kennedy: And now all the articles are there.
Michael Kennedy: You go find the posts.
Michael Kennedy: If you go to all the posts and you just hold it down, you're back into some seriously old stuff.
Michael Kennedy: But if I go back a little bit of ways, right?
Michael Kennedy: Like, let me see something like here.
Michael Kennedy: Add hotkeys to your website.
Michael Kennedy: Wrote in 2012.
Michael Kennedy: I still use that today, by the way.
Michael Kennedy: It even has cords like KGI.
Michael Kennedy: Goes like go to inbox sort of thing.
Michael Kennedy: I've got to pick up an icon there.
Michael Kennedy: But, and it even downloaded most of the images and other content.
Michael Kennedy: I don't know if I got any here, but I'm clicking around.
Michael Kennedy: Anyway, I just want to encourage people, like if you're feeling stuck or you've got some project, you're like, man, that would take me weeks.
Michael Kennedy: And yeah, $48 a year sucks, but a week's worth of my work sucks more.
Michael Kennedy: So I'm just going to bite the bullet and pay it.
Michael Kennedy: Just go to one of these Agenda AI's and give it a good description and see what it'll do.
Michael Kennedy: Maybe you can just escape.
Michael Kennedy: Anyway, goodbye WordPress.
Michael Kennedy: Thanks AI.
Brian Okken: So what you're saying is you went back in time and had AI write your blog from 10 years ago?
Michael Kennedy: Yes, actually, in a sense, I sort of did.
Michael Kennedy: I had to write the markdown version.
Michael Kennedy: So now everything has front matter and it's all marked down and all that kind of stuff.
Michael Kennedy: So that was a really cool experience.
Michael Kennedy: And it's been like years it's been bothering me.
Michael Kennedy: But I'm just like, nope, it's not worth a week.
Michael Kennedy: No, Michael, no.
Michael Kennedy: Whatever you think this is worth, just pay the $48 and move on, right?
Michael Kennedy: But it was like a warm summer night.
Michael Kennedy: A few weeks ago, I was just sitting down, I'm like, I'm going to just turn the AI loose on and see if it can.
Michael Kennedy: And it did incredibly well.
Michael Kennedy: Okay, so encouragement there.
Michael Kennedy: I did a big release on my content types library.
Michael Kennedy: I talked about this a while ago.
Michael Kennedy: Talked about content types.
Michael Kennedy: And the idea is you can give it a file or a URL or an extension, and it will tell you things like, oh, that's an MP3.
Michael Kennedy: And well, for the MP3, well, what kind of mime type or content type do I put into like a web response, right?
Michael Kennedy: It's super easy if it's just JPEG, right?
Michael Kennedy: Image JPEG.
Michael Kennedy: Well, is there the E in there?
Michael Kennedy: Is it JPEG or is it JPEG?
Michael Kennedy: Oh, man, I don't remember.
Michael Kennedy: But it gets more complicated.
Michael Kennedy: What if it's a Parquet data science file?
Michael Kennedy: Well, that's application.vnds.apache.parquet or like, oh, my goodness.
Michael Kennedy: Right, so I had this before and it had like 200 types or whatever.
Michael Kennedy: Now it has 360 and I put way more in there.
Michael Kennedy: So the release notes say all the different types that it added.
Michael Kennedy: 137 new types across different categories and so on.
Michael Kennedy: So if you're parsing files and going, I need a content type or given an extension, what is it?
Michael Kennedy: Or given a content type, what extension is that?
Michael Kennedy: All those kinds of things.
Michael Kennedy: Here you go.
Michael Kennedy: Cool.
Michael Kennedy: Yes, I know there's something built into Python and the standard library.
Michael Kennedy: It's not the same thing.
Michael Kennedy: This is better.
Michael Kennedy: The one built into Python varies by machine of what responses it gives you, which is just weird because it doesn't actually have its own data. It looks into the OS registry for what your current OS thinks a mime type of a thing is. I don't know. There's other ones that require access to files. So anyway, I talked about it before, but lots of updates to that.
Michael Kennedy: Here's one of my PRs, Brian. I thought I wanted to look for something and I can't remember what it was. Oh yes, I can remember what it was. There's this project called DevDocs. And I talked to Hugo Bowen Anderson about this on the podcast. And I'm like, there's this app. I don't remember what it is and then i'm like let me search around and i was searching and i went to search on python bytes so i did a major improvement on the search engine here this is the this is a part of one of those those big uh prs and when i've searched like for example if i search for py test it would just say episode name episode name episode name episode name and there's 330 episodes out of 450 or whatever yeah it's almost every episode is that you're like god but there was a thing that was actually like where the topic was pytest, not where the word pytest was used.
Michael Kennedy: Because we search all the spoken text, right?
Michael Kennedy: So now we have a little button we can press, like a toggle, like an iOS toggle, that shows you only show me the stuff where it actually appears.
Michael Kennedy: And notice every episode now has the core topics, your topic, my topic, listed out separately.
Brian Okken: This is awesome.
Michael Kennedy: Thank you.
Michael Kennedy: The search word that appears is highlighted in yellow.
Michael Kennedy: Now watch this.
Michael Kennedy: So see this Python Language Summit?
Michael Kennedy: if I click that, it jumps over and highlights that part of the show notes for that part of the content.
Michael Kennedy: So cool. How epic is this? So what I was looking for was dev docs. There it is. You can see now really quickly, you don't have to go through all the episodes. You can see it's boom. It's the second one from 2000, from 276. And it's the second topic covered. And it points that out right there
Brian Okken: and I can jump right to it. That's very cool. Yeah. So that's one of my extras. You guys,
Michael Kennedy: please use the search.
Michael Kennedy: If you're looking for something, I put a ton of effort in the search engine.
Michael Kennedy: It's really fast.
Michael Kennedy: It's not perfect, but it's pretty darn good.
Michael Kennedy: It's better than most sites search.
Michael Kennedy: I'll tell you that.
Michael Kennedy: Yeah.
Brian Okken: I really like that it pops out the topics because sometimes I'm like, we talked about it, but it wasn't a topic.
Brian Okken: So I am going to have to look more.
Brian Okken: But there's also the ones where it was a topic and I'm pretty sure it was listed.
Brian Okken: Just having the name that it showed up At some point we talked about it isn't enough, but having, this is great.
Brian Okken: I love it.
Michael Kennedy: Awesome.
Michael Kennedy: Thank you.
Michael Kennedy: All right.
Michael Kennedy: One more thing.
Michael Kennedy: My book is officially, officially out and available for purchase.
Michael Kennedy: Very cool.
Michael Kennedy: Thank you.
Michael Kennedy: 332 pages available on amazon.com and on Gumroad, whichever you pick.
Brian Okken: You said your book, but what is the book name?
Michael Kennedy: The book is Talk Python in Production, a Cloud Agnostic Guide to Building, Scaling, and Managing Your Own Python Infrastructure.
Michael Kennedy: Oh, right now it's only on an ebook, but I'm working on a paperback as well.
Michael Kennedy: And how is it doing?
Michael Kennedy: It is number one in application development and number two in software engineering.
Michael Kennedy: That's pretty epic.
Brian Okken: Wow.
Michael Kennedy: Yeah, and I have not really even promoted it.
Michael Kennedy: I've even sent an email for people who said they were interested in stuff like that.
Brian Okken: Oh, you should totally plug it on the podcast.
Michael Kennedy: Yeah, I've talked about it and talked by it on and this is the first time I've talked about it here.
Michael Kennedy: I do want to just say it got posted on Hacker News and got really popular there.
Michael Kennedy: And the first question was, how much of this book is written with AI?
Michael Kennedy: I bet all of it.
Michael Kennedy: Zero of it.
Michael Kennedy: Zero of this book is written with AI.
Michael Kennedy: I've put a ton of work into it.
Michael Kennedy: It took me nine months.
Michael Kennedy: It may or may not be amazing, but at least it's human, right?
Michael Kennedy: So there you go.
Michael Kennedy: Anyway, that's all out and people can check it out.
Brian Okken: Books are a weird thing, right?
Brian Okken: Like, I still love books.
Brian Okken: It takes forever to write a book.
Brian Okken: And maybe other people are really bad.
Brian Okken: I mean, nine months is not bad.
Brian Okken: I spent a year and a half on both editions of mine so far.
Brian Okken: I would not spend a year and a half again.
Brian Okken: And then you sell it for like $20.
Brian Okken: It's a lot of value for $20.
Michael Kennedy: Yeah, I think so.
Michael Kennedy: Yeah, $19.
Michael Kennedy: You can get it on Amazon or you can get it on Gumroad.
Michael Kennedy: They're both DRM free.
Michael Kennedy: So if you don't care, I don't know what to...
Michael Kennedy: It's so weird.
Michael Kennedy: I get three times more money for the same amount that you all pay if you get it on Gumroad.
Michael Kennedy: But if you guys bought on Amazon, it boosts the rankings, which may help it.
Michael Kennedy: I don't know what to tell people to do.
Michael Kennedy: Get it wherever you want.
Michael Kennedy: It's DRM free and enjoy it.
Michael Kennedy: Awesome.
Michael Kennedy: Yeah.
Michael Kennedy: That's it for all my extras.
Brian Okken: I think we're done then.
Michael Kennedy: Oh, we need something funny.
Michael Kennedy: We do need something funny.
Michael Kennedy: And I think this is a little bit in the testing space.
Michael Kennedy: So it might resonate with you, Brian.
Michael Kennedy: It's not exactly in the testing space, but it's pretty darn close.
Michael Kennedy: Here's the estimation.
Michael Kennedy: How long will it take you to do this project?
Michael Kennedy: So there's different views here.
Michael Kennedy: The noob says, that'll take a day.
Michael Kennedy: The junior, I estimate it'll take three days.
Michael Kennedy: because she knows that the noob tried it for one day, and that was before they asked for the docs and the error handling.
Michael Kennedy: That was the happy case in one day.
Michael Kennedy: But you're not done in one day.
Michael Kennedy: No, the senior dev says, that's an M-sized story.
Michael Kennedy: Just makes me squirm a little bit hearing that.
Michael Kennedy: Are you ready how the principal...
Brian Okken: Oh, T-shirt sizes, right.
Brian Okken: Yes, exactly.
Michael Kennedy: The T-shirt size is extra small, small, medium.
Michael Kennedy: But you ready for the pro, the principal engineer, the senior engineer one?
Michael Kennedy: You guys give estimates of what is this?
Michael Kennedy: yeah there's a laughing mouse like jc in the comment says if you're doing sprint planning and t-shirt sizes you're going to be miserable at your company i don't know i'm not even sure
Michael Kennedy: if there's anything good in here irrelevant but i think that's it for the comments but i thought
Brian Okken: it was funny so uh you're a solopreneur sort of right yes yeah pretty much i mean i have people help with stuff but pretty much let's go with yes uh do you do sprint estimates what a good question
Michael Kennedy: no uh not really i i just kind of like maybe small or huge like is that going to be something i can just do soon or is that like a really long project that's not worth doing yeah that's the only estimate i do is like i really don't do sprint estimates i have started keeping a changelog for myself though on stuff so that i can yeah and like sort of doing a release every week or two so on certain projects so that i can go and if i go to get i can just look at the history of the changelog oh yeah that was in this like time frame or whatever that's been kind of helpful so and that's the closest i got to formalities i have a release log for stuff that nobody sees okay i've gone to kanban
Brian Okken: i'm i'm on a weird project but uh stuff but i've been done spritz before but the uh uh doing combine board where there's like a big backlog and then i try to have like only two to three things in the up next queue um and then um and just hit it like that um and that's a good idea yeah i like that a lot and then then i have a then i have like i can look at the list of done things and when they got done and stuff but the um the really thing when i get when i get pressed on like estimates um i push back because um i'm mostly working on stuff that like it's hard to estimate and it and it's like well you need to practice then you'll get better at it but for what i could spend time to estimate but i think i'd rather spend time actually getting stuff done yeah but and then when i do estimate i'll be like yeah that'll take like a month and and i get back well that's too long okay well what answer do you want exactly i i do think there's an interesting analogy to
Michael Kennedy: like architecture like i can get a really accurate plan and how long it takes to build this bridge and it's only within 20 margin of error or whatever but bridges that bridge has been built over and over and over across different roads and streams and stuff the reason you build software is because it hasn't been built before if it just existed as a package you would just use it if it exists as a product you probably just use it like most of the time you're trying you're like inventing a little bit of what you're doing and so it's like yeah and it might be a holiday yeah there might be some
Brian Okken: some people that do like a lot of stuff that they've kind of done before, but I've followed a career path where I'm trying to do things that I haven't done before. And, and I'm probably the best person to accomplish that. So there's not a lot of pushback. Yeah. Yeah. The one thing I would
Michael Kennedy: add is if you do have to do estimates, do them holistically and include like cleaning up tech debt, include writing the tests that you need to write, include making the code look good. Not, it's tempting to go, well, like when could I get the first thing working? That's probably three like tell them it takes five just tell them if it's three days tell them it's five so you get that time to do the cleanup and you you don't accumulate a worse and worse product over time yeah and also
Brian Okken: the um i can come back and clean it up you will get that time will fill up and you won't be able
Michael Kennedy: to do that so yeah well our time our time is up brian awesome our time is up thank you to everyone for being here for listening