WEBVTT

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

00:00:06.380 --> 00:00:11.500
This is episode 404, recorded October 7th, 2024.

00:00:11.500 --> 00:00:12.860
I'm Michael Kennedy.

00:00:12.860 --> 00:00:14.040
And I'm Brian Okken.

00:00:14.040 --> 00:00:17.220
And this episode is brought to you by Scout APM.

00:00:17.220 --> 00:00:18.980
We will, of course, tell you more about them later.

00:00:18.980 --> 00:00:21.960
The link is in the podcast player show notes right at the top.

00:00:21.960 --> 00:00:27.720
Brian, I've been looking for this episode for a while and I just can't find it, man.

00:00:27.720 --> 00:00:29.500
I was like, where do I go?

00:00:30.220 --> 00:00:30.620
404.

00:00:30.620 --> 00:00:31.820
Everywhere I go, it's 404.

00:00:31.820 --> 00:00:32.780
What's going on?

00:00:32.780 --> 00:00:35.600
Yeah, I don't know.

00:00:35.600 --> 00:00:37.280
We'll find it.

00:00:37.280 --> 00:00:38.440
Let's make it.

00:00:38.440 --> 00:00:39.920
It's going to be a journey.

00:00:39.920 --> 00:00:41.940
We're going to try to get our way through it.

00:00:41.940 --> 00:00:46.240
Speaking of a journey, you want to stay in touch with us, hit by them by Scout APM.

00:00:46.240 --> 00:00:47.000
Click on newsletter.

00:00:47.000 --> 00:00:48.140
Enter your info there.

00:00:48.140 --> 00:00:49.360
We'll keep you up to date.

00:00:49.360 --> 00:00:50.720
Brian will send you some show notes.

00:00:50.720 --> 00:00:54.560
Find us on Mastodon and other social places.

00:00:54.560 --> 00:00:58.080
And even subscribe right here on YouTube if you're watching the video.

00:00:58.500 --> 00:01:03.040
And with that, were you able to find an item for your first item today?

00:01:03.040 --> 00:01:04.780
Well, I almost did it.

00:01:04.780 --> 00:01:05.900
So, okay.

00:01:05.900 --> 00:01:09.220
The first item, I really wanted to cover Python 3.13.

00:01:09.620 --> 00:01:13.580
Because Python 3.13 is released on October 7th.

00:01:13.580 --> 00:01:16.480
And today is, text notes, October 7th.

00:01:16.480 --> 00:01:18.100
So, it's today, right?

00:01:18.100 --> 00:01:24.840
So, I went to python.org and go, well, the latest, it still says latest is 3.12.

00:01:24.840 --> 00:01:26.180
So, they're working on it.

00:01:26.180 --> 00:01:27.240
Thomas Wooters and others.

00:01:27.620 --> 00:01:29.200
It's a process to get it out.

00:01:29.200 --> 00:01:30.480
But it's really out already.

00:01:30.480 --> 00:01:31.640
So, you just can't see it.

00:01:31.640 --> 00:01:33.920
If you go to downloads, it still says 3.12.

00:01:33.920 --> 00:01:35.480
I'm sure it'll be updated soon.

00:01:35.480 --> 00:01:39.120
However, we've got the link for 3.13.0.

00:01:39.120 --> 00:01:40.700
It's really not that complicated.

00:01:40.700 --> 00:01:44.560
Downloads, release, python-3.1.3.0.

00:01:45.320 --> 00:01:46.820
And then you got it.

00:01:46.820 --> 00:01:49.820
So, it's got a stable release of 3.13.0.

00:01:49.820 --> 00:01:53.140
I've been playing with it this morning and having a lot of fun.

00:01:53.140 --> 00:01:57.640
If you go down to the bottom of this link, there's where the installers are.

00:01:57.640 --> 00:02:00.480
The pre-built installers, if you want to grab those.

00:02:00.480 --> 00:02:02.480
Or you can install it yourself if you want.

00:02:02.480 --> 00:02:03.620
Or build it yourself.

00:02:03.620 --> 00:02:05.580
But I'm on a Mac right now.

00:02:05.580 --> 00:02:07.060
So, I grabbed the Mac installer.

00:02:07.060 --> 00:02:11.160
And I want to cover some of the new stuff in 3.13.

00:02:11.160 --> 00:02:14.840
But I really wanted to play with the multi-threading stuff, which I haven't yet.

00:02:14.960 --> 00:02:16.940
I just wanted to make sure it was enabled.

00:02:16.940 --> 00:02:18.220
And there's a bit of a trick.

00:02:18.220 --> 00:02:20.320
So, if you look in...

00:02:20.320 --> 00:02:22.300
Maybe it's not in here.

00:02:22.300 --> 00:02:23.540
It's in the What's New page.

00:02:23.540 --> 00:02:30.640
So, if you go to the What's New, it does talk about the Python, the macOS, and Windows installers.

00:02:30.640 --> 00:02:32.700
And there's a link somewhere in here.

00:02:32.700 --> 00:02:35.160
But we'll include the link also.

00:02:35.160 --> 00:02:41.820
That when you're installing it, and on the Mac, when I did it, you go through this install process.

00:02:41.820 --> 00:02:46.180
You have to hit customize and click the free-threaded.

00:02:46.180 --> 00:02:49.340
Because free-threading is off by default.

00:02:49.340 --> 00:02:51.740
So, when you install it, you have to turn it on.

00:02:51.740 --> 00:02:53.720
So, just remember that.

00:02:53.720 --> 00:02:56.740
And I will play with the free-threading later.

00:02:56.740 --> 00:02:59.040
So, what do we have new in 3.13?

00:02:59.040 --> 00:03:00.620
I think we've covered this before.

00:03:00.620 --> 00:03:02.600
But now we actually have 3.13.

00:03:02.600 --> 00:03:03.480
So, we can play with it.

00:03:04.160 --> 00:03:08.100
We have the interactive interpreter changes, which...

00:03:08.100 --> 00:03:09.680
Actually, let's back up a little bit.

00:03:09.680 --> 00:03:11.280
This isn't even called out here.

00:03:11.280 --> 00:03:14.600
My favorite feature of 3.13 is exit.

00:03:14.600 --> 00:03:17.340
Oh, I guess it is here.

00:03:17.340 --> 00:03:21.860
Direct REPL support for help, exit, and quit.

00:03:21.860 --> 00:03:23.580
And thank you.

00:03:23.580 --> 00:03:23.980
Thank you.

00:03:23.980 --> 00:03:24.360
Thank you.

00:03:24.360 --> 00:03:24.360
Thank you.

00:03:24.360 --> 00:03:25.240
Whoever worked on this.

00:03:25.240 --> 00:03:28.180
Because it used to say, oh, did you mean to exit out?

00:03:28.180 --> 00:03:31.860
You have to type exit with the parans or quit with the parans.

00:03:31.860 --> 00:03:35.120
And if you know what I want to do, just do it.

00:03:35.120 --> 00:03:36.500
So, you know what it does.

00:03:36.500 --> 00:03:36.960
It's really cool.

00:03:36.960 --> 00:03:41.920
I can imagine somebody was like, well, what if we have a variable named exit and you want

00:03:41.920 --> 00:03:42.720
to see its value?

00:03:42.720 --> 00:03:45.180
But if there's no variable defined, just quit.

00:03:45.180 --> 00:03:45.880
I love it.

00:03:46.840 --> 00:03:49.380
So, exit and quit now work.

00:03:49.380 --> 00:03:50.700
I didn't know quit worked.

00:03:50.700 --> 00:03:51.280
That's neat.

00:03:51.280 --> 00:03:57.160
So, the other couple things in interactive, there's a lot of stuff in the interactive REPL

00:03:57.160 --> 00:03:58.300
that's changed.

00:03:58.300 --> 00:04:00.240
Multi-line editing, amazing.

00:04:00.240 --> 00:04:05.520
So, you type in a multi-line thing and you get the three dots, which is great.

00:04:05.520 --> 00:04:10.880
But when you want to go and type something wrong and you want to go change that, now you

00:04:10.880 --> 00:04:14.900
can go back and you can just hit the up arrow and it works.

00:04:14.900 --> 00:04:16.160
It's great.

00:04:16.520 --> 00:04:17.640
So, I'm really enjoying that.

00:04:17.640 --> 00:04:20.580
There's F1 for command history.

00:04:20.580 --> 00:04:26.440
History is, we've had history before, but now if you exit and then start the REPL again,

00:04:26.440 --> 00:04:27.740
history is still there.

00:04:27.740 --> 00:04:29.920
It preserves all of your history from the session.

00:04:29.920 --> 00:04:30.320
Oh, that's nice.

00:04:30.320 --> 00:04:33.660
Super nice for when you're debugging something, trying it out.

00:04:33.660 --> 00:04:35.620
And the colors are amazing.

00:04:35.620 --> 00:04:37.820
So, they've turned on colors by default.

00:04:37.820 --> 00:04:40.160
So, in prompts and tracebacks.

00:04:40.160 --> 00:04:43.680
So, even just having the little prompt be in a color, it's nice.

00:04:43.680 --> 00:04:44.480
It helps.

00:04:44.480 --> 00:04:45.600
So, love that.

00:04:45.840 --> 00:04:47.460
We've also got improved error messages.

00:04:47.460 --> 00:04:53.480
Like, before, if you named, like, random is built in, one of the built-in things.

00:04:53.480 --> 00:04:56.540
But if you named a module named random, it would just mess up.

00:04:56.540 --> 00:05:01.100
And it would, like, it would say stuff like, you know, module random has no attribute.

00:05:01.620 --> 00:05:08.200
But now it says, hey, you've already considered renaming your own module something else because you're messing up.

00:05:08.200 --> 00:05:09.900
So, if you rename them.

00:05:09.900 --> 00:05:20.300
If you name a module or a script, the same thing as a built-in or now as one of your installed third-party libraries, Python will tell you that you've messed up, which is nice.

00:05:20.720 --> 00:05:22.440
There's other improvements, too.

00:05:22.440 --> 00:05:30.800
Like, if you misspell a keyword argument, it will suggest that maybe you had the correct spelling.

00:05:30.800 --> 00:05:31.800
It will suggest that.

00:05:31.800 --> 00:05:32.820
That's pretty cool.

00:05:32.820 --> 00:05:35.460
And then, of course, there's lots of changes in 3.13.

00:05:35.460 --> 00:05:37.920
But the REPL, I'm excited about.

00:05:37.920 --> 00:05:41.800
I'm also excited about the error messages and free-threaded Python.

00:05:42.080 --> 00:05:43.480
So, there's a lot of other stuff, too.

00:05:43.480 --> 00:05:45.240
So, check out the What's New.

00:05:45.240 --> 00:05:48.840
But I really am looking forward to playing with the free-threading.

00:05:48.840 --> 00:05:50.120
Yeah, this is amazing.

00:05:50.120 --> 00:05:51.600
I'm really excited to see this here.

00:05:51.600 --> 00:05:54.520
I actually can't believe that free-threaded Python is a thing.

00:05:54.520 --> 00:05:55.220
I know.

00:05:55.220 --> 00:05:56.040
It's like.

00:05:56.040 --> 00:05:56.920
It's been so long.

00:05:56.920 --> 00:05:58.060
The journey's been so long.

00:05:58.060 --> 00:06:01.300
I mean, I was walking this morning and I saw a pig flying through the sky.

00:06:01.300 --> 00:06:07.800
It had imported free-threaded Python, rather than imported anti-gravity.

00:06:07.800 --> 00:06:08.380
That's what it did.

00:06:08.380 --> 00:06:09.020
Yes.

00:06:09.020 --> 00:06:09.420
Yeah.

00:06:09.700 --> 00:06:14.740
So, I know that a lot of people have worked a lot, long and hard, to make that work.

00:06:14.740 --> 00:06:16.000
So, I'm looking forward to it.

00:06:16.000 --> 00:06:19.480
Now, free-threading is still officially experimental.

00:06:19.480 --> 00:06:22.660
So, I don't know what that means.

00:06:22.660 --> 00:06:23.860
If they're going to take it back from.

00:06:23.860 --> 00:06:25.780
Please don't take it away from us.

00:06:25.780 --> 00:06:26.820
But we'll see.

00:06:26.820 --> 00:06:27.260
Yeah.

00:06:27.260 --> 00:06:31.180
The original PEP that got it accepted, 703 or something like that, said,

00:06:31.180 --> 00:06:32.800
we are allowing this in.

00:06:32.800 --> 00:06:35.140
But if it causes too much trouble, we're taking it back out.

00:06:35.140 --> 00:06:36.700
Which I've never seen in a PEP.

00:06:36.700 --> 00:06:37.580
Maybe it's happened before.

00:06:37.580 --> 00:06:38.420
But we approve it.

00:06:38.600 --> 00:06:40.020
But we might unapprove it.

00:06:40.020 --> 00:06:41.500
Might unapprove it.

00:06:41.500 --> 00:06:43.180
We'll turn this car around.

00:06:43.180 --> 00:06:45.380
If you keep fighting, we'll turn it around.

00:06:45.380 --> 00:06:45.900
Yeah.

00:06:45.900 --> 00:06:46.740
That's right.

00:06:46.740 --> 00:06:47.840
Don't make me turn this car.

00:06:47.840 --> 00:06:48.740
Don't make me pull over.

00:06:48.740 --> 00:06:54.300
Speaking of pulling over, this was supposed to be out a week ago, Brian.

00:06:54.300 --> 00:06:54.800
Yeah.

00:06:54.800 --> 00:06:55.240
Yeah.

00:06:55.420 --> 00:07:03.300
And apparently, it was pushed back due to performance issues or some kind of issue with the incremental GC.

00:07:03.300 --> 00:07:03.980
Right.

00:07:04.160 --> 00:07:08.580
And I'll put the Python, the discuss.python.org link in my extras.

00:07:08.580 --> 00:07:10.760
But I'm not going to cover it separately.

00:07:10.760 --> 00:07:12.380
But it's kind of irrelevant.

00:07:12.380 --> 00:07:13.160
Things are out now.

00:07:13.160 --> 00:07:14.160
But yeah.

00:07:14.160 --> 00:07:14.700
Very cool.

00:07:14.700 --> 00:07:15.180
All right.

00:07:15.180 --> 00:07:16.800
Well, what do you got for us next, Python?

00:07:16.800 --> 00:07:17.240
Michael?

00:07:17.360 --> 00:07:22.860
Well, let's stick with some core language topics and stuff like that.

00:07:22.860 --> 00:07:30.400
I want to talk about PyPI bandwidth and PEP 759 external wheel hosting.

00:07:30.660 --> 00:07:37.700
So right now, when you pip install, uv pip install, whatever, you go to get something and you,

00:07:37.700 --> 00:07:44.020
as a publisher of a package like Flask, you send that to pypi.org, maybe as a wheel, maybe

00:07:44.020 --> 00:07:48.080
as a multi-platform variations of different wheels, if it's got to compile differently or

00:07:48.080 --> 00:07:48.320
something.

00:07:48.320 --> 00:07:51.620
And then people pip install that and it downloads from there.

00:07:51.620 --> 00:07:54.520
That results in an insane amount of traffic.

00:07:54.520 --> 00:07:57.840
I actually want to talk a little bit more about that later in general.

00:07:57.840 --> 00:07:59.660
But it's an insane amount of traffic.

00:07:59.880 --> 00:08:05.920
Over 66 petabytes a month, which is six-figure level of bandwidth costs.

00:08:05.920 --> 00:08:13.880
And luckily, Fastly, the CDN company, is basically donating all that bandwidth at reasonably high

00:08:13.880 --> 00:08:14.640
expense for them.

00:08:14.640 --> 00:08:18.900
Probably not the same as retail, but whatever wholesale that is in bandwidth, I'm sure it's

00:08:18.900 --> 00:08:19.320
still a lot.

00:08:19.320 --> 00:08:25.560
And they announced a five-year plan or five-year commitment to the PSF to do that at PyCon.

00:08:25.560 --> 00:08:26.100
All right.

00:08:26.100 --> 00:08:27.380
They're on the big keynote stage.

00:08:27.380 --> 00:08:28.040
That was nice.

00:08:28.040 --> 00:08:29.040
Thank you, Fastly.

00:08:29.100 --> 00:08:33.560
However, there's still problems with this, even though they're covering it.

00:08:33.560 --> 00:08:35.640
What if Fastly changes their mind eventually?

00:08:35.640 --> 00:08:43.840
But more importantly, there's hard limits on how large your project's overall usage on

00:08:43.840 --> 00:08:45.100
pypi.org can be.

00:08:45.100 --> 00:08:49.340
It gets no individual package can be bigger than 100 megs.

00:08:49.400 --> 00:08:55.220
You can't have 10 gigs total across all platforms, across all releases, things like that, right?

00:08:55.220 --> 00:08:57.760
You can't apply for exceptions, but it's not great.

00:08:57.760 --> 00:09:02.120
What if you could just say, here's my wheel, but when you actually download it, download it

00:09:02.120 --> 00:09:02.680
from over there.

00:09:02.680 --> 00:09:06.620
Download it off of Microsoft.com if it's a Microsoft package.

00:09:06.860 --> 00:09:13.080
Or download it off of explosion.ai if it's some sort of spaCy package.

00:09:13.080 --> 00:09:14.580
Those things have to be quite large.

00:09:14.580 --> 00:09:16.280
A lot of their models that you pip install.

00:09:16.280 --> 00:09:19.720
I think they have to get an exception to be even uploaded in the first place.

00:09:19.720 --> 00:09:20.080
All right.

00:09:20.080 --> 00:09:20.960
So that's what this is about.

00:09:20.960 --> 00:09:21.740
It's by Barry Warsaw.

00:09:21.740 --> 00:09:22.680
Ethan Smith.

00:09:22.680 --> 00:09:29.500
Delegate is Donald Stufft, who is a person largely behind the rewrite of pypi.org.

00:09:29.500 --> 00:09:31.140
So here's the deal.

00:09:31.140 --> 00:09:38.620
Brian, if you had a wheel, which is the metadata about a package and all of its binary details

00:09:38.620 --> 00:09:44.500
and its source code and all that, and you ripped off a lot of the wheel stuff, like the binary

00:09:44.500 --> 00:09:46.220
bits, what would you be left with?

00:09:46.220 --> 00:09:46.720
I don't know.

00:09:46.720 --> 00:09:47.320
A rim.

00:09:47.320 --> 00:09:49.620
A wheel rim, you know?

00:09:49.620 --> 00:09:50.200
Oh.

00:09:50.200 --> 00:09:57.640
So this PEP literally defines a new package format called a rim file.

00:09:58.020 --> 00:10:00.280
And the rim file is basically the wheel without the binary.

00:10:00.280 --> 00:10:02.800
Instead, it's got a URL to where the binary lives.

00:10:02.800 --> 00:10:07.960
And a checksum of the binary, which may already be there anyway, but it's left in the rim file,

00:10:07.960 --> 00:10:09.280
if not added to it.

00:10:09.280 --> 00:10:09.560
Okay.

00:10:09.560 --> 00:10:10.160
Interesting.

00:10:10.160 --> 00:10:15.200
So basically, you upload just the metadata if you want to participate in this.

00:10:15.200 --> 00:10:17.100
And then you point somewhere else.

00:10:17.100 --> 00:10:22.620
And there's a lot of motivation, things they tried, things that didn't work, limits.

00:10:22.620 --> 00:10:25.740
You can see in this pep, they list the limits that I talked about.

00:10:26.060 --> 00:10:35.040
And all the details, but most importantly, there's a security section way down here.

00:10:35.040 --> 00:10:36.120
I was worried about that.

00:10:36.120 --> 00:10:36.840
So, yeah.

00:10:36.840 --> 00:10:37.320
Yes.

00:10:37.320 --> 00:10:37.780
Here.

00:10:37.780 --> 00:10:39.560
As well as stability constraints.

00:10:39.560 --> 00:10:44.020
But so for example, the wheel checksum must be included in rim files.

00:10:44.020 --> 00:10:47.420
Once it's uploaded, just like current wheels, it can't change.

00:10:47.420 --> 00:10:47.860
Yeah.

00:10:48.120 --> 00:10:49.480
So here's my metadata.

00:10:49.480 --> 00:10:50.700
That's where the thing lives.

00:10:50.700 --> 00:10:52.300
Here's the hash of it.

00:10:52.300 --> 00:10:53.860
So it can't be tampered with.

00:10:53.860 --> 00:10:56.340
It must be served over HTTPS.

00:10:56.340 --> 00:10:57.000
Okay.

00:10:57.260 --> 00:11:01.840
And you're only allowed to do this if you get pre-approved by the PyPI admin.

00:11:01.840 --> 00:11:04.540
So it's not just all sorts of chaos.

00:11:04.540 --> 00:11:06.480
People just upload and stuff everywhere.

00:11:06.480 --> 00:11:07.040
All right.

00:11:07.040 --> 00:11:10.100
But a lot of consideration about like malware and things like that.

00:11:10.100 --> 00:11:12.360
And also a bunch of stuff about stability.

00:11:12.360 --> 00:11:16.020
Like external wheels must be hosted over SSL.

00:11:16.020 --> 00:11:21.240
And not just that, but it actually must be signed by Mozilla's root certificate store, which

00:11:21.240 --> 00:11:22.180
is interesting.

00:11:22.180 --> 00:11:24.240
And they should use CDNs.

00:11:24.240 --> 00:11:26.100
They must be stable, et cetera.

00:11:26.100 --> 00:11:26.720
What do you think?

00:11:26.720 --> 00:11:28.840
So who would do this?

00:11:28.840 --> 00:11:34.180
I mean, because then the person with the package doing this, they'd have to pay the hosting fees.

00:11:34.180 --> 00:11:37.780
Or get it on GitHub and point to it as a raw or something, you know?

00:11:37.780 --> 00:11:38.900
Oh, yeah.

00:11:38.900 --> 00:11:39.920
Something like that.

00:11:39.920 --> 00:11:40.340
I don't know.

00:11:40.340 --> 00:11:41.120
Oh, okay.

00:11:41.120 --> 00:11:47.820
Or if you're a big company and you want to ship ML models and you'd rather have more control

00:11:47.820 --> 00:11:50.040
over that and how it works, right?

00:11:50.040 --> 00:11:51.040
You could set that.

00:11:51.120 --> 00:11:55.940
I don't think small individuals are going to be like, hey, I'd love to cover a terabyte

00:11:55.940 --> 00:11:57.800
of bandwidth charges a month for no reason.

00:11:57.800 --> 00:11:58.360
Yeah.

00:11:58.360 --> 00:11:58.800
Right.

00:11:58.800 --> 00:12:04.760
Well, also, like you said, it's somebody that's got a, it's going to be a large one.

00:12:04.760 --> 00:12:08.040
You're not going to do this for just a little Python only package.

00:12:08.040 --> 00:12:09.000
Yeah, exactly.

00:12:09.000 --> 00:12:09.860
It's very unlikely.

00:12:09.860 --> 00:12:10.440
Right.

00:12:10.440 --> 00:12:11.420
It's very unlikely.

00:12:11.420 --> 00:12:18.160
So they said this is only about hosting the binary downloads, not packages, package indexes,

00:12:18.160 --> 00:12:20.660
package listings, none of that stuff.

00:12:20.880 --> 00:12:25.100
Because that's already supported through having just a separate private white label.

00:12:25.100 --> 00:12:26.300
You run it yourself.

00:12:26.300 --> 00:12:29.020
PyPI, mirror, something like that, right?

00:12:29.020 --> 00:12:29.520
Yeah.

00:12:29.520 --> 00:12:30.820
I think this is cool, actually.

00:12:30.820 --> 00:12:31.600
Neat.

00:12:31.600 --> 00:12:31.960
Yeah.

00:12:31.960 --> 00:12:32.780
Flexibility is good.

00:12:32.780 --> 00:12:34.500
I think it's, I think it's all right.

00:12:34.500 --> 00:12:35.780
So anyway, very cool.

00:12:35.780 --> 00:12:37.180
That's, that's what I wanted to cover.

00:12:37.180 --> 00:12:41.300
And before we move on, how about a quick shout out to our sponsor?

00:12:41.300 --> 00:12:41.820
Yep.

00:12:41.820 --> 00:12:45.440
Let me tell you real quick about Scout APM.

00:12:45.440 --> 00:12:47.580
They're big supporters of Python Bytes.

00:12:47.580 --> 00:12:49.080
So we appreciate that very much.

00:12:49.080 --> 00:12:55.260
So if you are tired of spending hours trying to find the root cause of issues impacting your performance,

00:12:55.260 --> 00:12:58.020
then you owe it to yourself to check out Scout APM.

00:12:58.020 --> 00:13:07.140
They're a leading Python application performance monitoring tool, APM, that helps you identify and solve performance abnormalities faster and easier.

00:13:07.360 --> 00:13:17.920
Scout APM ties bottlenecks such as memory leaks, slow database queries, background jobs, and the dreaded N plus one queries that you can end up if you do lazy loading in your ORM.

00:13:17.920 --> 00:13:20.320
And then you say, oh no, why is it so slow?

00:13:20.320 --> 00:13:22.660
Why are you doing 200 database queries for what should be one?

00:13:22.660 --> 00:13:24.040
So you can find out things like that.

00:13:24.040 --> 00:13:31.260
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.

00:13:31.260 --> 00:13:34.320
And you'll love it because it's built for developers by developers.

00:13:34.320 --> 00:13:35.980
It makes it easy to get set up.

00:13:36.300 --> 00:13:38.500
Seriously, you can do it in less than four minutes.

00:13:38.500 --> 00:13:39.340
So that's awesome.

00:13:39.340 --> 00:13:42.380
And the best part is the pricing is straightforward.

00:13:42.380 --> 00:13:47.760
You only pay for the data that you use with no hidden overage fees or per seat pricing.

00:13:47.760 --> 00:13:50.120
And I just learned this, Brian.

00:13:50.120 --> 00:13:55.240
They also have, they provide the pro version for free to all open source projects.

00:13:55.240 --> 00:14:02.580
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.

00:14:02.780 --> 00:14:06.440
So you can start your free trial and get instant insights today.

00:14:06.440 --> 00:14:09.040
Visit pythonbytes.fm/scout.

00:14:09.040 --> 00:14:11.300
The link is in your podcast player show notes as well.

00:14:11.300 --> 00:14:12.720
And please use that link.

00:14:12.720 --> 00:14:16.580
Don't just search for them because otherwise they don't think you came from us.

00:14:16.580 --> 00:14:18.180
And then they'd stop supporting the show.

00:14:18.240 --> 00:14:20.740
So please use our link pythonbytes.fm/scout.

00:14:20.740 --> 00:14:21.660
Check them out.

00:14:21.660 --> 00:14:23.480
How about the next one for you?

00:14:23.480 --> 00:14:25.560
I feel like, just give people a little heads up.

00:14:25.560 --> 00:14:27.500
We've got some, that's a pie test coming up here.

00:14:27.500 --> 00:14:28.020
What do we got?

00:14:28.500 --> 00:14:30.840
If you didn't know it, Python 3.13 is out.

00:14:30.840 --> 00:14:34.140
So we already covered this.

00:14:34.140 --> 00:14:38.140
However, it's got the free threading thing going on.

00:14:38.140 --> 00:14:40.960
How do you know if your project supports it?

00:14:40.960 --> 00:14:46.140
So that's the question that Anthony Shaw and others at, where was this at again?

00:14:46.140 --> 00:14:48.780
Was that PyCon JP?

00:14:48.780 --> 00:14:50.460
I think that's PyCon Japan.

00:14:50.460 --> 00:14:51.040
Is that right?

00:14:51.040 --> 00:14:52.220
I think so.

00:14:52.500 --> 00:14:52.720
Okay.

00:14:52.720 --> 00:14:54.320
So it was one of their sprints.

00:14:54.320 --> 00:15:00.420
Looks like seven or eight people, Anthony, Mike, a bunch of people worked on this.

00:15:00.420 --> 00:15:08.160
And the idea is that you'd like to be able to test that your project and your code works on the free threaded, right?

00:15:08.160 --> 00:15:13.580
So if you're like, especially support libraries and packages.

00:15:13.580 --> 00:15:15.540
So what, how do you do that?

00:15:15.540 --> 00:15:19.900
And one of the thoughts was to just test, just run it.

00:15:19.900 --> 00:15:23.500
But with the free threading turned on.

00:15:23.500 --> 00:15:26.920
But pytest normally runs in single thread mode by default.

00:15:26.920 --> 00:15:28.420
So how about XTest?

00:15:28.420 --> 00:15:30.000
Because that's multiprocessing, right?

00:15:30.000 --> 00:15:31.640
Yes, it's multiprocessing.

00:15:31.640 --> 00:15:32.920
It's not multithreading.

00:15:32.920 --> 00:15:36.520
So Anthony and others made this plugin.

00:15:36.520 --> 00:15:39.800
It's called pytest-FreeThreaded.

00:15:39.800 --> 00:15:41.880
And link in the show notes, of course.

00:15:41.880 --> 00:15:52.120
But they made the plugin to be able to run the tests in a thread pool with the guild disabled and help identify that your tests are thread safe.

00:15:52.120 --> 00:15:59.180
So, you know, as long as your tests possibly are testing your code in such a way to test that, great.

00:15:59.180 --> 00:16:03.640
But at least your tests will be free thread safe compatible.

00:16:03.640 --> 00:16:10.640
Anyway, they tested the first library that was marked as compatible with free threading.

00:16:10.640 --> 00:16:11.740
I don't know how to do that.

00:16:11.740 --> 00:16:14.320
So I guess that's a to-do item to look that up.

00:16:14.320 --> 00:16:15.140
Okay.

00:16:15.140 --> 00:16:18.560
So you think it might go in the classifiers of the package metadata?

00:16:18.560 --> 00:16:19.100
I'm not sure.

00:16:19.100 --> 00:16:20.380
Oh, okay.

00:16:20.380 --> 00:16:20.940
All right.

00:16:20.940 --> 00:16:22.180
Well, we'll take a look at that.

00:16:22.180 --> 00:16:27.260
Anyway, they tested one and it caused a segfault in CPython.

00:16:27.260 --> 00:16:30.200
So not really compatible if you're segfaulting.

00:16:30.540 --> 00:16:36.540
So I haven't tried this out yet, but I'm going to try it on a few projects anyway.

00:16:36.540 --> 00:16:39.400
So Python free threaded will help test this.

00:16:39.400 --> 00:16:41.020
Well, I think this is awesome.

00:16:41.020 --> 00:16:45.200
And some people might perceive this like, oh, it just means a performance boost.

00:16:45.200 --> 00:16:52.360
But if you're writing code that's meant to be supported for free threaded Python, you should test it in that style as well.

00:16:52.400 --> 00:16:54.920
Not just in some limited way, right?

00:16:54.920 --> 00:16:55.720
Yeah.

00:16:56.420 --> 00:17:13.640
And even if your tests pass, I think it would make sense to look at the different parts of your library to make sure that it really makes sense that your tests are actually testing your library in such a way that you have fairly good confidence.

00:17:13.640 --> 00:17:15.460
But, you know, mileage may vary.

00:17:15.460 --> 00:17:18.340
But this is a good step in the right direction.

00:17:18.340 --> 00:17:21.040
So thanks to Anthony and others for doing this.

00:17:21.040 --> 00:17:21.780
Yeah, that's awesome.

00:17:22.260 --> 00:17:33.040
Speaking of Anthony, I was not going to point this out, but now that you mentioned it, just published an episode on Talk Python with him designing effective load tests for your Python app.

00:17:33.040 --> 00:17:33.620
Nice.

00:17:33.620 --> 00:17:35.060
Yeah, that's a really fun one.

00:17:35.060 --> 00:17:36.140
So people can check that out.

00:17:36.140 --> 00:17:40.680
But what I'm actually talking about for this section is more pytests.

00:17:40.680 --> 00:17:42.480
Ryan, how did you not get this one?

00:17:42.480 --> 00:17:43.560
pytest edit.

00:17:43.560 --> 00:17:44.480
Do you know this?

00:17:44.480 --> 00:17:44.920
No.

00:17:44.920 --> 00:17:46.200
Okay, so here's the deal.

00:17:46.200 --> 00:17:52.240
You're on the terminal CLI sitting there running something and you run into an error and you're like, ah.

00:17:52.240 --> 00:17:54.680
My test crashed or my test failed rather.

00:17:54.680 --> 00:17:56.260
I just want to see what's up.

00:17:56.260 --> 00:17:59.260
So one way to do that is to see what test failed.

00:17:59.260 --> 00:18:03.280
Go open your editor, find your project, load it up, search around until you find it.

00:18:03.280 --> 00:18:08.260
Or the other way is to install pytest-edit from Mr. Minnow.

00:18:08.260 --> 00:18:09.280
That's the GitHub name.

00:18:09.280 --> 00:18:17.400
And then just type pytest-edit and it'll open a pre-configured editor to the line of the failing test.

00:18:17.400 --> 00:18:18.120
Oh, wow.

00:18:18.120 --> 00:18:21.420
Yeah, so you can say pytest-edit and it'll show you the last one.

00:18:21.420 --> 00:18:23.100
Or you can say some index.

00:18:23.100 --> 00:18:25.580
So for example, you can say edit equals two.

00:18:25.580 --> 00:18:28.820
And it'll open the third failing test because, of course, it's zero-based.

00:18:28.820 --> 00:18:31.120
Or negative two will open the second to the last one.

00:18:31.120 --> 00:18:34.160
So you can kind of hone in on it with this number here.

00:18:34.160 --> 00:18:35.780
And then you just set up your editor.

00:18:35.780 --> 00:18:39.820
If you don't set it up, you get VI or Vim or even Windows.

00:18:40.820 --> 00:18:42.540
On Windows, you get notepad.

00:18:42.540 --> 00:18:47.000
So I recommend picking a better editor.

00:18:47.000 --> 00:18:51.080
But anyway, you just set an environment variable to what you want your editor to be.

00:18:51.080 --> 00:18:54.680
And I got a ton of extras to cover, so I don't want to go too deep on this one.

00:18:54.680 --> 00:18:55.620
But there it is.

00:18:55.620 --> 00:18:56.220
Neat.

00:18:56.220 --> 00:18:58.540
Speaking of extras, what do you got for us?

00:18:58.540 --> 00:18:58.900
Any?

00:18:58.900 --> 00:19:01.280
I've got zero extras this week.

00:19:01.280 --> 00:19:03.060
I must have stolen them all.

00:19:03.060 --> 00:19:03.780
Look at my tabs.

00:19:03.780 --> 00:19:06.000
All right.

00:19:06.000 --> 00:19:07.780
Well, let's just jump into the extras then.

00:19:07.780 --> 00:19:09.840
Extra, extra.

00:19:09.840 --> 00:19:11.980
So I got a bunch here, but they're all pretty quick.

00:19:11.980 --> 00:19:21.820
Last week, you spoke about Jade, D-J-A-D-E, for formatting Django templates, right?

00:19:21.820 --> 00:19:26.500
Kind of like black or rough, but instead of being for Python, it's for Django templates and

00:19:26.500 --> 00:19:27.880
HTML and so on, which is awesome.

00:19:27.880 --> 00:19:32.600
So I'm linking to something from Adam Chains, Django pre-commit hook.

00:19:32.600 --> 00:19:33.980
Or sorry, Jade pre-commit hook.

00:19:33.980 --> 00:19:36.660
So if you want this to just happen automatically, there you go.

00:19:36.660 --> 00:19:37.440
Super easy, right?

00:19:37.440 --> 00:19:37.780
Cool.

00:19:37.780 --> 00:19:38.240
Yes.

00:19:38.240 --> 00:19:39.440
This one is really fun.

00:19:39.440 --> 00:19:45.080
And remember I talked about Polyfill, Polyfill.js and somebody took over the domain.

00:19:45.080 --> 00:19:45.880
I don't remember.

00:19:45.880 --> 00:19:50.400
It was, I think it was sold even, but if it wasn't sold, it was taken over because it lapsed

00:19:50.400 --> 00:19:50.760
or whatever.

00:19:50.760 --> 00:19:56.840
However, it got into some nefarious hands and they took over polyfill.io, boot CDN, boot

00:19:56.840 --> 00:19:58.500
CSS, static file.

00:19:58.540 --> 00:20:04.800
And they had basically rewritten a whole bunch of CDN served JavaScript to hundreds of thousands

00:20:04.800 --> 00:20:08.660
of websites with malware that would then go on to the visitors of those websites.

00:20:08.660 --> 00:20:09.240
It's bad.

00:20:09.500 --> 00:20:20.660
The only reason I'm bringing this is a quick follow-up.

00:20:20.660 --> 00:20:21.940
How do they know?

00:20:21.940 --> 00:20:28.420
That person had published, they accidentally published their Cloudflare secret keys.

00:20:30.500 --> 00:20:37.640
And so then the security researchers will, you know, they basically logged into Cloudflare

00:20:37.640 --> 00:20:41.740
and just looked at their cloud setup, which I think this is awesome.

00:20:41.740 --> 00:20:42.360
Yeah.

00:20:44.140 --> 00:20:47.740
And then, yeah, funny thing out in the audience.

00:20:47.740 --> 00:20:48.520
We'll share that in a second.

00:20:48.520 --> 00:20:48.800
All right.

00:20:48.800 --> 00:20:50.500
This one is also really cool.

00:20:50.500 --> 00:20:55.120
Over at pythonbytes.fm, created that site seven years ago.

00:20:55.120 --> 00:20:55.800
How long have we been there?

00:20:55.800 --> 00:20:56.260
Eight years?

00:20:56.260 --> 00:20:58.540
Well, when I created it, I created it with Bootstrap, okay?

00:20:58.540 --> 00:21:04.360
Because Bootstrap was probably the nicest way at that time to get a good looking site that's

00:21:04.360 --> 00:21:07.260
consistent, responsive, all those things up in Atom, right?

00:21:07.260 --> 00:21:14.440
Well, if you look at the Bootstrap CSS file, it's about 140 kilobytes, which is a lot to

00:21:14.440 --> 00:21:18.480
just be serving as one of your static resources on every web request, right?

00:21:18.480 --> 00:21:20.720
But it's pretty gnarly.

00:21:20.720 --> 00:21:21.960
You don't want to mess with it, right?

00:21:21.960 --> 00:21:22.700
Like, what are you using?

00:21:22.700 --> 00:21:23.220
I don't know.

00:21:23.220 --> 00:21:24.840
And what's the knock-on effect?

00:21:24.840 --> 00:21:30.600
So I ran across this thing called Purge CSS, which is a Node.js CLI tool, but it doesn't

00:21:30.600 --> 00:21:31.840
really matter how it's implemented, right?

00:21:31.840 --> 00:21:32.800
It's just a CLI tool.

00:21:32.800 --> 00:21:39.280
And you can run this thing against your CSS file, and you can say, hey, this CSS file,

00:21:39.280 --> 00:21:44.940
I would like you to look at all the styles that I'm using, look at the CSS file, and if

00:21:44.940 --> 00:21:48.340
there's any styles in there I'm not using, take them out of the CSS file.

00:21:48.340 --> 00:21:48.940
Oh, wow.

00:21:48.940 --> 00:21:49.320
Yeah.

00:21:49.320 --> 00:21:53.040
So, and it doesn't have to work on just HTML.

00:21:53.040 --> 00:21:57.360
I pointed at chameleon templates, or it could be Jinja templates, or we just talked about

00:21:57.360 --> 00:21:57.960
Django templates.

00:21:57.960 --> 00:22:03.680
You just give it a, like a star, star, slash, star, whatever your template extension is,

00:22:03.680 --> 00:22:06.040
like .j, or if it was Jinja, or whatever.

00:22:06.040 --> 00:22:10.020
And then it'll go through and look at all of those that are being used, and then it'll

00:22:10.020 --> 00:22:12.240
rip them out, rip out all the stuff that wasn't.

00:22:12.240 --> 00:22:20.660
So now, for example, if you go to pythonbytes.org, and you click on the CSS file, it's like 20k,

00:22:20.660 --> 00:22:22.480
25k, something like that.

00:22:22.540 --> 00:22:26.880
So it's six, seven times smaller, and all I had to do is run a command line thing against

00:22:26.880 --> 00:22:27.040
it.

00:22:27.040 --> 00:22:30.100
So maybe you're not using enough bootstrap.

00:22:30.100 --> 00:22:33.440
I feel like that's still 20kb of bootstrap.

00:22:33.440 --> 00:22:34.480
That's a lot of bootstrap.

00:22:34.480 --> 00:22:38.840
I love your attitude, but there we go.

00:22:38.840 --> 00:22:47.260
Last week, on the first go-round of 3.13 release, there's also Python 3.12.7 released.

00:22:47.780 --> 00:22:52.200
So just so you know, if you're not ready for 3.13, there's also a new version of 3.12.

00:22:52.200 --> 00:22:55.320
I want to give a quick shout-out to a video by Hynek.

00:22:55.320 --> 00:22:58.500
It says, uv is the future of Python packaging.

00:22:58.500 --> 00:23:00.400
Snake box emojis.

00:23:00.400 --> 00:23:02.500
Anyway, this is a really good video.

00:23:02.500 --> 00:23:07.500
Hynek is getting his YouTube game on quite well, and he's fun to watch.

00:23:07.500 --> 00:23:08.300
So check that out.

00:23:08.300 --> 00:23:09.360
I'll link that as well.

00:23:09.360 --> 00:23:11.760
And I still got some more.

00:23:11.760 --> 00:23:12.920
We're just tabs bumping around.

00:23:13.460 --> 00:23:18.020
Chris over on Faucet On pointed out, hey, love all this uv talk, grouping these together

00:23:18.020 --> 00:23:19.920
on 4.3 and others and so on.

00:23:19.920 --> 00:23:23.520
It's interesting to be seeing it show up just broadly now.

00:23:23.520 --> 00:23:27.420
And things like Home Assistant is now using it to reduce download and setup times.

00:23:27.420 --> 00:23:28.140
Oh, yeah.

00:23:28.140 --> 00:23:28.440
Cool.

00:23:28.440 --> 00:23:29.320
Yeah, kind of cool.

00:23:29.320 --> 00:23:34.740
Over here, Brian, do you think people are getting tired of LLMs and hearing about AI tools?

00:23:34.740 --> 00:23:35.420
Yes.

00:23:35.420 --> 00:23:38.360
I feel like there's a lot of AI fatigue out there.

00:23:38.360 --> 00:23:41.560
I'm like, ah, but is that just me projecting this onto people?

00:23:41.560 --> 00:23:42.900
Is this real?

00:23:42.900 --> 00:23:49.160
So I posted on Faucet On and on Twitter and said, hey, just thinking about topics, how

00:23:49.160 --> 00:23:52.360
do you guys feel about LLM topics and spending time talking about them?

00:23:52.360 --> 00:23:55.160
Only 4% said, more LLMs, please.

00:23:55.160 --> 00:23:57.580
22% said, ah, they're fine.

00:23:57.580 --> 00:24:00.000
38% said, I've had enough.

00:24:00.000 --> 00:24:04.280
And 36% fully said, if you say AI one more time, I will pile drive you.

00:24:04.280 --> 00:24:07.060
Well, you just said it like four times.

00:24:07.060 --> 00:24:07.400
Oh, no.

00:24:07.400 --> 00:24:09.000
It's going to hurt so much, but I had to say it.

00:24:09.000 --> 00:24:12.540
But that's 74% of people saying, oh, man, I've had enough.

00:24:12.540 --> 00:24:12.880
Yeah.

00:24:12.880 --> 00:24:13.360
So anyway.

00:24:13.360 --> 00:24:17.660
One of the things that would have been funny is if you'd have added, do you want us to start

00:24:17.660 --> 00:24:19.160
talking about blockchain again instead?

00:24:19.160 --> 00:24:21.840
Oh, my gosh.

00:24:21.840 --> 00:24:22.100
Yes.

00:24:22.100 --> 00:24:23.640
That would definitely do it.

00:24:23.640 --> 00:24:23.980
All right.

00:24:23.980 --> 00:24:26.020
A couple real quick ones here.

00:24:26.020 --> 00:24:32.700
JetBrains and the PSF have now released or opened up the Python developer survey 2024.

00:24:33.220 --> 00:24:34.460
So check that out.

00:24:34.460 --> 00:24:36.640
I'll link to how you can go and take it.

00:24:36.640 --> 00:24:38.120
But yeah, everyone participate.

00:24:38.120 --> 00:24:39.000
This is super important.

00:24:39.000 --> 00:24:43.340
We really value all the information that we get in the spring or whenever we get the answers,

00:24:43.340 --> 00:24:44.700
the responses and the write up.

00:24:44.700 --> 00:24:47.500
But it's time to submit your notes.

00:24:47.500 --> 00:24:47.980
Okay.

00:24:47.980 --> 00:24:49.720
A couple real quick things.

00:24:49.840 --> 00:24:54.220
I added a really cool way to explore courses over at Talk Python.

00:24:54.220 --> 00:24:57.200
So there's a big tag cloud up at the top here.

00:24:57.200 --> 00:24:58.560
And we get all the courses.

00:24:58.560 --> 00:25:03.500
But now if you just click around, like if you want to find stuff about test, right, I just

00:25:03.500 --> 00:25:06.760
click on testing and it'll show like your test course.

00:25:06.760 --> 00:25:08.280
And this thing is super neat.

00:25:08.280 --> 00:25:10.320
This is all implemented with HTMX.

00:25:10.320 --> 00:25:11.100
All dynamic.

00:25:11.360 --> 00:25:13.400
No page refreshes, but no JavaScript.

00:25:13.400 --> 00:25:14.360
Love it.

00:25:14.360 --> 00:25:14.800
Cool.

00:25:14.800 --> 00:25:16.140
Anyway, go check that out.

00:25:16.140 --> 00:25:18.300
And very last extra, extra, extra.

00:25:18.300 --> 00:25:22.300
I wrote an article that says, let's go easy on PyPI, okay?

00:25:22.300 --> 00:25:25.360
And I got some nice feedback from people on Updated.

00:25:25.360 --> 00:25:31.680
But basically, it talks about a bunch of different steps that you can take to not keep that number

00:25:31.680 --> 00:25:36.700
at 66 petabytes a month hitting PyPI.org, right?

00:25:36.700 --> 00:25:37.080
Yeah.

00:25:37.080 --> 00:25:42.860
I don't know how you feel, but my assessment is fully 75% or more of that has to be Docker

00:25:42.860 --> 00:25:45.840
builds, continuous integration, all that crap, right?

00:25:45.840 --> 00:25:52.000
It just, it has to be so over the top, just like machines talking to machines like, hey,

00:25:52.000 --> 00:25:54.460
here's a requirements file with 200 things in it.

00:25:54.460 --> 00:25:56.240
We're going to build a Docker container on it.

00:25:56.240 --> 00:26:00.660
So let's start with this base one, like the Python one or whichever one, it doesn't really

00:26:00.660 --> 00:26:02.020
matter and just build from it.

00:26:02.020 --> 00:26:08.000
Every single time you want any kind of code change published or tested, it's going to download

00:26:08.000 --> 00:26:10.040
all 200 over and over, right?

00:26:10.040 --> 00:26:10.500
Yeah.

00:26:10.500 --> 00:26:13.320
And then you're testing it against multiple versions of Python.

00:26:13.320 --> 00:26:15.480
So it downloads it that many more times.

00:26:15.480 --> 00:26:16.480
That's a really good point.

00:26:16.480 --> 00:26:16.760
Yeah.

00:26:16.760 --> 00:26:22.180
So this article talks you through different steps you can take to cache it over and over

00:26:22.180 --> 00:26:22.980
faster and faster.

00:26:22.980 --> 00:26:30.420
So basically, almost, unless a requirement changes, it will not ever, ever touch PyPI.org.

00:26:30.640 --> 00:26:30.840
Ever.

00:26:30.840 --> 00:26:31.660
Right?

00:26:31.660 --> 00:26:34.740
So it starts out just saying, oh yeah, you just pip install your requirements.

00:26:34.740 --> 00:26:35.680
What's wrong with that?

00:26:35.680 --> 00:26:37.780
You know, every code change causes a download.

00:26:37.780 --> 00:26:43.720
And then maybe you could run the requirements, copy just the requirements file over and run

00:26:43.720 --> 00:26:45.160
it first and then do it.

00:26:45.160 --> 00:26:47.820
That way, only if a requirement changes, does it get them all?

00:26:48.120 --> 00:26:52.440
And then you could pre-list some of your top level requirements.

00:26:52.440 --> 00:26:54.120
That would cache it in the Docker image.

00:26:54.120 --> 00:26:58.140
And then after a lot of conversations with a lot of people, there's this mount command

00:26:58.140 --> 00:27:02.600
that you can say for cache on a per command basis.

00:27:02.740 --> 00:27:08.400
And this will cache the output to somewhere on the machine that does the building of the

00:27:08.400 --> 00:27:09.060
Docker container.

00:27:09.060 --> 00:27:12.240
So it'll cache either the uv or the pip cache.

00:27:12.480 --> 00:27:16.580
So that way, if you get it again, it'll just go using cached version, even if it's a completely

00:27:16.580 --> 00:27:20.560
fresh image, long as the machine has seen that download before, right?

00:27:20.560 --> 00:27:21.400
That dependency.

00:27:21.900 --> 00:27:26.700
And then finally, if you're on probably one of the biggest offenders in the sense of CI

00:27:26.700 --> 00:27:31.820
on GitHub, over at GitHub, they actually have this thing called, maybe you know it, this

00:27:31.820 --> 00:27:36.120
thing called a cache action or actions slash cache.

00:27:36.120 --> 00:27:42.580
And you can set up a cache for your CI so that subsequent CI builds don't download and install

00:27:42.580 --> 00:27:43.660
it again as well.

00:27:43.660 --> 00:27:48.360
This will not just make it lighter on PyPI, but also every one of these things makes it faster

00:27:48.360 --> 00:27:48.780
for you.

00:27:48.780 --> 00:27:50.460
So it's like incentives are aligned.

00:27:50.460 --> 00:27:51.000
Do you know what I mean?

00:27:51.000 --> 00:27:51.460
Yeah.

00:27:51.740 --> 00:27:51.980
Yeah.

00:27:51.980 --> 00:27:52.720
That's pretty cool.

00:27:52.720 --> 00:27:58.680
It's almost too bad that like GitHub itself can't notice that like multiple packages or

00:27:58.680 --> 00:28:03.740
multiple builds on different projects are using the same version of something and caches.

00:28:03.740 --> 00:28:04.020
Right.

00:28:04.020 --> 00:28:07.940
Just have a universal pip cache or something like that.

00:28:07.940 --> 00:28:11.920
One of my questions is, and I don't know if you know the answer to this, is I know that

00:28:11.920 --> 00:28:13.280
UV does a lot of caching.

00:28:13.280 --> 00:28:18.920
Will just using uv help with reducing hitting PyPI?

00:28:18.920 --> 00:28:20.660
That's an interesting question.

00:28:20.660 --> 00:28:22.960
I don't know if it'll make it less traffic.

00:28:22.960 --> 00:28:24.400
It'll definitely make it faster.

00:28:24.400 --> 00:28:25.460
There's no doubt about that.

00:28:25.460 --> 00:28:27.500
But it might be the same traffic.

00:28:27.500 --> 00:28:27.880
Okay.

00:28:27.880 --> 00:28:28.320
Yeah.

00:28:28.320 --> 00:28:28.860
Yeah.

00:28:28.860 --> 00:28:28.940
Yeah.

00:28:28.940 --> 00:28:29.380
Cool.

00:28:29.380 --> 00:28:29.980
All right.

00:28:31.240 --> 00:28:34.600
Henry says, set up dash uv has a cache option.

00:28:34.600 --> 00:28:35.080
Excellent.

00:28:35.080 --> 00:28:35.080
Excellent.

00:28:35.080 --> 00:28:36.120
That's awesome to hear.

00:28:36.120 --> 00:28:36.680
All right.

00:28:36.680 --> 00:28:41.620
And then Jay Miller dropped in to say that he assumed he wouldn't be able to find this episode.

00:28:41.620 --> 00:28:44.020
But like us, he eventually found his way.

00:28:44.020 --> 00:28:49.540
And also, Tony out in the audience says, I was literally working on caching in CI while listening.

00:28:49.540 --> 00:28:52.220
UV does support caching in CI too.

00:28:52.360 --> 00:28:52.460
Yeah.

00:28:52.460 --> 00:28:57.460
And by the way, if you're checking out these notes on the GitHub CI stuff down here for

00:28:57.460 --> 00:29:00.760
the pip example, somewhere, pip, are you here?

00:29:00.760 --> 00:29:07.620
If you just say this patch of .cache slash pip, if you just change that to .cache slash uv,

00:29:07.620 --> 00:29:10.280
I'm pretty sure everything else will just flow from there.

00:29:10.280 --> 00:29:11.160
So awesome.

00:29:11.160 --> 00:29:11.660
Nice.

00:29:12.520 --> 00:29:12.960
Indeed.

00:29:12.960 --> 00:29:14.060
All right.

00:29:14.060 --> 00:29:16.480
Let's be ready for a joke.

00:29:16.480 --> 00:29:18.840
Well, I was hoping you didn't have a lost the joke.

00:29:18.840 --> 00:29:20.700
So let's see if I can find it.

00:29:20.700 --> 00:29:21.580
Let's see what I can find.

00:29:21.580 --> 00:29:21.940
All right.

00:29:21.940 --> 00:29:25.760
So, you know, when you go to a page, that's bad.

00:29:25.760 --> 00:29:30.120
Like if you go to Python bytes slash blah, blah, blah, and it's not there, should it just

00:29:30.120 --> 00:29:30.760
say 404?

00:29:30.760 --> 00:29:33.580
No, you should have something amusing and interesting.

00:29:33.580 --> 00:29:38.740
Like for us, we have a big empty microphone in a stage with nobody at the microphone that

00:29:38.740 --> 00:29:39.700
just says 404.

00:29:39.700 --> 00:29:41.460
Try our episodes listing instead.

00:29:41.520 --> 00:29:43.240
And you can click on it and it takes you to our episodes, right?

00:29:43.240 --> 00:29:44.060
That's all fun.

00:29:44.060 --> 00:29:49.540
So my joke, which I think I'll just let people link to, but maybe we can find one or two just

00:29:49.540 --> 00:29:53.900
give people a sense, is 28 clever and funny 404 pages.

00:29:53.900 --> 00:29:55.600
So I love this.

00:29:55.600 --> 00:29:56.560
These are so good.

00:29:56.560 --> 00:30:01.500
It almost makes me want to like mess up a website just to see what they've got, right?

00:30:01.500 --> 00:30:03.460
Like one of them is for a blue path.

00:30:03.460 --> 00:30:07.000
I don't know what that is, but there's a big map with tons of little dots of like, here's

00:30:07.000 --> 00:30:10.060
all the distribution of where people live around the city or things happening.

00:30:10.060 --> 00:30:11.380
It says, this is everyone else.

00:30:11.480 --> 00:30:15.100
And then like way over somewhere else, it has a little dot says, this is you way off

00:30:15.100 --> 00:30:15.480
the map.

00:30:15.480 --> 00:30:16.220
Please go find.

00:30:16.220 --> 00:30:21.360
Some of them are not that great, but some of them are real good.

00:30:22.160 --> 00:30:29.380
So anyway, if this kind of stuff amuses you, Pixar has one with a crying inside out person.

00:30:29.380 --> 00:30:30.680
It's sad emotion.

00:30:30.680 --> 00:30:31.120
Yeah.

00:30:31.120 --> 00:30:32.120
Yeah, exactly.

00:30:32.120 --> 00:30:32.880
Exactly.

00:30:32.880 --> 00:30:34.140
Others are just weird.

00:30:34.140 --> 00:30:38.720
One has a bear wearing like a gold 404 baller type.

00:30:38.720 --> 00:30:41.880
Anyway, check it out.

00:30:42.120 --> 00:30:45.060
Lego has a unassembled disconnected sort of thing.

00:30:45.060 --> 00:30:49.240
So I thought that would be pretty good for our episode 404.

00:30:49.240 --> 00:30:51.060
People can scroll through that and enjoy it.

00:30:51.060 --> 00:30:51.520
Yeah.

00:30:51.520 --> 00:30:54.040
And also, I love watching the, looking at these.

00:30:54.040 --> 00:30:59.240
So if anybody has a, has some good 404 pages that they, that they want to share with us,

00:30:59.240 --> 00:31:05.940
head on over to Mastodon and, or our show notes page and send us, send us a link to your favorite

00:31:05.940 --> 00:31:06.400
404.

00:31:06.400 --> 00:31:06.920
That'd be fun.

00:31:06.920 --> 00:31:07.300
Yeah.

00:31:07.300 --> 00:31:07.800
Awesome.

00:31:07.800 --> 00:31:09.040
All right, guys.

00:31:09.040 --> 00:31:09.620
Thank you.

00:31:09.620 --> 00:31:11.880
Thank you everyone for listening.

00:31:11.880 --> 00:31:12.680
Brian.

00:31:12.680 --> 00:31:13.960
Thanks for being here as always.

00:31:13.960 --> 00:31:14.440
Thanks.

