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

#452: pi py-day (or is it py pi-day?)

Published Thu, Oct 9, 2025, recorded Thu, Oct 9, 2025
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean-gen-ai Use code DO4BYTES and get $200 in free credit

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Brian #1: Python 3.14

  • Released on Oct 7
  • What’s new in Python 3.14
  • Just a few of the changes
    • PEP 750: Template string literals
    • PEP 758: Allow except and except* expressions without brackets
    • Improved error messages
    • Default interactive shell now
      • highlights Python syntax
      • supports auto-completion
    • argparse
      • better support for python -m module
      • has a new suggest_on_error parameter for “maybe you meant …” support
    • python -m calendar now highlights today’s date
  • Plus so much more

Michael #2: Free-threaded Python Library Compatibility Checker

  • by Donghee Na
  • App checks compatibility of top PyPI libraries with CPython 3.13t and 3.14t, helping developers understand how the Python ecosystem adapts to upcoming Python versions.
  • It’s still pretty red, let’s get in the game everyone!

Michael #3: Claude Sonnet 4.5

  • Top programming model (even above Opus 4.1)
  • Shows large improvements in reducing concerning behaviors like sycophancy, deception, power-seeking, and the tendency to encourage delusional thinking
  • Anthropic is releasing the Claude Agent SDK, the same infrastructure that powers Claude Code, making it available for developers to build their own agents, along with major upgrades including checkpoints, a VS Code extension, and new context editing features
  • And Claude Sonnet 4.5 is available in PyCharm too.

Brian #4: Python 3.15 will get Explicit lazy imports

  • Discussion on discuss.python.org
  • This PEP introduces syntax for lazy imports as an explicit language feature:

    lazy import json
    lazy from json import dumps
    
  • BTW, lazy loading in fixtures is a super easy way to speed up test startup times.

Extras

Brian:

  • Music video made in Python - from Patrick of the band “Friends in Real Life”
    • source code: https://gitlab.com/low-capacity-music/r9-legends/

Michael:

Joke: You do estimates?

Episode Transcript

Collapse transcript

00:00 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.

01:00 And once you're over on YouTube, do us a favor, subscribe there and press the bell to get notified.

01:04 That's the way when we do go live at the wrong time because things kept happening.

01:09 I have a bit of a story for that.

01:10 You'll get notified that we're going live.

01:12 You can check it out.

01:13 Usually that's Mondays at 10 a.m. Pacific time.

01:15 And sign up to our newsletter.

01:16 Brian puts that together every week and sends it out.

01:19 And it's got more than just a rehashing of the show notes.

01:22 It's got a bunch of extra info.

01:23 So that's, that's always fun.

01:25 Brian, one of the reasons, there are many reasons that we are on an alternate schedule this week.

01:29 I had a very, very dark time fall upon House Kennedy.

01:34 There were people, I live where there are tons of tall trees.

01:36 In Oregon, there are tall trees, but I live especially where there are many tall trees, like right along the street.

01:41 And so that we don't get the power taken out by these trees.

01:44 In the winter, the power company goes along and trims back the trees.

01:48 Well, the geniuses at the top of that thing cut through the fiber optic cable that provided power to my house.

01:54 and I have one bar of LTE level of cell coverage at my house.

01:58 So when that happened Sunday night or Sunday afternoon, and then we're supposed to record Monday morning, it was like, mm-mm.

02:05 That ain't happening.

02:06 It ain't happening.

02:07 So sorry, folks.

02:08 That's a part of the reason why we're a little bit off schedule.

02:12 But light has shone upon us again.

02:14 The fiber is flowing.

02:17 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,

02:23 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

02:34 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

03:14 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.

03:21 It's still, yeah, bigger.

03:23 Anyway.

03:24 And look, they were guaranteed to not run out.

03:26 It's an irrational number that goes on forever.

03:28 It's going to be fine.

03:30 Yeah, I think it would break some people to have like a really long version.

03:34 But I'm cutting into our logo.

03:37 OK, so we're linking.

03:41 I'm going to link to what's new in the release.

03:44 And there is a ton of stuff in here.

03:46 So please check it out.

03:48 I think there's some great stuff.

03:49 I wanted to highlight a handful of things that I'm pretty excited about.

03:53 Template string literals, and I have to admit, I still don't quite get it.

03:58 I'm going to have to do a project that actually uses template string literals, the new template strings.

04:04 The prefix T instead of F, so t-strings.

04:07 Are we calling them t-strings?

04:08 I don't know.

04:09 Yes, we are calling them t-strings.

04:10 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.

04:16 Yeah, t-strings.

04:17 Okay.

04:17 I should, I guess, just go back and listen to that episode.

04:21 Anyway, excited to try this.

04:22 And I think I am excited to see what people build on top of this as well.

04:29 Possibly we can have some cool stuff built on top of two strings.

04:33 What else?

04:35 This is pretty cool, actually.

04:37 Seems kind of minor, but PEP758 is allow, accept, and accept star expressions without brackets.

04:44 So what's the deal here?

04:46 Well, if you had multiple exceptions that you were catching, like in the example, they have timeout error and connection refused error.

04:53 Those had to be in brackets, but now they can just be just like there.

04:57 They're just, you don't have to have brackets.

04:59 It's a minor thing, but it saves typing.

05:01 I love it.

05:01 Okay.

05:03 Improved error messages, always better.

05:05 Like if you typed while with two L's or something, more highlighting of where you have a syntax error.

05:11 Perfect.

05:12 More better tracebacks are always helpful.

05:15 What else?

05:16 So one of the things that came in is some, oh, default interactive shell.

05:22 So the default, there's a couple of improvements to the shell.

05:27 So when you just, the rebel, when you type like Python or Python-I or whatever, the interactive thing, it's in color now.

05:34 And one of the things is it's in color and also it does syntax highlighting.

05:39 So that's pretty cool.

05:40 I thought I had a screenshot.

05:41 Yeah, so fun to have colors in the REPL.

05:45 I know there were other non-standard REPLs that did this, so I'm glad that the standard was.

05:51 Yeah, that's great.

05:52 What else we got?

05:54 I thought I had a couple other things.

05:56 Default and directive shell.

05:57 In improved modules, I'm actually pretty excited about the arg parse stuff.

06:04 The arg parse, if you're writing a command line interface tool, like a CLI tool that takes arguments.

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

06:20 So have I.

06:20 If it doesn't have a dependency, but you wanted to take arguments, just use arg parse.

06:24 Yeah.

06:25 So then a couple of things, if name equals main or not.

06:30 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.

06:39 I didn't try it with arg parse, but apparently that's better now.

06:43 So that's cool.

06:44 The other thing that I'm pretty excited about is this suggest on error.

06:49 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?

07:06 And I love that sort of a feature.

07:09 So that's pretty cool.

07:10 And then colored help text.

07:12 That's pretty neat.

07:13 And what do I have?

07:14 Oh, last thing I thought was just fun.

07:17 This is a whole bunch of stuff.

07:18 Check it out.

07:19 But the date, the calendar.

07:23 Do you ever use this?

07:23 I occasionally use the calendar module.

07:25 I've never used the calendar.

07:27 I know what it does, but I've never used it.

07:29 Okay, so if you do Python-M calendar, and then it has some flags and stuff you can use too.

07:35 It just prints out of the calendar.

07:36 But now with this release, it highlights the current date.

07:42 So you can say like calendar 2025 10 for October of 2025.

07:46 And it highlights that it's the ninth today.

07:48 And if you do the, if you just do the whole year, it'll show you the whole year and it does the ninth.

07:54 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?

08:02 When is the 15th?

08:03 Is it Tuesday?

08:04 Whatever.

08:04 You can pull this up.

08:06 Yeah, that's pretty cool.

08:07 Lots of great stuff.

08:08 Check out the what's new and upgrade.

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

08:17 I'm going to get up.

08:18 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.

08:28 It's the normal stuff, but I figured I'd just write it down and I'll do a post about that too.

08:33 Awesome. Yeah, looking forward to it.

08:35 I have a few follow-ups, a few rough edges.

08:38 Okay.

08:38 I have one smooth, nice edge, and then a couple rough edges.

08:41 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.

08:53 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.

09:02 But remember that you have to actually update the uv binary.

09:05 It doesn't look at a web service or something.

09:07 So if you've got an old uv that's not 0.9, it doesn't know about the new one.

09:12 So uv self-update.

09:14 Yes.

09:14 If you have it globally installed.

09:16 Which is how I do it.

09:18 Indeed.

09:18 Okay, so that's the smooth edge.

09:20 The rough edge is for Python bytes, I use uv loop for the asyncio operations on Python bytes.fm.

09:27 Well, I thought, ah, what the heck?

09:28 Let me just swap out the virtual environment locally and see what happens today.

09:32 You know, just try it out.

09:33 Why not?

09:33 I'll be able to say we're using 3.14.

09:35 I'll just roll it out.

09:35 And then guess what?

09:37 It didn't like it.

09:38 It crashed and it literally wouldn't load the website because apparently uv does not support 3.14.

09:45 UV loop rather.

09:46 Sorry, not uv, uv loop.

09:49 There are different things.

09:50 So uv loop is a way to speed up the asyncio event loop for async and await.

09:54 And it's been fine for a long time.

09:57 It was updated like three weeks ago, but it's not updated for this.

09:59 So I just took it out and said, you know what, we're just going to fall back.

10:02 Python's got a lot faster since I added that way, way back when.

10:05 And so just run on the standard old asyncio event loop.

10:09 Well, it's a good thing you checked.

10:10 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.

10:18 But occasionally, something you're doing might be an issue.

10:21 So please test and roll out new versions.

10:24 I have another sharp edge for you.

10:25 I have no idea if this is true in VS Code, though it may be.

10:28 But honestly, I haven't tried it.

10:29 I don't know.

10:30 But in cursor, I can tell you that you cannot debug something in Python 3.14.

10:35 You hit run, it says, cannot find underscore underscore handle crash or something along those lines, at least the projects that I tried.

10:42 So a few people got some updating to do.

10:46 Brian, here's the thing, though.

10:47 Wasn't this stuff available for like six months?

10:49 Yeah, it's been available.

10:50 I mean, I'll give the uv loop guys a pass, right?

10:52 Like that's not a main thing they're working on and like whatever.

10:55 Maybe it needs testing.

10:57 But I mean, a product such like Cursor that's got so, they update that thing like daily.

11:02 There should probably have been somebody that tested that.

11:04 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?

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

11:23 Maybe you even turn on testing in CI at 3.14.

11:27 but you didn't have to make any changes should you do another version.

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

11:38 I think it's worth it.

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

11:48 - Yeah, it might be dead.

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

11:58 - Yeah, I agree with that.

12:00 That sounds cool.

12:01 All right, let's go back and talk about, checking your libraries for versions that work.

12:06 So I bring you, zoom out a little so it looks a little better, the Python compatibility checker for free threaded Python.

12:15 - Okay.

12:16 - Okay, so this is a heat map of, over over it, where do I get it like that?

12:21 It doesn't do anything, you can click it.

12:22 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.

12:29 So Boto3, Care Set Normalizer, URL3, requests, BotoCore, et cetera.

12:34 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?

12:42 The free threaded version of Python.

12:45 I don't know.

12:45 It's more blue than red, but there's still a lot of red out there.

12:49 Yeah.

12:50 There's failed.

12:50 There's no data.

12:52 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.

13:07 And if you don't want to support it, fine, be like, just be explicit about it.

13:10 But if there's just a super minor little threading issue or some condition or

13:15 whatever, you know, it'd be cool if it was supported.

13:17 Like that's, that's the primary reason that the two to three thing was so rough.

13:21 It was like, not that we all couldn't decide to start writing Python 3 style code.

13:26 It was like, well, the library I need to do this depends on a library that doesn't work in 3.

13:31 And we've got a similar story for free threading here, although I suspect it's less.

13:35 Anyway, I present to you ft-checker.com.

13:38 And you can see if the things that you care about support free threaded Python.

13:41 Tina, is there, how many things are they checking?

13:44 Oh, 500 things, top 500.

13:46 Well, I think I can scroll in and let me look.

13:49 I think it's the top 1,000 or almost.

13:51 Almost like top 987.

13:54 Maybe they couldn't get information about some of them.

13:57 Top thousand.

13:57 What else is cool?

13:58 Our sponsor.

13:59 Yes.

14:00 Thank you so much to DigitalOcean.

14:02 This episode of Python Bytes is brought to you by DigitalOcean.

14:05 DigitalOcean is a comprehensive cloud infrastructure that's simple to spin up, even for the most complex workloads.

14:11 And it's a way better value than most cloud providers.

14:15 At DigitalOcean, companies can save up to 30% off their cloud bill.

14:18 DigitalOcean boasts 99.99% uptime, SLAs, and industry-leading pricing on bandwidth.

14:26 It's built to be the cloud backbone of businesses small and large.

14:30 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.

14:41 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.

15:02 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.

15:38 Absolutely.

15:39 Yeah, they do really good stuff.

15:40 I just recently moved a bunch of stuff to, what do they call it?

15:44 DigitalOcean Spaces to save some, store some things.

15:47 I was working at DigitalOcean Spaces 30 minutes before we started.

15:51 Like I said, very cool.

15:52 Good stuff.

15:52 So was I using AI?

15:54 Was I not, Brian?

15:55 That's the question.

15:56 There's a big new model out there.

15:58 So I want to give a shout out to Claude Sonnet 4.5.

16:02 I think this is worth checking out.

16:04 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.

16:34 It was out of control.

16:36 So let's see.

16:37 I took a few notes of some of the things that I thought were kind of noteworthy of it.

16:41 So apparently it ranks as the top programming model, which is pretty cool.

16:45 And we live in such weird times.

16:47 Our programming tool has reduced concerning behaviors like sycophancy, deception, power seeking, and a tendency to encourage delusional thinking.

16:56 Hey, I guess it's good if your programming tool doesn't do that.

17:00 Isn't that right?

17:01 I mean, would you want your programming tool to be sycophant?

17:04 No.

17:04 Come on, not really.

17:05 A little sycophant is good, but not too much.

17:07 Michael, if you don't want it to be, then that's a good thing.

17:10 That's right.

17:12 You're absolutely right.

17:16 I didn't think of that.

17:17 Good job.

17:18 Gosh, I was confused.

17:20 I've been a bad bot.

17:22 They've also, as part of this, released the Cloud Agent SDK, which is what they use to build Claude Code.

17:29 So that's pretty cool.

17:31 If you want to bring that into your own platform and do it.

17:35 And speaking of which, JetBrains, their AI platform now allows you to use Sonic 4.5 as well, built right into PyCharm.

17:45 That's pretty sweet.

17:46 And of course, Klein.bot supports it because that one lets you just put in your key and you get your thing.

17:53 That plugs into both PyCharm and VS Code and Cursor and all the things.

17:57 On cursor, you can pick it.

17:58 And cloud code, obviously, you can pick it because it's from them.

18:01 Here you can even see at the top.

18:02 New cloud sign at 4.5 is live and client.

18:05 So anyway, I encourage people to check it out.

18:07 I've been doing some significant work with it.

18:09 I actually did two PRs to Python by set FM.

18:13 One is like 4,300 lines.

18:15 One is 3,000 lines just in the last day.

18:18 And they came out incredibly.

18:19 I haven't had time to show you, Brian, but after this, I can show you and see what you think.

18:23 It's pretty neat.

18:24 Did the first one change all the quotes to double quotes

18:27 I'm going to change all the double quotes to single quotes.

18:30 That's a good question.

18:31 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.

18:38 So it's like, it's always sort of staying in sync with the way that I want.

18:42 It won't cycle back and forth like that.

18:43 Yeah.

18:44 I'm curious about what was it?

18:46 The, Hacktober.

18:47 is it, Oh yeah.

18:49 That's going to be different, isn't it?

18:51 Yeah.

18:51 With all the tools.

18:53 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?

19:03 You get a star.

19:05 And I would get this like, I'm correcting this bit of grammar in your readme.

19:09 Like, I'm not even sure that's the correct grammar.

19:12 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.

19:19 Get away from me, people.

19:20 Yeah.

19:21 Well, and I kind of am jealous about some of the popularity of projects.

19:26 A lot of the projects I work on are not that popular, which is fine.

19:30 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.

19:41 Yeah.

19:41 Anyway.

19:42 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.

19:52 Oh my gosh, please.

19:52 I didn't notice that.

19:53 That's great.

19:54 Let it happen.

19:55 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.

20:04 We're just going to cycle through what you did.

20:06 Like, no.

20:07 So all those improvements are very welcome.

20:09 Yeah.

20:09 Indeed.

20:10 Cool.

20:11 Well, as grateful as I am for Python 3.14, I'm looking forward to 3.15.

20:19 Ryan, don't be lazy.

20:20 Work with the stuff that you got.

20:21 Come on.

20:22 Okay.

20:23 Well, in Python 3.15, one of the things that's coming is explicit lazy imports.

20:31 And boy, this is an inside baseball kind of thing.

20:33 But that's what this podcast is all about, isn't it?

20:38 I'm here for it.

20:39 I am so here for this idea.

20:40 I am too.

20:42 PEP 8.10, explicit lazy imports.

20:44 So the idea is actually, it's just common.

20:48 We put imports at the top of the file, right?

20:51 But if you do that, then everything that imports it imports all your imports also.

20:57 And you don't actually have to do that.

20:59 You can put, anyway, we'll get back that.

21:02 You can put them in a function or something and they'll get imported for the entire module the first time they're used.

21:09 That's the way we do lazy imports now.

21:11 In the future, it'll do that automatically if you just throw a lazy in front of it.

21:15 So it'll work with lazy import.

21:17 You can say lazy import JSON, and JSON won't get imported until the first time.

21:22 Or you can do lazy import JSON from, or lazy from JSON import dumps or something.

21:28 You can do the from thing as well.

21:30 So either way, it won't load it until it's needed.

21:34 And this is a minor little syntax thing that's going to save a lot.

21:39 I love this.

21:40 So do you have any thoughts on this?

21:43 I am here for it.

21:44 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.

21:51 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.

22:00 Like there's all these weird cases.

22:02 And I talked a little while ago about, I think I said, Michael learns a lesson, right?

22:06 I had something that was a little utility built inside of Talk Python's code base or the course's code base or whatever.

22:13 And I'm like, oh, I'll just reuse these few little utility things.

22:16 And because of that, just the import statements to load up all of that code made it take several seconds to start.

22:22 I put it in its own file and copied a few utilities over and it took like 100 mil.

22:26 It was like 10 times faster.

22:27 And it's exactly because of this.

22:29 It didn't use any of that stuff or hardly any of that stuff.

22:31 It just pulled it in because it's got to get the library from a sub package.

22:36 So off it goes, you know what I mean?

22:38 Yeah, where I get hit a lot is, And actually, we have a side.

22:42 Maybe I jumped the gun on this from Hugo.

22:45 Lazy Imports.

22:46 I forgot.

22:46 This is a draft.

22:48 It's not approved yet.

22:49 It's a draft.

22:50 So maybe it comes in at 315.

22:53 Right-click and say Inspect Element, and then you can just edit the status.

22:56 It'll be fine.

22:58 It's a wiki, right?

22:59 I can just change it?

23:02 That's for you.

23:02 So PEP 810 is still in draft and under discussion.

23:05 It's not submitted to the steering council yet.

23:07 So thanks, Hugo.

23:08 But I guess here's my vote.

23:10 I hope it gets in.

23:12 Yeah.

23:12 Yeah.

23:13 And I hope this is in as well.

23:15 Thanks, you guys.

23:17 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.

23:25 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.

23:36 But what pytest does is it imports all of your test code before it starts running.

23:42 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.

23:49 So it is nice to separate your heavy imports.

23:53 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.

24:01 But anyway, hopefully it'll come in.

24:03 I hope so too.

24:04 I'm here for this idea.

24:05 By the way, I also see you, Dino Veland and Brittany Reynoso and some of the folks from the Cinder team at Meta.

24:13 I think some of these ideas originally came out from Cinder.

24:15 I don't know 100% for sure, but that'd be pretty cool to see some of that work coming over, right?

24:20 That's where Free Threaded Python came from as well.

24:24 Yeah.

24:24 All right.

24:25 All right.

24:25 From Sam Gross.

24:26 Awesome.

24:27 Okay.

24:28 That's it for all of our stuff.

24:29 How are you feeling?

24:30 Are we done?

24:31 I'm done.

24:32 Okay.

24:34 Well, I have extras though.

24:35 Yeah, why don't you go first?

24:36 Okay.

24:37 This was sent in to us from Patrick of the band Friends in Real Life.

24:42 He just said that, and I don't know how to do the fancy thing where you'll have to listen to the song.

24:49 They made a music video.

24:51 I'll just play it.

24:53 They made a music video.

24:53 It prints out while the music's going on.

24:55 It prints all the stuff.

24:59 And it's really fun near the end.

25:03 It starts going fast.

25:04 And I love the end.

25:05 I'm just going to fast forward to the end part because it's like super fun.

25:08 It just starts taking off.

25:10 We'll click ahead.

25:12 Yeah, just starts flying.

25:13 It's so fun.

25:15 Anyway, he said he wrote it with Python and there's the code that he wrote.

25:21 And there's even test code, which is kind of cool.

25:24 And it'd be fun to do it.

25:26 I'll do a PR against something that's already done.

25:30 Anyway, it's just a fun extra thing, right?

25:32 Making a music video with Python.

25:34 Love it.

25:35 Yeah, and it's built with rich and stuff.

25:36 It's a good song.

25:37 I enjoy it.

25:38 Got a little movable typography, kinematic text or whatever.

25:43 Yeah, it's very fun.

25:44 The other thing I wanted to, just a short one.

25:47 I was trying to write this article about testing.

25:50 Testing is 3.14.

25:52 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.

26:01 My pypi.org is fine, but the test one, it has different credentials.

26:07 You have to log into it too.

26:08 And I lost my primary email login.

26:13 So yeah, I'll have to fix that.

26:15 Oh, boy.

26:16 Yeah, it kind of does bug me that there's different logins and stuff.

26:21 I like that it's a separate one, but I don't get why it's a different login.

26:25 It should just be the same credentials, I think.

26:27 Yeah, exactly.

26:28 There's probably a good reason for it.

26:31 Yeah. All right. Your extras, please, sir.

26:34 Yes, indeed. My extras are coming. So I don't know. Did I tell you about how frustrated I got with my old blog?

26:43 So I had this blog over at WordPress.com and I'd had it since 2006 and I'd written about 160 articles.

26:51 Many of them are kind of like, yeah, they're not really in stuff that I care that much about anymore.

26:54 But that's 10 years of writing or 15 years of writing before I moved to my newer website.

27:00 I don't really want to throw that away, but have your own domain.

27:04 You have to pay WordPress.com.

27:06 And I'm just like, you know what?

27:09 It's on my own domain.

27:10 I have to leave it there.

27:11 If I take it off, that's even worse.

27:13 But every year I was paying $48.

27:15 Remember the joke we had?

27:16 It was like a person sweating over which of the two buttons to press.

27:19 And one said, pay $12.

27:22 The other one said, admit the dream is over.

27:24 It's kind of like that.

27:25 It's like, I'm never going to write again for this, but I don't want it to go away.

27:29 So I'm like, well, what am I going to do?

27:30 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.

27:41 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.

27:47 So I just tell it, Hey, Claude, here's a WordPress website.

27:50 I want to take all of this and convert it to Markdown in Hugo format and then put it into my Hugo website.

27:56 And I just turned it loose on it.

27:57 And it said, great.

27:58 It looks like the RSS feed is what we want.

27:59 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.

28:31 I'm like, yeah, that's it.

28:32 We're done.

28:32 That took like an hour.

28:34 And then I realized WordPress is just amazing.

28:36 It like only returns 50 articles out of the 160.

28:42 Crap.

28:43 So back, all right, now your job is to go parse it.

28:45 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.

28:54 And now all the articles are there.

28:56 You go find the posts.

28:57 If you go to all the posts and you just hold it down, you're back into some seriously old stuff.

29:03 But if I go back a little bit of ways, right?

29:06 Like, let me see something like here.

29:10 Add hotkeys to your website.

29:11 Wrote in 2012.

29:12 I still use that today, by the way.

29:14 It even has cords like KGI.

29:18 Goes like go to inbox sort of thing.

29:20 I've got to pick up an icon there.

29:21 But, and it even downloaded most of the images and other content.

29:28 I don't know if I got any here, but I'm clicking around.

29:31 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.

29:36 And yeah, $48 a year sucks, but a week's worth of my work sucks more.

29:40 So I'm just going to bite the bullet and pay it.

29:43 Just go to one of these Agenda AI's and give it a good description and see what it'll do.

29:47 Maybe you can just escape.

29:48 Anyway, goodbye WordPress.

29:49 Thanks AI.

29:50 So what you're saying is you went back in time and had AI write your blog from 10 years ago?

29:57 Yes, actually, in a sense, I sort of did.

30:00 I had to write the markdown version.

30:02 So now everything has front matter and it's all marked down and all that kind of stuff.

30:05 So that was a really cool experience.

30:07 And it's been like years it's been bothering me.

30:09 But I'm just like, nope, it's not worth a week.

30:11 No, Michael, no.

30:13 Whatever you think this is worth, just pay the $48 and move on, right?

30:17 But it was like a warm summer night.

30:19 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.

30:23 And it did incredibly well.

30:25 Okay, so encouragement there.

30:27 I did a big release on my content types library.

30:31 I talked about this a while ago.

30:33 Talked about content types.

30:35 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.

30:43 And well, for the MP3, well, what kind of mime type or content type do I put into like a web response, right?

30:51 It's super easy if it's just JPEG, right?

30:54 Image JPEG.

30:55 Well, is there the E in there?

30:56 Is it JPEG or is it JPEG?

30:58 Oh, man, I don't remember.

31:00 But it gets more complicated.

31:01 What if it's a Parquet data science file?

31:03 Well, that's application.vnds.apache.parquet or like, oh, my goodness.

31:09 Right, so I had this before and it had like 200 types or whatever.

31:13 Now it has 360 and I put way more in there.

31:15 So the release notes say all the different types that it added.

31:19 137 new types across different categories and so on.

31:22 So if you're parsing files and going, I need a content type or given an extension, what is it?

31:27 Or given a content type, what extension is that?

31:29 All those kinds of things.

31:30 Here you go.

31:30 Cool.

31:31 Yes, I know there's something built into Python and the standard library.

31:34 It's not the same thing.

31:35 This is better.

31:36 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.

31:55 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.

32:44 Because we search all the spoken text, right?

32:47 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.

32:55 And notice every episode now has the core topics, your topic, my topic, listed out separately.

33:01 This is awesome.

33:02 Thank you.

33:03 The search word that appears is highlighted in yellow.

33:05 Now watch this.

33:06 So see this Python Language Summit?

33:08 if I click that, it jumps over and highlights that part of the show notes for that part of the content.

33:15 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

33:32 and I can jump right to it. That's very cool. Yeah. So that's one of my extras. You guys,

33:37 please use the search.

33:38 If you're looking for something, I put a ton of effort in the search engine.

33:41 It's really fast.

33:42 It's not perfect, but it's pretty darn good.

33:44 It's better than most sites search.

33:46 I'll tell you that.

33:47 Yeah.

33:48 I really like that it pops out the topics because sometimes I'm like, we talked about it, but it wasn't a topic.

33:55 So I am going to have to look more.

33:57 But there's also the ones where it was a topic and I'm pretty sure it was listed.

34:03 Just having the name that it showed up At some point we talked about it isn't enough, but having, this is great.

34:11 I love it.

34:11 Awesome.

34:12 Thank you.

34:12 All right.

34:14 One more thing.

34:15 My book is officially, officially out and available for purchase.

34:19 Very cool.

34:20 Thank you.

34:21 332 pages available on amazon.com and on Gumroad, whichever you pick.

34:26 You said your book, but what is the book name?

34:28 The book is Talk Python in Production, a Cloud Agnostic Guide to Building, Scaling, and Managing Your Own Python Infrastructure.

34:35 Oh, right now it's only on an ebook, but I'm working on a paperback as well.

34:40 And how is it doing?

34:42 It is number one in application development and number two in software engineering.

34:46 That's pretty epic.

34:47 Wow.

34:48 Yeah, and I have not really even promoted it.

34:49 I've even sent an email for people who said they were interested in stuff like that.

34:53 Oh, you should totally plug it on the podcast.

34:56 Yeah, I've talked about it and talked by it on and this is the first time I've talked about it here.

35:01 I do want to just say it got posted on Hacker News and got really popular there.

35:05 And the first question was, how much of this book is written with AI?

35:08 I bet all of it.

35:09 Zero of it.

35:10 Zero of this book is written with AI.

35:11 I've put a ton of work into it.

35:13 It took me nine months.

35:14 It may or may not be amazing, but at least it's human, right?

35:18 So there you go.

35:19 Anyway, that's all out and people can check it out.

35:21 Books are a weird thing, right?

35:23 Like, I still love books.

35:25 It takes forever to write a book.

35:28 And maybe other people are really bad.

35:29 I mean, nine months is not bad.

35:31 I spent a year and a half on both editions of mine so far.

35:34 I would not spend a year and a half again.

35:37 And then you sell it for like $20.

35:39 It's a lot of value for $20.

35:42 Yeah, I think so.

35:43 Yeah, $19.

35:44 You can get it on Amazon or you can get it on Gumroad.

35:47 They're both DRM free.

35:49 So if you don't care, I don't know what to...

35:51 It's so weird.

35:52 I get three times more money for the same amount that you all pay if you get it on Gumroad.

35:58 But if you guys bought on Amazon, it boosts the rankings, which may help it.

36:02 I don't know what to tell people to do.

36:03 Get it wherever you want.

36:04 It's DRM free and enjoy it.

36:06 Awesome.

36:06 Yeah.

36:07 That's it for all my extras.

36:08 I think we're done then.

36:11 Oh, we need something funny.

36:12 We do need something funny.

36:13 And I think this is a little bit in the testing space.

36:16 So it might resonate with you, Brian.

36:17 It's not exactly in the testing space, but it's pretty darn close.

36:20 Here's the estimation.

36:23 How long will it take you to do this project?

36:25 So there's different views here.

36:28 The noob says, that'll take a day.

36:30 The junior, I estimate it'll take three days.

36:33 because she knows that the noob tried it for one day, and that was before they asked for the docs and the error handling.

36:38 That was the happy case in one day.

36:41 But you're not done in one day.

36:43 No, the senior dev says, that's an M-sized story.

36:46 Just makes me squirm a little bit hearing that.

36:49 Are you ready how the principal...

36:50 Oh, T-shirt sizes, right.

36:51 Yes, exactly.

36:52 The T-shirt size is extra small, small, medium.

36:55 But you ready for the pro, the principal engineer, the senior engineer one?

37:00 You guys give estimates of what is this?

37:04 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

37:15 if there's anything good in here irrelevant but i think that's it for the comments but i thought

37:19 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

37:33 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

38:12 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

39:11 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

39:39 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

39:54 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

40:19 the um i can come back and clean it up you will get that time will fill up and you won't be able

40:24 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


Want to go deeper? Check our projects