Hello and welcome to Python Bytes, where we deliver Python news and headlines directly
to your earbuds. This is episode 400. How about that? I'm Michael Kennedy.
And I'm Brian Okken.
And this episode is brought to you by Scout APM. Check them out. Links in the podcast player's
show notes are on the website, and we'll tell you more about them later. Connect with us over
on Mastodon. Links in the show notes. And hopefully you're watching us live now on Mondays. Usually
you can find out by going to pythonbytes.fm/live. And usually we have the next one
scheduled and you get notified about that. And for those of you who would like, even if you missed
the show, a quick digest, an artisanal handcrafted digest of all the things we talked about for the
week, just become a friend of the show, sign up for the newsletter, pythonbytes.fm, click on newsletter.
Well, before we get into the topics, officially, Brian, I think we got to say a little bit something
about 400. Yeah, it's quite a big number.
So big that you wore an amazing hat with a butterfly.
Yeah.
That's a cool hat. Well, I honestly, I want to start by saying one, thanks to you. Two,
thanks to the thousands and thousands of people who listen every week. Make this possible,
honestly. And I really, really appreciate it.
Yeah. Thanks to you too. Whatever year it was when we started, you reached out to me and said,
hey, well, do you feel like doing a podcast together? And I really wouldn't have thought
we would have been at 400 episodes. It's pretty cool.
I know. It's incredible. And I thought, well, we don't have really any guests or a lot of like,
you know, forum stuff. So let's celebrate this. I asked ChatGPT to say, I said, look,
there's this big milestone. Could you just give us a quick celebration sort of thing? And I think
there's a few things that are notable before I read this off. It's pretty short.
Okay. But I think it's notable that it knows about you, knows about me, knows about the show,
knows about what the show is about and the topics we've covered. So anyway, here we go. This is
ChatGPT celebrates episode 400 of Python Bytes. Welcome to the big 400 Pythonistas. It's hard to
believe we're celebrating the 400th episode of Python Bytes. From the early days of byte-sized
Python news to becoming the source of all things Python, it's been a wild ride. We've laughed over the
quirks, gasped at new libraries and said farewell to the GIL together. Whether you're
a seasoned developer, a curious learner, or just here for the witty banter, you've been an essential
part of this journey. To Michael and Brian, you've built a community that turns import this in more
than just Zen. It's a family of passionate Pythonistas. Your dedication, insight, and humor makes this show
more than just tech news. It's a weekly celebration of what we love about Python and why we keep coming
back for more. Here's to the next 400 episodes. May your code be bug-free, your test pass on the first
run, and your Python version. Always be up to date. Rocket snake emoji.
That's pretty good, isn't it? Actually.
Yeah, yeah. I'm touched. ChatGPT, I didn't know you loved me that much.
I know. Thank you, ChatGPT.
And Michael, that's just touching.
It is.
It's pretty cool, actually. I like that. Turn your,
turns import this into more than just Zen.
Indeed. I see some thank you out in the audience, and thank you, all you guys out there.
With that, shall we talk about whatever you want to talk about first?
Sure.
As we've done 399 other times, apparently.
Yeah. Let's talk about Python, specifically Python 3.13. It's just right around the corner.
The official release is scheduled for the 3.13.0. It's supposed to come out on October 1st. That's
just right around the corner. That's hard to believe. So 3.13.0 candidate release, or RC2,
is out. So that was released September 6th, a few days ago. And I'm linking to a, oh, I didn't link
to the right thing. But there is, oh, well, I'll just talk about it here. Anyway, it comes out October
1st. Lucas Lenga, which we will link to his post, has a post to talk about it as well. Also talks about
a few other releases. There's security releases for 3.12, 3.11, 3.10, 3.9, and 3.8. That's a lot
of releases. And an interesting thing about the older releases, I'll cover those first,
is that 3.12 has a Mac release. It has binary releases. And the Mac release is only for 10.13
or newer. If you've kept up to date fairly recently, it should be fine. Because I looked at mine and it
was way past that. But there are limits to the macOS binary version. And all the others, like 3.11
3.11 through 3.8, they don't have binary distributions built, which is interesting.
But anyway, so what we're really excited about is 3.13. Of course, it's coming out right around the
corner. There's a call to action here that is a strong encouragement for third-party Python projects
and maintainers of third-party projects to prepare your projects. Because people will be upgrading in
October because all the last upgrades have been so easy, people are going to upgrade. So make sure your
your projects are ready. Go ahead and start testing on them. And if there's any issues,
submit to the bug tracker. And then also, please keep in mind that the RC2 is a preview release.
So it's close to the final release, but it's not recommended for production environments. So yes,
test with it. Don't run in production yet. So that's cool. The one thing that I thought was
interesting. So I've kind of migrated. We talked about this recently is upgrading your local Python
Python with uv Python. You can't use that for 3.13. So you still have to use python.org or some
other mechanism to install 3.13. You can't do that through uv Python yet.
Yet. Yeah. Actually, one of my items touches on that. So we'll talk about that shortly.
Okay. So yeah. Yay. I'm excited. Yay. Henry's running around in the audience says,
we're also going to have to change building wheels with 3.12 to be 10.13 plus and see how build
wheels. Interesting. You know, you think about the cascading effects of all these requirements,
you know, and 10.13 being the macOS version. Yeah. Was that, was that when they split and
didn't like the Intel versus whatever the other thing is, or. I think it may have been, but the
current version does support the Intel ones. I'm pretty sure it's just, well, as of today,
they're supposed to announce a lot of that Apple's, Apple intelligence, their AI. Oh boy. So that I
believe is going to be one of the hard splits as well as like that stuff. I don't think it's going
to work on Intel, but we'll see what they say. Okay. I think that's literally going on right now.
As we speak the Apple keynote thing, which is a weird one hour ad that people look forward to.
Okay. Such is the world we live in. All right. Let's carry on with a pretty sweet transition
from uv to talking more uv here. So I wrote up, you know, we've been talking about uv recently and I
couple of different, there's a kind of a little mini extra, extra, extra all around one topic. So
I wrote up an article about how I'm using the uv Python thing that you just mentioned, Brian,
using that to basically dramatically improve how we build Docker images. One of which runs or
several of which I guess run Python bytes, Python bytes set of M gives you the RSS feed, the files,
all that kind of stuff. Right. Yeah. So people can check that out, but the short and long of it is
if you get down to the bottom one, it comes with an example, a little flask app, multi, multi-tier,
well, multi-image, not multi-tier flask app that shows how to go from basic Ubuntu image to having
whatever version of Python you want with the virtual environment set up on it, including setting up
your dependencies and a web server and all of that in seven seconds from nothing like a dash,
dash, no cash style, a build. And that gives you a base image. You can just kind of keep chilling.
And then if you depend, you take an app and you build it on top of that, like a flask app or some
other kind of Python app, I got it building around seven to eight, 700 to 800 milliseconds. So less than
a second, which is awesome. Hey, so, you know, we talked about this back on 396 and 398. And we've been
kind of hitting a lot, but I just recently had Charlie Marsh from astral on, and we talked about
this and I asked him things like, so I see you don't have the, it didn't have the latest 312 for
a couple of days. And, I noticed that you don't have a 313 and basically his thinking. I,
if I remember it correctly is more or less, we plan on supporting a version before it becomes final,
before it becomes stable and gets released. So by the time 313 gold, gold master, right?
Whatever it comes after the official 313 zero release, I guess comes out. It should be available
in UV, but I'm not sure how much before then.
Yeah. Well, and we also heard from, so Henry Schreiner says 313 just got merged in, in the same
place, which is, which is that Python built standalone. Also the 313 T is now in a PR.
So it, Oh, interesting. We should free threaded version. Yeah. So hopefully, yeah, I think,
and that was my final thing to point out is if people are like, well, okay, when I say uv Python
or what I actually, I don't say uv Python necessarily. What I do is I create a virtual environment with UV
and I just, I want it. I tell it, I wanted this version of Python. Oh, okay. Right. And it goes,
Oh, you want that version of Python? Either we've already cached it or if we don't, we'll just download
it from Python build standalone and then put it there for you. So if your common working artifact
is a virtual environment, then you don't have to necessarily have, it doesn't even matter if you
have system Python, like literally you could not have Python on your machine and this would still
get you a virtual environment with the right version of Python that you ask. But the source of all this
also, I learned about this from talking to Charlie last week is, Python build standalone. If you look
at the releases and like, let's see, for example, on the latest release, there's 773 different builds.
There's something. Wow. Look at that. So you can see here, there's cPython 3, 10, 14 with something
on x86, 64, four PCs on windows with this thing. You know, there's just so many variations. So basically
when you say uv create me a virtual environment with this Python, it's going to go on through those 773,
find the one that's the right bit and just download it and put it there if it's not already cached.
So anyway, that's the whole story. Okay. Okay. So that thing has that, that one thing has,
has a, 3, 13. It just hasn't been released yet then. So, or I guess we're waiting on that release.
Yeah. So, so thank you, Henry. That, that, gives us some more information. I imagine that it's really
down to just what Python build standalone is doing. And then uv just give me the list of options and,
and let me find things that, you know, match this operating system. Something like that.
Well, it sounds like both of us went down the same rabbit hole, but it is kind of neat to find out
where the source of this is so that I know that wasn't that hidden, but it did take a little bit of
looking to figure out. Yeah. Well, they could have been building
it themselves. You don't know right now. Like you don't know what setting it. There's all sorts of stuff
that's interesting. And there's also, I recall correctly, Charlie said there are different
build optimization settings for Python build standalone, then say what you get off of python.org
or out of homebrew. It's, it's interesting. For example, like profile guided optimizations and things
like that. And I don't remember which had, which, which is better, but I feel like the build standalone
came out pretty strong there. Yeah. Before we move on, Brian, let me tell you real quick about
scout APM. They're big supporters of Python bytes. So we appreciate that very much. So if you are tired
of spending hours trying to find the root cause of issues impacting your performance, then you owe it
to yourself to check out scout APM. They're a leading Python application performance monitoring tool,
APM, that helps you identify and solve performance abnormalities faster and easier. Scout APM ties
bottlenecks such as memory leaks, slow database queries, background jobs, and the dreaded N+1 queries
that you can end up if you do lazy loading in your ORM. And then you say, oh no, why is it so slow?
Why are you doing 200 database queries for what should be one? So you can find out things like that.
And it links it back directly to source code. So you can spend less time in the debugger and
healing logs and just finding the problems and moving on. And you'll love it because it's built
for developers by developers. It makes it easy to get set up. Seriously, you can do it in less than
four minutes. So that's awesome. And the best part is the pricing is straightforward. You only pay for the
data that you use with no hidden overage fees or per seat pricing. And I just learned this, Brian. They also have,
they provide the pro version for free to all open source projects. So if you're an open source
maintainer and you want to have scout APM for that project, just shoot them a message or something on
their pricing page about that. So you can start your free trial and get instant insights today. Visit
fm.com/scout. The link is in your podcast player show notes as well. And please use that link. Don't
just search for them because otherwise they don't think you came from us and then they'd stop supporting
the show. So please use our link by them by set of him slash scout. Check them out. It really supports
the show. All right. Over to you. Cool. Cool. I wanted to talk about read the docs for a little bit. So
it just seems like, you know, read the docs been around forever, right?
Yeah. So, so there's an article by Eric culture, 10 years of sustainable open source. And it's a,
it's a little bit of some, some cool history here. so one, I, we totally rely on, read the docs,
um, and, and the, all the tools around it. So read the docs apparently started in a, with a 40 hour,
48 hour open source sprint in 2010, 48 hours. Wow. So two days, I guess, and it grew to become a
successful part of the Python, Python ecosystem and other, open source projects. And, yeah,
obviously it's just been around 2010. but I guess that's, that's about the time that I really started,
uh, jumping in and being part of the Python community and not just part of just a user of
Python, but, but part of the community. So, so that's why it looks like, it seems like it's
been there forever for me. and in 2014 they created read. So read the docs.org is the open source
thing. Read the docs.com, com was the, is in 2014 and there's links to the announcements from
2010 for announcing read the docs and the announcement for, read, read the docs for
business, the.com. So this is kind of an interesting story about how to make a, a, a service that, that helps,
open source communities all over the place, and how to make that sustainable. So they're still
sustainable, which is cool. So what is the sustainability model? How do they do that? Because there's, there's four full-time
people working on this, which is not that big. I mean, four people, there's probably a lot of, volunteer
volunteers on the open source site also. but for full-time people, that's pretty cool. Anyway, there's, the.org
side has, single non-tracking ads. And I think they were one of the first that I was aware of that did, did like a single,
just like ethic ad ethical ads or something that just had ads, but it wasn't tracking you at all,
which is how ads should be, I think. and I, I'm totally okay with that to help them sustain their
model. And then the.com is a paid service that helps companies for private repos and additional,
they have other benefits also, but sort of read the docs for companies. and then it also talks about
things that didn't work, which I love this. I love the discussing the parts that didn't work.
I like, have you tried this? one of the things was, just trying on trying, donations and
other optional support, and it just didn't work at all. That left people with, mental health issues
and burnout. This is, that's terrible. the other thing was, consulting services where you
think about that, like maybe offer services for people that to pay, but, the bad downside of
that was it took away from, time that they wanted to work on the main project. they
experimented with grant funding and that was cool. Cause they got some, like a blob of money at a time,
but it's a one-time thing and it's not that easy to keep going and getting more grants. So the current
model is the paid service plus the advertising. And, that's cool. they talk about some lessons
learned, which is neat. basically, you don't get extra points for being bootstrapped.
Uh, people will compare you to VC funded companies anyway, which is it's, it's cool that they call it
out because that's obvious, but also sometimes not obvious. even if you're community driven,
bootstrapped, you don't get any points for that. We, we still expect you to be perfect. the other
thing was, that keeping trust in the community was the most important thing. and, yeah,
it, they said it's cliche, but trust is hard to earn and easy to lose. definitely. and they,
they can't, can't maximize profits. unless you keep trusting the, with the community, which,
definitely, support that. the, the one part that I thought was one of the reasons why I
highlighted this is because this is a lesson I think that can go, not just for people trying to sustain a,
uh, funding model, but just, lots of open source projects can, can listen to this.
And the lesson is contribution is easier in less complex parts of the code base.
So they've noticed that they've got, they've got their core stuff, the read the docs.org repo,
uh, the core stuff that is got some complex stuff in it and it's hard to get people to help out,
but there's other things like contributions to this Sphinx theme or extensions or small Python or
JavaScript projects that are work alongside of it that are easier to get people to contribute to.
Cause they're, they're smaller, less, I guess, less complicated bits of code. I think a lot of
open source projects probably could do something like that of separating out whether the code is and say,
if you'd like to contribute, maybe don't touch this part. Cause it's kind of hairy and you might,
it takes a while to get into, you can, but it's going to be difficult. and,
I've noticed that with lots of projects. So anyway, congratulations to all of them for 10 years.
That's awesome. And, and then I was reading something and I found, I learned something is that
there's, there's, I kind of associate read the docs with Sphinx only, but that's not true. there is
now, there was a, effort to separate some of the customization and they have a different build process
going on now and you can, the Sphinx or the read the docs build system now supports any
documentation tool or it should, which I didn't know about. So that's, yeah, that's cool.
Almost like a general static site platform. Probably. Yeah. Yeah. Anyway. Yeah. Congratulations.
It's a pretty important section of the Python community and also got some cool Python,
some Portland ties as well, which is cool. Yeah. Yeah. Really helps humanize the Python space.
Wouldn't you say Brian? Yeah. Which is what I want to talk about next. This project by Hugo. I know you've
pointed this out before Brian, I believe I can actually get to him. There we go. Hugo van Kenamande,
CPython core developer and mini, mini project maintainer. One of projects is humanize. And I recently,
when I've written this codes for in ice and, you know, small scale before, because I kind of needed it.
And if I knew about this, I just wouldn't, but also I recently just started using it and it's super
simple, super easy to adopt. You see examples of it right here on the GitHub screen. If you visit their
GitHub repo, right. And see where it says seven months ago, last week, last year, that kind of stuff,
instead of just putting a date. Yeah. It's that kind of stuff that humanize does, but for different
things. So if I go over to, I love all these ties from falling on from you, from read the docs. If I go over to
read the docs for them and I wait apparently and it comes up. Okay. So then they basically have four
areas that are relevant. It works in different languages, many, many different languages, which
is cool. It mostly works in numbers, but as I pointed out, it also works on time. So if we look at time,
it has a natural date. Some of these don't have great examples. For example, the time and file size could
have really nice dates. So the one I mentioned with the GitHub is natural delta. It would say things like
a year ago or two years ago, or in 13 seconds, stuff like that. It has a similar natural time
and precise deltas. If you want those kinds of things also as for file size. So it'll say things like 300
bytes, 3.0 megabytes, 2.9 kilobytes or whatever. Right. So you can just give it a number and tell
it, you know, here's how many bytes it is. Make this friendly and it'll kind of figure out the right
scales, a megabyte, kilobyte. You don't want 0.000 megabytes. You just want, you know,
switch that to kilobytes or bytes. Right. So file size is cool. But the one that has tons of stuff going on
is number. So you can have an associated press style number. I guess this must be the way they're
a convention when you're writing articles on how to speak about numbers. So if it's a small number, use
written out words like F I V E for five. But if it's, you know, one zero zero one two one seven, you don't
you don't write that out as a huge long thing. You just put the straight number. Right. So I think the cutoff is
10, which is pretty cool. It has clamp. And so you can talk about percentiles. For example,
if you say a really, really small number and you say the floor is 0.01%, it'll, or just that number
as a ratio, it'll say the number that you have for this, the value is less than 0.01. Oh, nice. Or you
can do it as a percent here. And then you can say this one, this particular value is greater than 99%, or it's
in the top 10%, or you can just say like under 1 million, which is pretty awesome. Right?
Yeah. Yeah. So what else have we got here? Fractional. So this just takes, you know,
floating point numbers and puts them into fractions like one and three tenths or one and a third or
something like that into comma, this one I would just do with formatting, but you can have it put commas
in for separators into word. This one is really nice. So if I have one with seven zeros, it'll say 1.0 million.
Or if you put in 1.2 billion, but as like integers, it'll just say 1.2 billion or all kinds of things.
You give it precisions, et cetera. Nice. Right? It's very cool. I like that the scientific stuff.
The scientific is good. The metric is really nice. If you give it a base measurement, like Watts or
grams or something, and then you say, give me this number in that unit system. So for example,
if you save 1500 in terms of volts, it'll give you 1.5 kilovolts. That's pretty fancy. Yeah. Or
Watts and you give it some huge number or say this many megawatts or really, really small one micro.
I don't know what F is in metric because to me that's Fahrenheit. So whatever.
Yeah.
And the micro stuff is cool. Cause I always have to hunt it down. I have no idea how to type a micro symbol.
Yeah. So click to the scientific one or the 10 to the powers are pretty cool. The 10 to the minus one
with a little superscript. That's neat. Yeah. Yeah. Instead of having 10 E three, it actually has 10
superscript three. So a thousand is one times 10 to the three with actual three. Like you would write it,
not the way computers have to write it. So yeah, it's really nice. Anyway, it's just, if you need this kind
of stuff really easy to adopt and understand, if not, then you know, it's still interesting. However,
if someone is out there looking to contribute to this project, I would say more examples.
The numbers have awesome examples and all the other ones are kind of, you may or may not even know what
it's going to do. So, Hey, put together some examples as a PR and ship them over to you guys.
That'd be cool.
And you know, documentation contributions are usually very welcome.
So, so yes, indeed. All right. Extras, Brian.
I just have one extra. I wanted to shout out. So I talked about that. I thought test podcast is going
to go back to testing code, even though. So it is. So I finally finished that migration and actually put
out an episode. So 222 is the 222 is the second episode of a two part series that started in June.
Sorry.
Serious cliffhanger, serious cliffhanger. So, yeah, this, so that's there. And then I got
a question. I sent out an email and said, Hey, finally have another episode out. And somebody said,
you should do transcripts. And, I guess I hadn't announced that, but transcripts are there.
Um, I've had transcripts in the last, I don't know, like the last 30 episodes or something. So,
transcripts are AI generated. So they're not perfect. Like this is great. I gotta find one of these,
uh, DB dot PI. That's fine. But there's like some, some dot pies that show up as dot PI and some dot
E I E is some, dot DB, like actually spelling out the DOT. This is terrible. Oh, API dot P I E.
This is hilarious. So, I could go through and try to fix this stuff. but I'm going to probably
try to hire my kid to go do it for me. but anyway, so they're there. That's all I wanted to say is
it's in it. I'm not doing this weekly. I actually talked to, to a friend of mine, Michael
Kennedy. and he said, he said, it'd be kind of cool to, to do seasons. And so I'm kicking
around the idea of doing seasons. Yeah. Well, themes. I like it. I think it'd be great. Yeah.
Anyway, that's just my extra. Awesome. I have a couple of quick, code in the castle event is
almost over and it's almost, booked and happening. So if you want to be part of it,
I'll put a link in there, please. last kind of last call. So check that out. Yeah, I know.
All right. We got some interesting email. That's it. I think I covered the Anaconda code plugin for
Excel, how it runs locally. It runs on PI script, all these good things. Cause you other features. Well,
um, look who sent this in. I want to make sure I give some credits. This was by
rude Vanderham. Thank you for sending this in the sub project created. And basically when you have these
Excel, Python bits of code, you have to write all the code in one function and things like that. And
there's other limitations as well. So basically he made it so you can have a lot more,
or formatting variability, I suppose. And then you just have this bit of code that will just run a
whole set of different bits of code that you can have into your workbook, which is kind of interesting.
So as a follow to that, people are interested, they can check that out and just a quick out shout out to
iStats menu. Do you iStats menu, Brian, for your Mac? No, if you want a real time stats for what your Mac is
up to as they just released a new version looks super cool. I'm just starting to play with it. So obvious
things like CPU and stuff. But if you hover over them, it'll give you tons of detail. Like macOS
is kind of hard to get a lot of these pieces of information, but it'll have uptime. It'll have
like how much power your CPU is pulling out of, or your computer's pulling out of the wall, which is
kind of interesting as a, you know, how hard is it working? Like how many Watts is it pulling? And so
anyway, that's cool. That's cool. Yeah. People can check it out. It's pretty nice. Nice. Yeah. That's it. And you want to close it out with a joke.
Aren't big episode 400? Definitely. All right. This is sort of in the theme of I'm learning
new programming languages, right? Mostly as beginners says, comes from dev humor says, beginner programmers,
when they learn a new programming language, just a shock. Is this Morty? I don't know. I think so.
Anyway. Well, that just sounds like Python with extra steps.
Yeah. Yeah, exactly. Exactly. That's cool. But why all the stuff there? Anyway, thanks for episode
400. Thank you everyone for listening. Thank you, Scott APM for supporting the show. Check them out as well.
Thank you. Yep. See you, Brian. Bye.