TRASCRIZIONE 🔗
WEBVTT
00:00:00.001 --> 00:00:04.380
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to
00:00:04.380 --> 00:00:11.440
your earbuds. This is episode 420, recorded Monday, February 17th, 2025. I am Michael Kennedy.
00:00:11.440 --> 00:00:12.420
And I'm Brian Okken.
00:00:12.420 --> 00:00:17.020
And this episode is brought to you by us and all of our things. You can really,
00:00:17.020 --> 00:00:20.820
really support us if you check out our courses, if you check out Brian's book,
00:00:20.820 --> 00:00:25.060
if you're a Patreon supporter. All of those things make this possible, and we thank you for it.
00:00:25.060 --> 00:00:29.520
If you want to connect with us, mostly blue sky is where we're flying these days,
00:00:29.640 --> 00:00:34.080
but also Mastodon, of course. So links to all those things, all those accounts,
00:00:34.080 --> 00:00:37.760
all six of them are on the show page in your podcast player show notes and so on.
00:00:37.760 --> 00:00:41.240
You want to join us live? We're actually on regular time, Brian.
00:00:41.240 --> 00:00:44.520
No daylight savings podcast time, none of that business.
00:00:44.520 --> 00:00:49.600
No, although it's episode 420. We probably should have done a 420 episode or something.
00:00:49.600 --> 00:00:56.020
I will, you know, probably should have. But yeah. And we have our newsletter,
00:00:56.020 --> 00:00:59.320
which is getting better and better. And we got a bunch of positive feedback about
00:00:59.320 --> 00:01:03.660
how people are really enjoying the new format. So it's got a TLDR quick catch up,
00:01:03.660 --> 00:01:07.040
and then it's got some deep dives and covers things that maybe we don't even necessarily
00:01:07.040 --> 00:01:08.440
exactly cover on the show.
00:01:08.440 --> 00:01:12.820
Yeah. I really like the feature where it like says, if you're not familiar with this topic,
00:01:12.820 --> 00:01:14.660
these are some links to go feed.
00:01:14.660 --> 00:01:15.140
Yeah.
00:01:15.140 --> 00:01:16.060
Like learn about it.
00:01:16.060 --> 00:01:18.620
Yeah. Like to get the most out of this and kind of set the foundation.
00:01:18.620 --> 00:01:21.020
Here's some resources for you, which is fun.
00:01:21.020 --> 00:01:26.000
Because surprisingly, many, many, many people are new to Python who are listening.
00:01:26.320 --> 00:01:28.460
Makes sense. But at first, that surprised me.
00:01:28.460 --> 00:01:28.800
Yeah.
00:01:28.800 --> 00:01:33.740
Yeah. Well, talking about what's on the show, what is on the show for our first item for
00:01:33.740 --> 00:01:34.100
you today?
00:01:34.100 --> 00:01:38.220
Well, I was going to do this as an extra, but actually, there's a lot to talk about here,
00:01:38.220 --> 00:01:49.540
I think. There is a new PEP, PEP 772. That's a packaging governance process. And it's in the
00:01:49.540 --> 00:01:54.920
draft process. So it's not decided yet, but it just was created January 21st, just recently.
00:01:55.580 --> 00:02:02.260
Authors are Barry Warsaw, Deb Nicholson, and Bradian. And those are some pretty, I kind of trust those
00:02:02.260 --> 00:02:07.800
people. So I'm curious to know what they're talking about. And also, didn't we already have
00:02:07.800 --> 00:02:14.160
the PyPA, the Python Packaging Authority? So that's kind of what this is talking about a little bit.
00:02:14.160 --> 00:02:20.840
Nothing against the PyPA, but I'm going to read a couple bits. The abstract starts with,
00:02:20.840 --> 00:02:27.300
this PEP proposes the A Python Packaging Council with broad authority over packaging standards,
00:02:27.300 --> 00:02:31.960
tools, and implementations. Like the Python Steering Council, the Packaging Council seeks
00:02:31.960 --> 00:02:39.160
to exercise this authority as rarely as possible. Instead, they use the power to establish standards
00:02:39.160 --> 00:02:45.600
processes. And then down in Motivation, it says, this is, I kind of had a chuckle when I read this,
00:02:45.600 --> 00:02:50.640
read this. As Python Packaging has matured, several interrelated problems with the current
00:02:50.640 --> 00:02:55.700
way of managing the technical development, decision-making, and processes have become
00:02:55.700 --> 00:03:05.600
apparent. Yeah, yeah, they have. And I didn't realize this. There's the Python Packaging Authority
00:03:05.600 --> 00:03:14.040
that does a lot of this work and maintains a lot of the tools, but it's not an elected thing.
00:03:14.040 --> 00:03:23.040
It was when, let's see, it was started to take over the maintenance of pip and VirtualM from Ian Bicking,
00:03:23.040 --> 00:03:33.280
led by Brian Rosner, Carl Meyer, and Janice Lytle. But there isn't really a formal process for this.
00:03:33.280 --> 00:03:40.860
So maybe there is a process, but it doesn't talk about who's in the PyPA and who makes decisions and
00:03:40.860 --> 00:03:46.360
whatnot. Then there was a Packaging Working Group. And there's interoperability standards.
00:03:46.360 --> 00:03:55.440
And the Working Group was more focused on pip and PyPI and setup tools and some of the other efforts.
00:03:55.440 --> 00:04:01.960
So all this is related, and it's very critical to how we use Python, is how we deal with packaging.
00:04:01.960 --> 00:04:11.760
So I do think it's definitely time that we have a steering council sort of an idea. And I kind of
00:04:11.760 --> 00:04:18.620
also really like this document. I was looking at the specification and the mandate and responsibilities
00:04:18.620 --> 00:04:27.140
and what to do if somebody disappears for a while, because that happens. That model is sort of lightweight,
00:04:27.140 --> 00:04:35.100
great. And it's a it's but also fairly covers a lot of cases. And so I was even thinking about using this
00:04:35.100 --> 00:04:43.700
in other other situations. Other projects might want to adopt a a kind of a steering council type model.
00:04:44.500 --> 00:04:52.460
And this might
Load full transcript
be a good model to take a look at. So anyway, I'm all up for talking about possibly
00:04:52.460 --> 00:05:00.400
having a packaging council. So it's quite interesting, for sure. And I definitely trust the folks behind it.
00:05:00.400 --> 00:05:06.360
It feels to me, my first impressions, I've not read anything about this. So PEP772 is new to me.
00:05:06.560 --> 00:05:14.520
It feels like we already have a lot of players managing this stuff and another extra group managing it just it seems like a lot like could
00:05:14.520 --> 00:05:22.520
we, if we have somebody, maybe the steering council itself has more authority over packaging. It seems like they kind of would actually since they oversee Python.
00:05:22.520 --> 00:05:30.020
Could there be kind of a president of the IPA that who gets elected who has kind of like veto power or you know, I mean,
00:05:30.400 --> 00:05:36.660
I feel like the existing structures could be bolstered rather than like another external structure.
00:05:36.660 --> 00:05:43.360
That said, it's critical, like you said, to the community. So this is probably better than better than nothing.
00:05:43.360 --> 00:05:47.800
Although, like, I don't know, just it seems like it's going to add yet another layer of confusion.
00:05:47.800 --> 00:05:50.720
Like, who do we talk to? Who's actually in charge of this? I don't know. What do you think?
00:05:50.720 --> 00:05:56.520
Well, there is I mean, it does talk about the that the steering council already has a lot to deal with.
00:05:56.780 --> 00:06:02.880
And there was a packaging working group. And basically, this would be sort of replacing and extending the working group.
00:06:02.880 --> 00:06:06.940
There's also the core team by the core team. And how do they how are they involved?
00:06:06.940 --> 00:06:09.280
They should probably have a say as well. Yeah.
00:06:09.280 --> 00:06:22.000
Yeah. And but in the past, kind of we've had we've had a combination of the Python packaging authority, which isn't we don't have a process to elect people or or represent from other groups.
00:06:22.460 --> 00:06:35.240
And then also, I think a lot of it was just talking with some of the people that led things like talking with whoever's using, you know, creating, you know, hatchling and the person behind flit and things.
00:06:35.240 --> 00:06:44.720
And if that's really the right, I mean, those people should have a say, but I don't think that they should have an overly large say in what affects all of Python.
00:06:44.980 --> 00:06:52.320
So, yeah, I think that definitely the steering council and the packaging steering council would talk with each other.
00:06:52.320 --> 00:06:55.840
So, yeah, you would think you would definitely think anyway.
00:06:55.840 --> 00:07:06.380
So awesome. All right. Well, on to my first item, it's the marriage of Django and MongoDB, which I'm a huge fan of MongoDB.
00:07:06.380 --> 00:07:11.440
I think it's an awesome, awesome database. It's so easy to run. Right.
00:07:11.440 --> 00:07:14.520
You generally don't have to run migrations to make changes to it very fast.
00:07:14.520 --> 00:07:17.520
Got an open source free version you can run all sorts of good stuff.
00:07:17.520 --> 00:07:23.020
But it's been very incompatible with Django because Django has been primarily relational based.
00:07:23.020 --> 00:07:29.780
And in particular for Django, because it leverages so much of the database to drive its batteries included features.
00:07:29.900 --> 00:07:34.160
It really matters what the database is like, for example, my project with Court.
00:07:34.160 --> 00:07:41.960
It doesn't matter what database I use. I mean, I have to use it, but it doesn't affect anything about how I write the code or how plugins or anything work.
00:07:41.960 --> 00:07:48.920
Right. But the admin back end forms validation, all of these things are based on the database and database models in Django.
00:07:48.920 --> 00:07:55.520
So the announcement here is the official Django MongoDB back end is now available in public preview.
00:07:55.520 --> 00:07:56.000
Cool.
00:07:56.240 --> 00:08:01.520
So you can install this thing and use MongoDB. You can use hierarchical documents.
00:08:01.520 --> 00:08:12.320
You can use all those things. But when you try to use the Django features like forms, like admin back end and so on, they just work because this thing manages the go between.
00:08:12.320 --> 00:08:15.740
So there's a bunch of cool features here. Let's see. What's it about?
00:08:15.740 --> 00:08:24.820
It says the ability to use Django models with confidence. Developers can use Django models to represent MongoDB documents with support for Django forms, validation and authentication.
00:08:25.280 --> 00:08:34.180
Excellent. Admin support, like I mentioned. The package allows users to fire up Django admin page as they normally would with full support for migrations and database schema history.
00:08:34.180 --> 00:08:40.920
Cool. I know I said you don't really need migrations. You technically can run them if you really want to super transform your data, but it's just less needed.
00:08:40.920 --> 00:08:53.880
Native connecting from settings.py. Just as with any other database provider, developers can customize the database engine settings like replication, write concerns, cluster sharding, probably all that kind of stuff.
00:08:54.200 --> 00:08:59.420
MongoDB support for query optimization. So field lookups have been replaced with aggregation calls.
00:08:59.420 --> 00:09:07.600
So MongoDB has regular database queries, but a whole aggregation engine in there as well, where you can do kind of data science-y type stuff, right?
00:09:07.600 --> 00:09:16.600
So you can use that for a lot of the behaviors. And there's a lookup command that it kind of stands in for joins in MongoDB.
00:09:16.600 --> 00:09:19.780
And that gets used as well. It says it has limited advanced functionality.
00:09:19.980 --> 00:09:24.780
Okay. And it
also has aggregation pipeline support. That's the data science-y type of thing that I was talking about.
00:09:24.780 --> 00:09:30.680
Anyway, if you're wanting to use MongoDB and you are a Django person, check it out.
00:09:30.680 --> 00:09:40.880
So I got a question. So this, I think I know the answer, but when we say official Django MongoDB backend, it's official per MongoDB, right?
00:09:41.160 --> 00:09:42.940
It's not for Django.
00:09:42.940 --> 00:09:43.760
Yes. Yeah.
00:09:43.760 --> 00:09:47.320
Yes. Yeah. This is a MongoDB initiative, not a Django initiative.
00:09:47.320 --> 00:09:47.580
Okay.
00:09:47.580 --> 00:09:48.340
Yes, exactly.
00:09:48.340 --> 00:09:55.220
Yeah. It's on mongodb.com. Like the people made it are there, but they do point out that, you know, like it's somewhere, they say something.
00:09:55.720 --> 00:10:00.840
It says over the last few years, Django developers have increasingly used MongoDB presenting opportunity, blah, blah, blah.
00:10:00.840 --> 00:10:08.380
They say, look, you need to have a deep understanding of Django, how it works, its idioms, its conventions, and so on.
00:10:08.380 --> 00:10:13.800
So they put a lot of work into like trying to make it as Django as they can, right?
00:10:13.800 --> 00:10:15.280
So, but it is a MongoDB thing.
00:10:15.280 --> 00:10:15.800
Yeah.
00:10:15.900 --> 00:10:17.660
I just wanted to be clear about that.
00:10:17.660 --> 00:10:38.680
Also, I think that's good actually, because if it's sort of a core decision, if you're going to go with Django as your application front end and then, or backend, whatever, and then, and then MongoDB backing that, how you're tying those two together, you want to rely on a project, you know, is going to stick around and be supported.
00:10:38.680 --> 00:10:42.240
So if this is officially supported by MongoDB, that's a good thing.
00:10:42.240 --> 00:10:42.940
So cool.
00:10:43.120 --> 00:10:43.860
Yeah, it definitely is.
00:10:43.860 --> 00:10:48.860
And they've been supporting their Python driver library package, whatever you're going to call it, for a long, long time.
00:10:48.860 --> 00:10:52.540
And it's been almost perfect over the last 10 years.
00:10:52.540 --> 00:11:00.740
There was a transition when they deprecated the ability to create async functions using decorators in Python.
00:11:00.740 --> 00:11:02.980
It was like an at async contact.
00:11:02.980 --> 00:11:07.040
I can't remember exactly what the decorator was, because I always thought using the async keyword was better.
00:11:07.680 --> 00:11:16.760
But in 3.4, I think there was a way to use, to describe a function as async without using the async and await keywords, because they didn't exist.
00:11:16.760 --> 00:11:17.180
Right.
00:11:17.180 --> 00:11:20.700
And so when that got taken away, they were like a few weeks behind getting that out.
00:11:20.700 --> 00:11:23.700
And it just started failing in certain ways.
00:11:23.700 --> 00:11:26.340
But that's the only time that I've seen any issues.
00:11:26.340 --> 00:11:28.520
Other than that, they're updating all their stuff all the time.
00:11:28.580 --> 00:11:32.900
So I think they're pretty good stewards of being part of the Python community is what I'm saying.
00:11:32.900 --> 00:11:33.260
Cool.
00:11:33.260 --> 00:11:33.700
All right.
00:11:33.700 --> 00:11:34.400
Back to you.
00:11:34.400 --> 00:11:37.200
I've got those are a couple of heavy topics.
00:11:37.200 --> 00:11:38.820
I've got a lightweight one.
00:11:38.820 --> 00:11:44.680
This comes from somebody that goes by the name of Quantum, QNTM.
00:11:44.680 --> 00:11:46.360
And it's here.
00:11:46.360 --> 00:11:47.060
Are they not there?
00:11:47.060 --> 00:11:47.620
We don't know.
00:11:47.620 --> 00:11:48.360
We don't know.
00:11:48.360 --> 00:11:50.380
But also a sci-fi writer.
00:11:50.380 --> 00:11:52.800
So apparently I was looking into it like, who is Quantum?
00:11:52.800 --> 00:11:55.840
But anyway, developer philosophy.
00:11:55.840 --> 00:12:01.360
So this is the idea was that I think it was at their work or something.
00:12:01.360 --> 00:12:03.600
Yeah, at work a few weeks ago.
00:12:03.600 --> 00:12:15.360
They had a talk where they wanted to take some senior developers, including this person, and present for five minutes some personal software development philosophies for junior developers.
00:12:15.360 --> 00:12:17.200
So some just like tips.
00:12:17.360 --> 00:12:22.880
And I was going through these, and I think I was like, yeah, a lot of these are good things to just remember.
00:12:22.880 --> 00:12:26.180
So I'm going to just run through a handful of them.
00:12:26.180 --> 00:12:27.580
There really only is a handful.
00:12:27.580 --> 00:12:36.220
But first was avoid at all costs arriving at this scenario where a ground-up rewrite starts to look attractive.
00:12:36.220 --> 00:12:44.060
And at first glance, I thought, oh, this is like, you know, basically, if you ever think you want to rewrite everything, don't.
00:12:44.060 --> 00:12:46.060
Because it's way harder than it looks.
00:12:46.340 --> 00:12:47.460
But it's not really that.
00:12:47.460 --> 00:13:00.680
It's also the commentary is around if you got to that point, there were a whole bunch of decisions along the way where people could have seen red flags and said, we're adding something horrible to this system.
00:13:01.120 --> 00:13:06.620
And let's maybe back up and do it a little bit more carefully so that we don't have to rewrite it in the future.
00:13:07.220 --> 00:13:17.760
And so it's about like thinking about that warning signs of watching for technical debt and cleaning up as you go along instead of waiting till the end and you're ready to throw it away.
00:13:17.760 --> 00:13:21.220
Because what usually happens is it doesn't get rewritten.
00:13:21.620 --> 00:13:25.380
All the core people that used to do it just leave and go to another company.
00:13:25.380 --> 00:13:26.100
So anyway.
00:13:26.100 -->
00:13:27.300
Okay.
00:13:27.300 --> 00:13:27.740
Next.
00:13:27.740 --> 00:13:28.940
I love this.
00:13:28.940 --> 00:13:34.160
Aim to be 90% done in 50% of the available time.
00:13:34.740 --> 00:13:36.200
And this seems insane, right?
00:13:36.200 --> 00:13:38.080
Except for it's the right way.
00:13:38.080 --> 00:13:38.900
No, it's right.
00:13:38.900 --> 00:13:40.360
It's the right thing to do.
00:13:40.360 --> 00:13:44.240
There's a quote that I'd forgotten about that.
00:13:44.240 --> 00:13:45.100
I love this.
00:13:45.300 --> 00:13:48.500
It's the first 90% of the job takes 90% of the time.
00:13:48.500 --> 00:13:51.900
The last 10% of the job takes the other 90% of the time.
00:13:51.900 --> 00:13:54.900
Yeah.
00:13:54.900 --> 00:13:56.320
So anyway.
00:13:56.320 --> 00:14:01.680
And those bad at math, the joke is that there isn't 180% of the time.
00:14:01.680 --> 00:14:02.540
You only have 100.
00:14:02.540 --> 00:14:03.000
Anyway.
00:14:03.000 --> 00:14:10.800
And like, anyway, just that's important to keep in mind the last little bit.
00:14:10.800 --> 00:14:12.860
I thought this is a complete tangent.
00:14:13.240 --> 00:14:15.860
It's like moving out of a house or an apartment.
00:14:15.860 --> 00:14:18.880
You can get 90% of your stuff out.
00:14:18.880 --> 00:14:21.680
And you're like, there's like a day left to get everything else out.
00:14:21.680 --> 00:14:22.460
There's junk drawers.
00:14:22.460 --> 00:14:22.940
Yeah.
00:14:22.940 --> 00:14:23.960
There's junk drawers.
00:14:23.960 --> 00:14:27.080
There's stuff in cupboards that you forgot about.
00:14:27.080 --> 00:14:29.540
And the rest of it takes half the time.
00:14:29.540 --> 00:14:30.100
Yeah.
00:14:30.100 --> 00:14:32.640
People are kind of new to these situations.
00:14:32.640 --> 00:14:34.320
They haven't done a ton of big projects.
00:14:34.320 --> 00:14:34.800
Yeah.
00:14:34.800 --> 00:14:36.580
You get it working.
00:14:36.580 --> 00:14:38.840
You get it working pretty quickly.
00:14:38.840 --> 00:14:39.660
You're like, look, it works.
00:14:39.660 --> 00:14:47.840
But it's the error handling, the logging, the retry, the failover, the e-commerce, the email, the reset your password.
00:14:48.500 --> 00:14:51.780
None of the stuff that actually has anything to do with the thing you're trying to build.
00:14:51.780 --> 00:14:57.720
But it's not a product or a proper professional thing until those are all in place.
00:14:57.720 --> 00:14:59.720
And that's like the other 90%.
00:14:59.720 --> 00:15:02.680
Hooking up the payment system so people can actually pay you for it.
00:15:02.680 --> 00:15:03.200
Things like that.
00:15:03.200 --> 00:15:03.300
Yes.
00:15:03.300 --> 00:15:03.740
All of them.
00:15:03.740 --> 00:15:04.000
Yeah.
00:15:04.000 --> 00:15:04.760
All of that.
00:15:05.060 --> 00:15:07.100
And then you're like, well, now I got to deal with taxes.
00:15:07.100 --> 00:15:07.940
Oh, my gosh.
00:15:07.940 --> 00:15:13.160
How did we end up dealing with taxes
when I was just trying to add a to-do thing to the thing?
00:15:13.160 --> 00:15:14.660
And I got it done two months ago.
00:15:14.660 --> 00:15:16.040
That's how it goes.
00:15:16.040 --> 00:15:23.280
I just saw a post the other day that said, I'm so glad that we spent so much time on parallelograms in school and not very much time on taxes.
00:15:23.280 --> 00:15:24.920
Yes.
00:15:24.920 --> 00:15:25.800
Oh, my gosh.
00:15:25.800 --> 00:15:27.340
100% fair.
00:15:28.120 --> 00:15:31.620
Jumping ahead a little, again, automate good practice.
00:15:31.620 --> 00:15:34.100
And this is kind of a big one.
00:15:34.100 --> 00:15:46.400
But this one reminded me of a time where basically in developing processes for teams, you automate the right way to do things so that the right way to do things is the easy way.
00:15:46.400 --> 00:15:48.700
And then you don't have to convince people to do it.
00:15:48.700 --> 00:15:50.280
They'll just want to take the easy way.
00:15:50.280 --> 00:15:51.840
And automation helps.
00:15:51.840 --> 00:15:52.860
Think about.
00:15:52.860 --> 00:15:55.820
It could be cookie cutter or copier templates.
00:15:56.320 --> 00:15:58.280
It could be get pre-commit hooks.
00:15:58.280 --> 00:15:59.640
It could be continuous integration.
00:15:59.640 --> 00:16:00.200
Yeah.
00:16:00.200 --> 00:16:02.900
There's all sorts of easy low-hanging fruit there.
00:16:02.900 --> 00:16:03.340
Yeah.
00:16:03.340 --> 00:16:09.840
If you want to make sure that everybody's setting up their environment correctly, write a setup script to just set things up.
00:16:09.840 --> 00:16:10.280
Yeah.
00:16:10.280 --> 00:16:11.440
Or Docker or whatever.
00:16:11.440 --> 00:16:11.720
Yep.
00:16:11.720 --> 00:16:13.020
Docker's a good idea.
00:16:13.020 --> 00:16:15.240
Think about pathological data.
00:16:15.240 --> 00:16:23.500
I'm going to actually, like, I'd like to kick this one out because I think too many people think about the, it says nobody cares about the golden path.
00:16:23.500 --> 00:16:25.780
The edge cases are the entire job.
00:16:25.960 --> 00:16:33.600
And while that's true, I think that people stop writing tests because they want to just write, they, like, focus on all these edge cases.
00:16:33.600 --> 00:16:36.500
And start with your happy path.
00:16:36.500 --> 00:16:42.860
And at least document and test your happy path before you get into the corner cases, at least.
00:16:42.860 --> 00:16:43.740
So, anyway.
00:16:43.740 --> 00:16:46.240
Well, I'll jump ahead.
00:16:46.240 --> 00:16:48.100
There's usually a simple way to write it.
00:16:48.100 --> 00:16:49.040
Yes.
00:16:49.320 --> 00:16:51.420
But sometimes crufty is fine.
00:16:51.420 --> 00:16:54.280
Write code to be testable.
00:16:54.280 --> 00:16:54.880
Yes.
00:16:54.880 --> 00:16:56.280
And then.
00:16:56.280 --> 00:16:58.240
Can I add one about your testing?
00:16:58.240 --> 00:17:00.920
Just like a corollary or a lemma?
00:17:00.920 --> 00:17:01.760
How about a lemma?
00:17:01.760 --> 00:17:02.220
Okay.
00:17:02.220 --> 00:17:06.240
Know when to write code that should be maintainable and know when to write throwaway code.
00:17:06.240 --> 00:17:06.640
Yeah.
00:17:06.640 --> 00:17:07.020
Yeah.
00:17:07.020 --> 00:17:07.560
Definitely.
00:17:08.660 --> 00:17:09.100
Yeah.
00:17:09.100 --> 00:17:15.820
And, you know, whenever, when a lot of people say write code to be testable, they kind of mean that units can be testable.
00:17:15.820 --> 00:17:21.720
And I'm, I'm, people that don't know, I'm more of a, if you can test it from the system level, that's good enough.
00:17:23.000 --> 00:17:27.940
Then also in it's, it is insufficient for code to be provably correct.
00:17:27.940 --> 00:17:31.080
It should be obviously visibly trivially correct.
00:17:31.080 --> 00:17:38.860
And then I'm going to add a corollary to be, even if it's obviously visibly and trivially correct, it will fail sometimes.
00:17:38.860 --> 00:17:40.320
So you should write a test for it.
00:17:40.320 --> 00:17:40.760
So.
00:17:40.760 --> 00:17:41.420
Yeah.
00:17:41.420 --> 00:17:45.520
And another one, think about your, choose your dependencies wisely.
00:17:45.520 --> 00:17:46.640
Right.
00:17:46.640 --> 00:17:48.100
Channeling Armin last week.
00:17:48.100 --> 00:17:48.560
Yeah.
00:17:48.560 --> 00:17:49.680
Two weeks ago, last episode.
00:17:49.680 --> 00:17:51.360
Anyway, some good things to think about.
00:17:51.620 --> 00:17:56.720
Even if, even if I disagree with the author in a few cases, I like the, it's good.
00:17:56.720 --> 00:17:58.920
It's a good, nice round topic list.
00:17:58.920 --> 00:17:59.500
I see.
00:17:59.500 --> 00:18:02.220
You're more in the classical physics, physics, not quantum.
00:18:02.220 --> 00:18:02.880
I understand.
00:18:02.880 --> 00:18:04.320
I'm a classicist.
00:18:04.320 --> 00:18:04.600
Yes.
00:18:04.600 --> 00:18:05.640
Yes, exactly.
00:18:05.640 --> 00:18:06.960
All right.
00:18:06.960 --> 00:18:09.940
Well, it's time for another new Python.
00:18:09.940 --> 00:18:10.800
Very, very cool.
00:18:10.800 --> 00:18:11.560
Love it.
00:18:11.560 --> 00:18:16.720
So Python 3.12.13, the second maintenance release.
00:18:16.720 --> 00:18:17.300
Yes, that's right.
00:18:17.300 --> 00:18:19.100
Because the first one wasn't a maintenance release.
00:18:19.100 --> 00:18:21.160
3.13.2.
00:18:21.440 --> 00:18:22.360
3.13.2.
00:18:22.360 --> 00:18:26.180
I don't know what word letters, numbers I use, but 3.13.2 final is out.
00:18:26.180 --> 00:18:29.040
And there are 250 changes.
00:18:29.040 --> 00:18:29.520
Wow.
00:18:29.520 --> 00:18:30.120
That's a lot.
00:18:30.120 --> 00:18:32.060
That's a lot of changes for something here.
00:18:32.060 --> 00:18:36.100
So, you know, it's funny when you go to the blog post and you look at it, it just says,
00:18:36.100 --> 00:18:37.920
it drives me crazy.
00:18:38.120 --> 00:18:43.560
They link to the changes for 3.12 or 3.13 or whatever it is you're on.
00:18:43.560 -->
00:18:44.460
They'll link to that.
00:18:44.700 --> 00:18:46.260
And it'll say, here's what's new.
00:18:46.260 --> 00:18:50.080
Oh, we have a new specialized interpreter feature and stuff.
00:18:50.080 --> 00:18:51.700
And like, that's not the release notes for this one.
00:18:51.700 --> 00:18:52.580
That's just the whole thing.
00:18:52.680 --> 00:18:55.320
So I'm linking to the actual changelog for this one.
00:18:55.320 --> 00:18:57.160
And you can flip through and see every single one.
00:18:57.160 --> 00:19:00.040
And most of them are GitHub images issues.
00:19:00.540 --> 00:19:07.540
gh-whatever, like, fixed pyreple failure when os.environment is overwritten with an invalid value.
00:19:07.540 --> 00:19:08.500
Like, oh, okay.
00:19:08.500 --> 00:19:11.000
I guess you can set that value to something.
00:19:11.000 --> 00:19:12.160
It seems weird, but sure.
00:19:12.160 --> 00:19:14.480
Anyway, you can look through here.
00:19:14.480 --> 00:19:22.340
And probably most interesting to people would be around the security in which there's 1, 2, 3, 4, 5 different issues for security,
00:19:22.340 --> 00:19:27.140
which even if you think Python's working fine for you, you might want to, you know, know about that kind of stuff
00:19:27.140 --> 00:19:29.000
because that always makes me nervous.
00:19:29.000 --> 00:19:29.640
I don't know about you.
00:19:29.640 --> 00:19:30.040
Yeah.
00:19:30.280 --> 00:19:30.480
Yeah.
00:19:30.480 --> 00:19:31.780
They have a performance section.
00:19:31.780 --> 00:19:35.020
Now they just have performance stuff mixed in throughout the other.
00:19:35.020 --> 00:19:36.880
But there's also some performance updates.
00:19:36.880 --> 00:19:38.120
Let's see.
00:19:38.120 --> 00:19:45.080
And for us, Brian, all we got to do to make all of the apps, including Python Bytes, Python Byte Search, some of the other stuff,
00:19:45.080 --> 00:19:46.700
go to the Docker container.
00:19:46.700 --> 00:19:48.340
It has one of the words.
00:19:48.340 --> 00:19:49.240
I have it in the show notes.
00:19:49.240 --> 00:19:54.300
The command is just run uv venv-python 313.
00:19:54.300 --> 00:19:57.800
Just rebuild that Docker container, which everybody else depends on.
00:19:57.800 --> 00:19:58.880
Rebuild all the Docker.
00:19:58.880 --> 00:20:01.420
It can just say, you know, build everything that needs updating.
00:20:01.420 --> 00:20:03.520
All the apps are now running the brand new version.
00:20:03.520 --> 00:20:05.880
So that's a little bit of that automate the magic.
00:20:05.880 --> 00:20:06.980
You don't have to change them, right?
00:20:06.980 --> 00:20:10.400
You just like, everything depends on this base Python Docker container.
00:20:10.400 --> 00:20:14.240
If you tell uv, which is amazing, to install the new one, then they all get it straight away.
00:20:14.440 --> 00:20:15.140
Yeah, nice.
00:20:15.140 --> 00:20:15.600
Yeah.
00:20:15.600 --> 00:20:16.220
All right.
00:20:16.220 --> 00:20:17.520
Is that all of our stuff?
00:20:17.520 --> 00:20:18.260
I think it is.
00:20:18.260 --> 00:20:19.580
I think it is all of them.
00:20:19.580 --> 00:20:20.260
Yeah, extra.
00:20:20.260 --> 00:20:20.800
Extra.
00:20:20.800 --> 00:20:21.220
Here we are.
00:20:21.220 --> 00:20:22.320
You got any extras?
00:20:22.320 --> 00:20:23.700
I just have.
00:20:23.700 --> 00:20:25.020
Yeah, I just have one.
00:20:25.020 --> 00:20:25.880
Okay.
00:20:25.880 --> 00:20:26.720
Pop it up.
00:20:26.720 --> 00:20:27.280
Let's see.
00:20:27.280 --> 00:20:35.780
I've been thinking about plugins a lot lately still with the top pytest plugin list and trying
00:20:35.780 --> 00:20:39.180
to set up episodes, podcast episodes around them.
00:20:39.540 --> 00:20:43.840
But the plugin list has gotten a couple updates.
00:20:43.840 --> 00:20:50.440
February update, for example, which is the data set that I get this from is pulling from
00:20:50.440 --> 00:20:52.240
15,000, which is plenty.
00:20:52.240 --> 00:20:54.580
That's a pretty good set.
00:20:54.580 --> 00:20:54.980
Yeah.
00:20:54.980 --> 00:21:00.520
You get much more than 200 plugins and it starts getting into the weeds of stuff that's not
00:21:00.520 --> 00:21:01.640
useful for a lot of people.
00:21:01.640 --> 00:21:03.360
So that's good enough.
00:21:04.100 --> 00:21:11.560
However, I was just looking for the name pytest and then a couple people reminded me that
00:21:11.560 --> 00:21:17.140
Hypothesis has a plugin built into it, a little one to help with pytest.
00:21:17.140 --> 00:21:22.120
And then there was another one called Syrupy, which I want to check out, which is...
00:21:22.120 --> 00:21:22.900
I never use that one.
00:21:22.900 --> 00:21:23.560
It's real sticky.
00:21:23.560 --> 00:21:25.080
Yeah.
00:21:25.080 --> 00:21:26.380
But it looks cool.
00:21:26.380 --> 00:21:27.640
So I'm going to check that one out too.
00:21:27.640 --> 00:21:32.560
So there is other ways I could figure out if it's a plugin.
00:21:32.560 --> 00:21:36.340
Like I could look at the Trove classifiers and I probably should, but I'm not.
00:21:36.340 --> 00:21:39.320
So if there is something that doesn't...
00:21:39.320 --> 00:21:41.900
That's a plugin that doesn't have pytest in the name, let me know.
00:21:41.900 --> 00:21:45.420
And I will add it to the list of possible inclusions.
00:21:45.420 --> 00:21:47.800
It still goes by order.
00:21:47.800 --> 00:21:52.460
And then I also added links to the podcast episode.
00:21:52.460 --> 00:21:57.340
So if I've covered one of these things on a podcast episode, you can just get to the link
00:21:57.340 --> 00:21:58.160
right from...
00:21:58.160 --> 00:21:58.880
Oh, that's a good idea.
00:21:58.880 --> 00:21:59.400
I like it.
00:21:59.400 --> 00:22:02.360
And that's really what I wanted to cover.
00:22:02.360 --> 00:22:03.060
So, yeah.
00:22:03.060 --> 00:22:04.160
Excellent.
00:22:04.160 --> 00:22:06.500
I got a few additional things to cover.
00:22:06.500 --> 00:22:07.080
Not too many.
00:22:07.080 --> 00:22:07.860
PyScript.
00:22:07.860 --> 00:22:13.640
You know, PyScript where you can run Python, but in the browser on the front end using WebAssembly.
00:22:13.640 --> 00:22:16.280
That's a really cool project based out of Anaconda.
00:22:16.280 --> 00:22:17.780
They had a new release.
00:22:17.780 --> 00:22:21.160
And primarily, this adds better support for PyGame.
00:22:21.160 --> 00:22:22.380
So imagine this, Brian.
00:22:22.380 --> 00:22:26.340
You create a PyGame game, and then you want to share it with people.
00:22:26.500 --> 00:22:32.180
Back to your very original item, like packaging Python to give to somebody is tremendously hard
00:22:32.180 --> 00:22:33.320
to do.
00:22:33.320 --> 00:22:39.000
So especially if you're a young enthusiast creating a platformer 2D scroller game, and you build
00:22:39.000 --> 00:22:40.720
it, and you're like, well, now how do I send it to my friends?
00:22:40.720 --> 00:22:42.320
That's going to be frustrating, right?
00:22:42.580 --> 00:22:47.200
So with this, you can just write it in PyGame using the PyGame CE library, and then say,
00:22:47.200 --> 00:22:50.740
the way you get it is I publish it to Netlify or any other static site place.
00:22:50.740 --> 00:22:51.580
Now you have the game.
00:22:51.580 --> 00:22:52.400
Ooh, neat.
00:22:52.400 --> 00:22:52.980
That's cool.
00:22:52.980 --> 00:22:54.800
So anyway, give that a shout out.
00:22:55.160 --> 00:22:57.720
Now, we also got some, remember Teacup, Teapot?
00:22:57.720 --> 00:22:58.500
The Teapot?
00:22:58.500 --> 00:22:59.300
Yeah.
00:22:59.300 --> 00:23:00.100
What?
00:23:00.100 --> 00:23:02.200
I have some follow-up.
00:23:02.200 --> 00:23:03.380
Oh, boy.
00:23:03.380 --> 00:23:06.680
I don't have the, I don't think I'm logged in.
00:23:06.680 --> 00:23:07.740
I don't want to mess with logging in right now.
00:23:07.740 --> 00:23:09.400
So we'll come back to this.
00:23:09.400 --> 00:23:11.940
So first name is, I thought it was Michael.
00:23:11.940 --> 00:23:12.100
Yeah.
00:23:12.100 --> 00:23:15.320
Michael Bayon gave us some awesome follow-up on that.
00:23:15.320 --> 00:23:18.360
But I'll do it next time, because I didn't write the notes down, and they're really long.
00:23:18.360 --> 00:23:20.120
And I don't want to misconstrue them.
00:23:20.120 --> 00:23:20.800
All right.
00:23:20.800 --> 00:23:22.220
A couple things around peps.
00:23:22.220 --> 00:23:23.780
Coming back to the peps we've talked about.
00:23:23.780 --> 00:23:24.220
Pep.
00:23:24.540 --> 00:23:26.160
I love the name, 2026.
00:23:26.160 --> 00:23:26.940
It's so good.
00:23:26.940 --> 00:23:27.720
Pep.
00:23:27.720 --> 00:23:30.920
We have 2026, which was supposed to be calendar versioning for Python.
00:23:30.920 --> 00:23:31.420
Yeah.
00:23:31.420 --> 00:23:32.260
Rejected.
00:23:32.260 --> 00:23:33.260
Sad face.
00:23:33.260 --> 00:23:35.400
I really wish this would have, this was done by Hugo.
00:23:35.400 --> 00:23:37.160
And I really wish it would have gone through.
00:23:37.160 --> 00:23:40.000
Because we already have calendar versioning.
00:23:40.000 --> 00:23:42.620
We just have that offset by 12 years.
00:23:42.620 --> 00:23:45.080
Like calendar-ver minus 12 is what we have.
00:23:45.080 --> 00:23:48.060
So why don't we just have calendar-ver, where it's more straightforward?
00:23:48.060 --> 00:23:54.200
The one thing I wasn't super psyched about with this proposal was it was going to be like Python 3.26 or something.
00:23:54.420 --> 00:23:59.020
For 2026 instead of just like 23.04, 24.04.
00:23:59.020 --> 00:24:02.780
Instead of actually just the year, 2025, 2026.
00:24:02.780 --> 00:24:06.940
If you're going to make it's calendar version, make it really clear, like this means the year.
00:24:06.940 --> 00:24:07.540
You know what I mean?
00:24:07.540 --> 00:24:09.760
Not like, oh, if I interpreted that right, that means the year.
00:24:09.760 --> 00:24:10.580
But whatever.
00:24:10.580 --> 00:24:11.360
It got rejected.
00:24:12.040 --> 00:24:15.600
Well, you said 12 years, but I was thinking it's 11.
00:24:15.600 --> 00:24:16.660
I think it's 11 years.
00:24:16.660 --> 00:24:17.300
It's 11.
00:24:17.440 --> 00:24:21.040
So 2025 minus 11 is 14.
00:24:21.040 --> 00:24:21.960
That one, we're at.
00:24:21.960 --> 00:24:22.940
Well, we're at 13.
00:24:22.940 --> 00:24:23.980
Oh.
00:24:23.980 --> 00:24:27.180
But we're going to have 14 at the end of the year.
00:24:27.180 --> 00:24:28.520
Oh, my gosh.
00:24:28.520 --> 00:24:28.980
Yeah.
00:24:28.980 --> 00:24:30.800
I guess that is interesting.
00:24:30.800 --> 00:24:32.200
Like, when does it actually come out, right?
00:24:32.200 --> 00:24:32.780
Yeah.
00:24:32.780 --> 00:24:33.540
Because, yeah.
00:24:33.540 --> 00:24:34.720
Because, yeah.
00:24:34.840 --> 00:24:35.740
That must have been it.
00:24:35.740 --> 00:24:40.340
Because Brett Cannon mentioned that you can figure it out by dialing it.
00:24:40.340 --> 00:24:42.760
It's like the spinal tap thing.
00:24:42.760 --> 00:24:43.600
Dial it up to 11.
00:24:43.600 --> 00:24:44.740
It goes to 11.
00:24:44.740 --> 00:24:46.300
At the end of the year, it does, yes.
00:24:46.300 --> 00:24:46.960
At the end of the year.
00:24:46.960 --> 00:24:48.060
But not at the beginning of the year.
00:24:48.060 --> 00:24:48.640
Oh.
00:24:48.640 --> 00:24:51.400
And more importantly, not for 80% of the year.
00:24:51.400 --> 00:24:51.900
Right?
00:24:51.900 --> 00:24:52.440
So, anyway.
00:24:52.440 --> 00:24:53.100
Okay.
00:24:53.100 --> 00:24:53.960
The majority of the year.
00:24:53.960 --> 00:24:56.440
But I still love the spinal tap angle.
00:24:56.440 --> 00:24:57.240
So I'm here for it.
00:24:57.740 --> 00:24:58.140
All right.
00:24:58.140 --> 00:25:00.520
And then external wheel hosting.
00:25:00.520 --> 00:25:03.500
This is another one of those high PA things.
00:25:03.500 --> 00:25:05.580
PEP 759 has been withdrawn.
00:25:05.580 --> 00:25:11.660
And it also was being put together by Barry Warsaw, who is participating in the original one that
00:25:11.660 --> 00:25:13.760
you talked about, the Packeting Council.
00:25:13.760 --> 00:25:14.240
Yeah.
00:25:14.240 --> 00:25:14.720
All right.
00:25:14.720 --> 00:25:15.820
That's it for my extras.
00:25:15.820 --> 00:25:16.600
Okay.
00:25:16.600 --> 00:25:17.340
Sorry, Michael.
00:25:17.340 --> 00:25:19.120
I'll get to your T-pop follow-up next time.
00:25:19.120 --> 00:25:20.060
I'll write down butter notes.
00:25:20.060 --> 00:25:22.100
Or log into the right website.
00:25:22.100 --> 00:25:22.840
Joke?
00:25:22.840 --> 00:25:23.360
Yeah.
00:25:23.360 --> 00:25:24.020
This is your joke.
00:25:24.020 --> 00:25:26.060
But I'll put it on the screen for you, guys, since I already have it pulled up.
00:25:26.060 --> 00:25:27.100
You haven't pulled up also?
00:25:27.100 --> 00:25:27.480
Okay.
00:25:27.480 --> 00:25:28.060
I do.
00:25:28.060 --> 00:25:28.580
Okay.
00:25:28.580 --> 00:25:29.060
Here we go.
00:25:29.060 --> 00:25:33.040
So, we talked about possible calendar versioning.
00:25:33.040 --> 00:25:36.100
And normally, we have semantic versioning.
00:25:36.100 --> 00:25:43.500
But Bruno Roca posts, finally, a good alternative to semantic versioning is pride versioning.
00:25:43.500 --> 00:25:44.540
Pride.
00:25:44.540 --> 00:25:46.600
The first number is your proud version.
00:25:46.600 --> 00:25:49.700
That's like 2.7 point whatever.
00:25:49.700 --> 00:25:52.300
You bump that when you're proud of the release.
00:25:52.300 --> 00:25:53.020
Right.
00:25:53.020 --> 00:25:54.520
So, in that case, the two.
00:25:54.520 --> 00:25:55.220
The two.
00:25:55.220 --> 00:25:56.840
The two to three or whatever, right?
00:25:57.020 --> 00:25:57.980
The middle one.
00:25:57.980 --> 00:25:57.980
The middle one.
00:25:57.980 --> 00:25:59.840
Like, you go from 2.6 to 2.7.
00:25:59.840 --> 00:26:01.160
That's your default version.
00:26:01.160 --> 00:26:03.520
It's just normal and okay releases and whatever.
00:26:03.520 --> 00:26:06.380
And the last digit is the shame version.
00:26:06.380 --> 00:26:09.200
You bump when fixing things.
00:26:09.200 --> 00:26:10.460
You're too embarrassed to admit.
00:26:10.460 --> 00:26:10.840
Yeah.
00:26:10.840 --> 00:26:12.180
You know what?
00:26:12.220 --> 00:26:13.960
I think I might have been using pride versioning.
00:26:13.960 --> 00:26:16.340
I think I might have.
00:26:16.340 --> 00:26:18.680
I think a lot of people use pride versioning.
00:26:18.680 --> 00:26:19.400
So, yeah.
00:26:19.400 --> 00:26:21.460
It's like, ah, just little fixes, whatever.
00:26:21.460 --> 00:26:22.180
Throw it on the end.
00:26:22.180 --> 00:26:24.340
And then releases are the middle on your right.
00:26:24.340 --> 00:26:25.840
And then, like, something awesome is happening.
00:26:26.000 --> 00:26:32.200
And I've been meaning to, it's on my back burner of things to do is to document random versioning.
00:26:32.200 --> 00:26:36.900
Because I think most versioning schemes are more random than they like to admit.
00:26:36.900 --> 00:26:37.560
Yeah.
00:26:37.560 --> 00:26:38.020
I know.
00:26:38.020 --> 00:26:38.980
So, anyway.
00:26:39.200 --> 00:26:39.600
Very good.
00:26:39.600 --> 00:26:40.080
Very good.
00:26:40.080 --> 00:26:41.420
You know, it's interesting.
00:26:41.420 --> 00:26:43.280
We compare this with ZeroVer.
00:26:43.280 --> 00:26:45.960
What does it say about the ZeroVer projects?
00:26:45.960 --> 00:26:46.540
Right?
00:26:46.540 --> 00:26:48.740
So, this is done by Mamu Hashemi.
00:26:48.740 --> 00:26:49.180
Yeah.
00:26:49.180 --> 00:26:56.580
And it talks about projects that are just ridiculous in terms of how they've not released a version.
00:26:56.580 --> 00:27:01.980
Like, React Native has had 580 releases over 10 years, but it's still zero version.
00:27:01.980 --> 00:27:02.840
Yeah.
00:27:02.840 --> 00:27:07.480
FastAPI has 203 releases, but it's still zero version.
00:27:07.700 --> 00:27:09.520
Like, these guys should have some pride.
00:27:09.520 --> 00:27:11.580
Guys and girls should have some pride in these projects.
00:27:11.580 --> 00:27:12.040
Rough.
00:27:12.040 --> 00:27:12.580
Wow.
00:27:12.580 --> 00:27:13.940
Rough is on ZeroVer.
00:27:13.940 --> 00:27:14.700
Rough.
00:27:14.700 --> 00:27:15.180
Yeah.
00:27:15.180 --> 00:27:17.700
Zig, the entire language is only on 0.13.
00:27:17.700 --> 00:27:19.160
Anyway.
00:27:19.160 --> 00:27:20.960
Pretty fun stuff.
00:27:20.960 --> 00:27:21.420
React OS.
00:27:21.420 --> 00:27:22.220
Oh, geez.
00:27:22.220 --> 00:27:22.780
Anyway.
00:27:22.780 --> 00:27:29.720
And out in the audience, Christian points out, I'm so proud when I bumped the version to one after 14 years.
00:27:29.720 --> 00:27:30.300
Love it.
00:27:30.300 --> 00:27:31.220
Yeah.
00:27:31.220 --> 00:27:31.640
1.0.
00:27:31.640 --> 00:27:32.060
Yeah.
00:27:32.060 --> 00:27:32.680
Well done.
00:27:32.680 --> 00:27:33.140
Well done.
00:27:33.140 --> 00:27:36.080
Sometimes you've got to work a while until you have a lot of pride in what you're working.
00:27:36.080 --> 00:27:37.100
But eventually, you get there.
00:27:37.140 --> 00:27:38.220
No, I like this idea.
00:27:38.220 --> 00:27:39.200
This is great.
00:27:39.200 --> 00:27:40.640
This is pride versioning.
00:27:40.640 --> 00:27:41.860
Pride versioning.
00:27:41.860 --> 00:27:42.180
Yeah.
00:27:42.180 --> 00:27:43.040
I like it.
00:27:43.040 --> 00:27:43.280
All right.
00:27:43.280 --> 00:27:44.520
Well, thanks for being here, Brian.
00:27:44.520 --> 00:27:45.180
Thank you.
00:27:45.180 --> 00:27:46.280
And thanks to everyone who listened.