WEBVTT

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

00:00:05.220 --> 00:00:11.260
This is episode 352, recorded September 12th, 2023. I'm Michael Kennedy.

00:00:11.260 --> 00:00:12.380
And I'm Brian Okken.

00:00:12.380 --> 00:00:20.680
And this episode is sponsored by us, supported by us. Support the podcast by choosing our courses,

00:00:20.680 --> 00:00:25.620
listening to our podcasts, including the new one by Brian, Python People,

00:00:25.800 --> 00:00:31.240
and the Patreon supporters, and find us on fosstodon.org. Brian, me, and the show.

00:00:31.240 --> 00:00:37.020
The link's in the show notes. And also, the show notes have how to attend the live session, if you want.

00:00:37.020 --> 00:00:37.580
Yes.

00:00:37.580 --> 00:00:39.700
Brian, what do you got to start our day here?

00:00:39.700 --> 00:00:44.900
I feel like it's the start of school, so I feel like a helicopter parent.

00:00:44.900 --> 00:00:50.000
That's right. You got your homework done? Was anyone mean to you? Can I help you out, sweetie?

00:00:51.320 --> 00:01:01.400
So, the first topic is called Heliclockter. And it is, like, apparently, it's a pun on helicopter parenting, maybe? I don't know.

00:01:01.400 --> 00:01:07.060
So, like, helicopter, but clock, get it? Kind of a helicopter.

00:01:07.760 --> 00:01:18.960
So, this was submitted by Peter Nielsen. I think he was involved in this, but the idea is, it's like date times, but they're a little bit better.

00:01:18.960 --> 00:01:25.540
So, apparently, one of the frustrations that this group had was with normal date times, and they looked into other things,

00:01:25.860 --> 00:01:35.280
is being able to just have a date time where you can just enter, like, the time, but have it be, like, aware of what time zone it's in.

00:01:35.280 --> 00:01:41.980
So, the big thing about this is a subclass of date time with some extra features.

00:01:41.980 --> 00:01:47.900
So, you've got a date time TZ, which is a time zone aware date time.

00:01:48.040 --> 00:01:53.600
And then you've got a local one, which ensures that the time zone is local time, and then a UTC.

00:01:53.600 --> 00:02:02.800
So, there are some other solutions out there that deal with just assume UTC plus zero, but that's often not convenient.

00:02:02.800 --> 00:02:08.920
And I guess one of the things they had was they wanted to be able to have date time items as objects,

00:02:08.920 --> 00:02:14.500
and then be able to sort them, but have them keep, like, maintain what time zone they were created in and stuff,

00:02:14.500 --> 00:02:16.980
which is kind of an interesting thing.

00:02:16.980 --> 00:02:21.600
So, they've got, it looks just like working with time zones.

00:02:21.600 --> 00:02:25.400
So, it looks pretty easy to work with if you've ever worked with time zones.

00:02:25.400 --> 00:02:32.320
They do have some other cool features, like statically type checkable and Pydantic integration, which is kind of neat.

00:02:32.320 --> 00:02:38.920
Anyway, they've got also an article about why they created it.

00:02:38.920 --> 00:02:41.200
Time flies when you're having zones.

00:02:41.200 --> 00:02:41.800
Nice.

00:02:41.800 --> 00:02:51.740
So, it's a pretty interesting discussion going through why they chose the solution they did of creating their own and everything.

00:02:51.740 --> 00:02:54.860
And being able to use it with mypy also is kind of cool.

00:02:54.860 --> 00:02:55.640
So, yeah.

00:02:55.640 --> 00:02:56.000
Yeah.

00:02:56.000 --> 00:02:57.000
Neat time zone.

00:02:57.000 --> 00:03:00.100
Shout out to Arrow and Pendulum as well, or some of the other well-known ones.

00:03:00.100 --> 00:03:00.300
Yeah.

00:03:00.300 --> 00:03:00.780
Yeah.

00:03:00.780 --> 00:03:06.100
Even a Datetime UTC they found, but it's UTC zero.

00:03:06.100 --> 00:03:09.720
And then they even talked about why that, like, how they designed it and why.

00:03:09.720 --> 00:03:16.380
So, their first thing was just create a completely new type, but then they, you know, came up with some problems with that.

00:03:16.380 --> 00:03:18.480
So, they came up with subclassing.

00:03:18.480 --> 00:03:23.300
So, then these new types are types of Datetime also.

00:03:23.300 --> 00:03:25.100
So, you can use other things to go with them.

00:03:25.100 --> 00:03:26.540
So, I think that's a cool solution.

00:03:26.540 --> 00:03:31.900
I'm not usually a fan of subclassing, but I think the subclassing in this case makes a lot of sense.

00:03:32.580 --> 00:03:35.000
Anyway, what you got for us?

00:03:35.000 --> 00:03:35.460
Yeah.

00:03:35.460 --> 00:03:36.300
That looks good.

00:03:36.300 --> 00:03:41.100
You know, I think it sounds so easy to be working with time, but it's always so tricky.

00:03:41.100 --> 00:03:42.080
Yeah.

00:03:42.140 --> 00:03:47.860
I have something keeping with the same color scheme here, a new release for Wagtail.

00:03:47.860 --> 00:03:50.460
And I don't believe we've talked about Wagtail before.

00:03:50.460 --> 00:03:51.800
It's possible.

00:03:51.800 --> 00:03:59.300
I, I did get a chance to use our search today, you know, and just reminded how nicely that goes.

00:03:59.300 --> 00:04:01.480
I guess we've talked to at least mention it somewhere.

00:04:01.480 --> 00:04:11.940
But Wagtail is, a CNS, the CMS, the leading open source Python CMS built on Django, but you don't necessarily have to know Django.

00:04:11.940 --> 00:04:20.660
It's kind of like WordPress in the sense that you could just go through the setup steps and run WordPress and not even worry about the fact it's written in PHP.

00:04:20.660 --> 00:04:26.340
So Wagtail is a little bit like that, but just pip install Wagtail to go get going.

00:04:26.340 --> 00:04:27.700
And it's got some really cool features.

00:04:27.780 --> 00:04:33.940
I haven't really explored it too much, but it's got this really cool visual designer for people to build out web pages and stuff.

00:04:33.940 --> 00:04:34.720
Isn't that cool?

00:04:34.720 --> 00:04:38.760
So you can like hit a little plus and you get like a nice WYSIWYG.

00:04:38.760 --> 00:04:44.300
I'm going to insert a heading or insert a table or, like a image gallery with these images.

00:04:44.300 --> 00:04:47.940
It has a cool tree structure so you can organize your content.

00:04:47.940 --> 00:04:53.280
And because it's a Django, you can extend it doing Django things, which is pretty sweet.

00:04:53.280 --> 00:04:57.120
And it has a bunch of, you can make little snippets that you can use inside your pages.

00:04:57.520 --> 00:04:58.700
So that's pretty neat.

00:04:58.700 --> 00:05:01.540
And it even has a library for managing your images.

00:05:01.540 --> 00:05:02.920
So pretty cool stuff.

00:05:02.920 --> 00:05:07.780
And the news item today is an article by Megan Voss.

00:05:07.780 --> 00:05:10.460
Come over to the dark side with Wagtail five.

00:05:10.460 --> 00:05:15.900
So Wagtail 5.0 is a new release here with a bunch of cool things.

00:05:16.120 --> 00:05:22.700
So dark mode, if you want your website, which is backed by Wagtail to have dark mode, well, dark mode is a thing.

00:05:22.700 --> 00:05:23.620
It's pretty excellent.

00:05:23.620 --> 00:05:25.460
I'm a big fan of dark mode.

00:05:25.460 --> 00:05:30.040
It has SVG image support in addition for scalable vector graphics.

00:05:30.040 --> 00:05:32.020
In addition to just JPEGs and stuff.

00:05:32.020 --> 00:05:35.600
It has an accessibility and enhanced accessibility checker.

00:05:35.600 --> 00:05:36.240
That's pretty cool.

00:05:36.240 --> 00:05:42.040
Like if you're creating content and it's hard for people who have to use screen readers or something, it can tell you that you're not doing that.

00:05:42.040 --> 00:05:50.300
Like missing paragraphs as headings, misusing paragraphs as headings, use proper tags, incorrect heading hierarchy, avoid skipping levels.

00:05:50.300 --> 00:05:50.960
Oh, wow.

00:05:50.960 --> 00:05:52.240
And, you know, things like that.

00:05:52.240 --> 00:05:52.440
Right.

00:05:52.740 --> 00:05:55.020
Which is certainly my handwritten stuff.

00:05:55.020 --> 00:05:57.980
That's only, you know, if I remember that that's how it's supposed to go.

00:05:57.980 --> 00:05:58.220
Right.

00:05:58.220 --> 00:05:59.440
So pretty sweet.

00:05:59.440 --> 00:06:01.740
What's wrong with five H1s on one page?

00:06:01.740 --> 00:06:02.880
I know.

00:06:02.880 --> 00:06:03.120
I know.

00:06:03.120 --> 00:06:05.400
I really, I really have a lot to say here.

00:06:05.400 --> 00:06:06.680
So it's all H1s.

00:06:06.680 --> 00:06:16.780
It also has, what is the, when you, if you want to delete, like say you have an image or something and it's in your gallery and you're like, ah, I'm not going to use this after I'll hit delete.

00:06:16.780 --> 00:06:25.340
It keeps track of if it's used in any other pages so you don't accidentally delete something that's being used in some part of the site you didn't know about that someone else created.

00:06:25.340 --> 00:06:26.460
That's pretty awesome.

00:06:26.460 --> 00:06:37.040
More snippets, more validation, and they threw away a bunch of old code so they can work better, which, you know, may even have a blog post on addressing technical debt.

00:06:37.040 --> 00:06:40.400
But so a few breaking changes, not too many, but, you know, check it out.

00:06:40.400 --> 00:06:42.040
Anyway, Wagtail looks pretty awesome, right?

00:06:42.040 --> 00:06:47.400
I think I may have talked about it a long time ago, but anyway, not the 5.0 release because that's quite recent.

00:06:47.400 --> 00:06:47.900
Yeah.

00:06:47.900 --> 00:06:50.580
I think it's pretty cool that that's there.

00:06:50.580 --> 00:06:55.480
And I do have plans to play with it at some point, but I've had plans to play with it for a while.

00:06:55.480 --> 00:06:56.660
So anyway.

00:06:56.660 --> 00:06:57.000
Indeed.

00:06:57.000 --> 00:07:02.900
Kim out in the audience says, I know several one-person technical businesses that really like Wagtail for their sites.

00:07:02.900 --> 00:07:07.340
Easy to use for technical competent users, but doesn't require much of their time to maintain.

00:07:07.340 --> 00:07:08.100
Yeah, that seems great.

00:07:08.100 --> 00:07:08.660
Yeah.

00:07:08.660 --> 00:07:09.200
Nice.

00:07:09.200 --> 00:07:10.660
Over to you.

00:07:10.660 --> 00:07:17.160
Well, I guess I go away from Python a little bit, but we use it all the time.

00:07:17.160 --> 00:07:19.500
So I want to talk about Git.

00:07:19.500 --> 00:07:26.880
So I don't think I use any other revision control systems anymore other than Git.

00:07:26.880 --> 00:07:27.580
No CVS?

00:07:27.580 --> 00:07:28.580
No.

00:07:28.580 --> 00:07:29.460
No CVS?

00:07:29.460 --> 00:07:30.180
Any of that good stuff?

00:07:30.180 --> 00:07:31.700
Of course.

00:07:31.700 --> 00:07:32.320
Subversion.

00:07:32.320 --> 00:07:35.900
Actually, I touch on subversion once in a while.

00:07:35.900 --> 00:07:38.700
I still have kind of good feelings towards subversion.

00:07:38.700 --> 00:07:40.880
The other ones make me a little queasy.

00:07:40.880 --> 00:07:41.700
Anyway.

00:07:41.700 --> 00:07:50.500
The thing that I often want to know is just like the stuff that happened recently on a file or something or just on a Git repository.

00:07:50.500 --> 00:07:51.320
RCS.

00:07:51.320 --> 00:07:52.100
Mike Felder.

00:07:52.100 --> 00:07:52.860
Oh, field.

00:07:52.860 --> 00:07:53.420
Fiedler.

00:07:53.420 --> 00:07:53.860
Sorry.

00:07:53.860 --> 00:07:55.000
Nice.

00:07:55.000 --> 00:07:55.900
RCS.

00:07:55.900 --> 00:07:56.300
Wow.

00:07:57.140 --> 00:07:58.080
Takes me back.

00:07:58.080 --> 00:08:01.980
But so one of the things is to Git log.

00:08:01.980 --> 00:08:04.120
So looking at what's happened recently.

00:08:04.120 --> 00:08:08.460
But the Git log output is not something I like to do.

00:08:08.460 --> 00:08:18.620
Actually, using Git log is one of the reasons why I often pop up like a visual tool to look at my Git repository because it's gross.

00:08:18.920 --> 00:08:24.140
But I forgot and I knew that you could customize it, but I kind of forgot how to.

00:08:24.140 --> 00:08:25.440
So I haven't been.

00:08:25.440 --> 00:08:28.240
But this now I have because of this article.

00:08:28.240 --> 00:08:31.760
So there's an article called Git log customization from Justin Joyce.

00:08:32.300 --> 00:08:35.560
And so the default is something like that, which we're showing.

00:08:35.560 --> 00:08:42.540
It's got a really long hash number and a bunch of information, but it's hard to find the information you need.

00:08:42.540 --> 00:08:51.000
One of the things that Justin points out is that you can do just something really easy by passing in one line.

00:08:51.400 --> 00:08:59.920
Just the flag, like two dashes in one line, all one word, will make it pretty nice, actually.

00:08:59.920 --> 00:09:04.900
It just does a short hash and you can kind of see what's going on a little bit better.

00:09:04.900 --> 00:09:06.740
But it goes a lot further.

00:09:06.740 --> 00:09:09.560
And I'm going to hop down to this really cool customization.

00:09:09.560 --> 00:09:12.480
One of the things is using graph.

00:09:12.480 --> 00:09:13.960
Graph is great.

00:09:13.960 --> 00:09:19.740
--graph so that you can see kind of it does like kind of a visual representation of the different.

00:09:19.740 --> 00:09:21.800
What are those?

00:09:21.800 --> 00:09:23.980
The branches and the merges.

00:09:23.980 --> 00:09:25.080
That's it.

00:09:25.080 --> 00:09:27.080
I always forget branches and branch or fork.

00:09:27.080 --> 00:09:29.220
No, it's an ASCII art for the win there.

00:09:29.220 --> 00:09:30.700
Yeah, ASCII art.

00:09:30.700 --> 00:09:32.720
But then you can do like color and stuff.

00:09:32.720 --> 00:09:39.260
So there's the graph does color also if you have that on everything.

00:09:39.560 --> 00:09:51.020
It talks about how he also talks about how the one line is actually a like a combination of pretty one line and abbreviate commit, which is kind of cool.

00:09:51.020 --> 00:10:01.100
And then what I really love is this the thing that he like comes up with at the end so that I didn't know that you could put aliases in the get config file.

00:10:01.100 --> 00:10:04.380
So or at least I did once and I forgot about it.

00:10:04.380 --> 00:10:06.940
But this is a pretty cool long alias.

00:10:06.940 --> 00:10:09.280
He's got LG instead of log.

00:10:09.280 --> 00:10:11.920
So save a character of typing right there.

00:10:11.920 --> 00:10:13.840
But it defaults to.

00:10:13.840 --> 00:10:17.960
So it's an alias for log with a graph with 10.

00:10:17.960 --> 00:10:19.860
So default to the last 10 commits.

00:10:19.860 --> 00:10:24.580
And then this long format thing that is kind of ugly to look at.

00:10:24.660 --> 00:10:31.480
But what you get is he talks about what it all is, but what you get is the brand, the graph.

00:10:31.480 --> 00:10:36.140
But you also get somebody's name highlighted of who did it.

00:10:36.140 --> 00:10:38.100
And then also how long ago.

00:10:38.100 --> 00:10:42.680
So was it 19 hours ago or 24 hours ago or two days, three days?

00:10:42.680 --> 00:10:44.120
Really cool.

00:10:44.120 --> 00:10:47.500
Exactly what I need usually when I'm looking at a get log.

00:10:47.500 --> 00:10:48.480
So I love it.

00:10:48.480 --> 00:10:51.360
This actually inspires me to maybe play with this as well.

00:10:51.700 --> 00:10:53.220
I usually use Sourcetree.

00:10:53.220 --> 00:10:54.460
I really like Sourcetree.

00:10:54.460 --> 00:10:58.360
But, you know, sometimes you're already in the terminal and just, you know.

00:10:58.360 --> 00:10:58.900
Yeah.

00:10:58.900 --> 00:11:04.700
And so all I did, what I did is I just like opened up my home directory, get config and added this alias.

00:11:04.700 --> 00:11:06.460
And now I just use get LG.

00:11:06.460 --> 00:11:09.660
That's and then I can forget all of this.

00:11:09.660 --> 00:11:15.760
The other one of the neat things I'm like, well, if it says by default, you can put the default, whatever you want for this alias.

00:11:15.760 --> 00:11:17.100
But like 10 lines.

00:11:17.100 --> 00:11:19.380
What if I want to see like 20 lines or 30 lines?

00:11:19.720 --> 00:11:28.400
Well, if you say get LG, even though it has the dash 10 built into it and pass in like a dash 20 or dash 30, the second one overrides it.

00:11:28.400 --> 00:11:30.560
So that's clever.

00:11:30.560 --> 00:11:31.400
Works just fine.

00:11:31.400 --> 00:11:32.260
So nice.

00:11:32.260 --> 00:11:36.340
So thank you, Justin Joyce, for writing this up.

00:11:36.340 --> 00:11:38.060
Nice job, Justin.

00:11:38.060 --> 00:11:38.800
That's pretty awesome.

00:11:38.800 --> 00:11:39.460
All right.

00:11:39.460 --> 00:11:44.160
I saw that David Lord was the one listed there in the example.

00:11:44.160 --> 00:11:44.760
Yeah.

00:11:45.020 --> 00:11:51.580
Let's keep, let's keep going that theme over to historically from the flask side of things.

00:11:51.580 --> 00:11:53.440
So I want to talk about flask.

00:11:53.440 --> 00:11:55.040
I want to talk about Jinja.

00:11:55.200 --> 00:12:01.320
So Jinja is the template language that is the default for so many frameworks.

00:12:01.320 --> 00:12:02.580
It's not best.

00:12:02.580 --> 00:12:04.460
I don't think come on chameleon.

00:12:04.460 --> 00:12:05.720
So much better.

00:12:06.160 --> 00:12:09.580
But it doesn't matter if everyone's using Jinja.

00:12:09.580 --> 00:12:10.820
Like that's what people are using.

00:12:10.820 --> 00:12:11.080
Right.

00:12:11.080 --> 00:12:12.920
It's built into all the frameworks.

00:12:12.920 --> 00:12:16.980
You got to jump through hoops to like use chameleon with say FastAPI.

00:12:16.980 --> 00:12:17.440
Right.

00:12:17.440 --> 00:12:19.120
Like I created a library to do that kind of stuff.

00:12:19.220 --> 00:12:25.100
But this is about Jinja and its origins come from flask originally created by Armin Roeneker.

00:12:25.100 --> 00:12:29.600
No longer the maintainer, David Lord and folks over at pallets is.

00:12:29.600 --> 00:12:34.960
But this new project I want to give a shout out to does come from Armin and it's called mini

00:12:34.960 --> 00:12:35.660
Jinja.

00:12:35.660 --> 00:12:38.200
Like Jinja, but smaller.

00:12:38.200 --> 00:12:44.240
So mini Jinja is a powerful, but minimal dependency template engine for rust.

00:12:44.240 --> 00:12:46.320
That's compatible with Jinja and Jinja2.

00:12:46.320 --> 00:12:50.880
So if you've got a rust project and you want to have those templates, you could use this

00:12:50.880 --> 00:12:52.100
and you'd be like, okay, Michael.

00:12:52.100 --> 00:12:53.580
Well, a Python podcast.

00:12:53.580 --> 00:12:56.720
So yeah, rust is popular, but it's comparable.

00:12:56.720 --> 00:13:02.800
If you've got a Python app, it is basically not a hundred percent identical, but pretty similar.

00:13:02.800 --> 00:13:03.180
Right.

00:13:03.180 --> 00:13:09.560
The other thing though, that's kind of interesting is it does works with Python through as project

00:13:09.560 --> 00:13:12.640
called mini Jinja dash pie.

00:13:12.640 --> 00:13:19.820
And that allows you to use the rust runtime backed template engine on whatever thing it

00:13:19.820 --> 00:13:20.740
is that you're working with.

00:13:20.740 --> 00:13:21.220
Right.

00:13:21.220 --> 00:13:23.100
Flask FastAPI, whatever.

00:13:23.100 --> 00:13:23.680
Right.

00:13:23.680 --> 00:13:29.580
So you might want to use this instead when the full set of Jinja2 features is not required

00:13:29.580 --> 00:13:32.540
and you want to have the same experience across Python or rust.

00:13:32.540 --> 00:13:37.760
There's places where you can get a slightly better performance sometimes than Jinja.

00:13:37.980 --> 00:13:43.020
It was created using maturing in py03, which is pretty cool.

00:13:43.020 --> 00:13:45.160
Like the rust Python bindings.

00:13:45.160 --> 00:13:48.140
And yeah, it just shows you how to set up and whatnot.

00:13:48.140 --> 00:13:54.020
So if you're out there doing the web things, you know, maybe have a quick look at mini Jinja.

00:13:54.020 --> 00:13:55.940
If somehow that's relevant to you.

00:13:55.940 --> 00:13:58.360
Continuing the rustification of Python.

00:13:58.940 --> 00:13:59.340
Indeed.

00:13:59.340 --> 00:14:02.140
You know, it's been around for a long time, over 30 years.

00:14:02.140 --> 00:14:04.080
So surely some rust is starting to develop.

00:14:04.080 --> 00:14:07.620
I wouldn't have expected to come on so quickly all at once like that.

00:14:07.620 --> 00:14:08.360
But there you go.

00:14:08.360 --> 00:14:09.300
Yeah.

00:14:09.300 --> 00:14:09.940
Nice.

00:14:09.940 --> 00:14:12.560
That's it for all of our items, I would say.

00:14:12.560 --> 00:14:13.220
Okay.

00:14:13.340 --> 00:14:16.700
And I've got some extras, but I know you do too.

00:14:16.700 --> 00:14:17.540
So maybe you go first.

00:14:17.540 --> 00:14:18.080
Okay.

00:14:18.080 --> 00:14:20.520
Well, I was up.

00:14:20.520 --> 00:14:27.120
We were just talking at the beginning of this before we went on air that I was having some audio trouble last night.

00:14:27.120 --> 00:14:32.120
But I was getting the pytest Primary Power course ready and launched last night.

00:14:32.120 --> 00:14:38.300
So chapter six, got done recording that yesterday morning and in the evening, finished editing the audio.

00:14:38.300 --> 00:14:43.220
So the first course in a series, pytest Primary Power.

00:14:43.220 --> 00:14:44.900
And so what does it cover?

00:14:44.900 --> 00:14:49.440
It covers test functions, fixtures, built-in fixtures, parameterization, markers.

00:14:49.440 --> 00:14:55.600
And it's really the set of things I think that you have to know to be able to be using pytest effectively.

00:14:55.600 --> 00:14:59.060
You could just take this first course and I think run with it for quite a long time.

00:14:59.060 --> 00:15:02.300
So to celebrate getting it done and back to school.

00:15:02.300 --> 00:15:04.440
I know everybody's with kids.

00:15:04.440 --> 00:15:07.500
Kids are probably started last week or the week before.

00:15:07.500 --> 00:15:11.720
It might sound like it's for school, but now the kids are out of the house.

00:15:11.720 --> 00:15:14.640
You actually have time and energy to study things again.

00:15:14.640 --> 00:15:15.720
That's my house anyway.

00:15:15.720 --> 00:15:16.280
Yeah.

00:15:16.280 --> 00:15:16.860
Yeah.

00:15:16.860 --> 00:15:19.460
So I'm offering a deal for it.

00:15:19.460 --> 00:15:21.980
So 49 bucks for the first course.

00:15:21.980 --> 00:15:24.560
And if you want to do the bundle, $99.

00:15:24.560 --> 00:15:29.920
And the bundle is kind of fun because I've already had some, we've got a lot of channels to get feedback.

00:15:29.920 --> 00:15:37.540
I had some feedback this last night and this morning saying, hey, I'm trying this on Python 3.8 and it's, it doesn't work.

00:15:37.540 --> 00:15:38.820
So, but it does now.

00:15:38.820 --> 00:15:50.620
So this morning I did the, it was like the from future import annotations I had to do to make the annotations from 3.10 be compatible to Python, way back to Python 3.7.

00:15:50.620 --> 00:15:52.660
So I tested it on 3.7 this morning.

00:15:52.800 --> 00:15:54.380
So everything should be working.

00:15:54.380 --> 00:15:56.940
So anyway, pretty excited about that.

00:15:56.940 --> 00:15:57.100
Excellent.

00:15:57.100 --> 00:15:57.720
Yeah.

00:15:57.720 --> 00:15:58.200
Congratulations.

00:15:58.200 --> 00:15:59.060
That's a big step.

00:15:59.060 --> 00:16:01.420
If you see something like this, you're in the right place.

00:16:01.420 --> 00:16:02.260
So thanks.

00:16:02.260 --> 00:16:04.180
How about you?

00:16:04.180 --> 00:16:07.440
The testing code logo and roll in the course for 49 bucks.

00:16:07.440 --> 00:16:07.740
Awesome.

00:16:08.400 --> 00:16:10.340
Keeping with the course theme a little bit.

00:16:10.340 --> 00:16:14.600
I have three new courses coming out at Talk Python Training.

00:16:14.600 --> 00:16:19.600
We have a new HTMX plus Django course, which is going to be excellent.

00:16:19.600 --> 00:16:23.620
A new language based course without more detail on that.

00:16:23.620 --> 00:16:27.840
And one or two data science courses coming in quite soon.

00:16:27.840 --> 00:16:33.120
And since it's a bunch of, a bunch of things, all of them not quite released yet.

00:16:33.120 --> 00:16:38.060
Just point people at Talk Python training.talkpython.fm/getnotified.

00:16:38.060 --> 00:16:43.960
And there, if you're not already in the mailing list, put your name and email in here and you'll

00:16:43.960 --> 00:16:46.300
get to hear about them when, or keep listening to the podcast.

00:16:46.300 --> 00:16:47.760
I'm sure I'll talk about it then as well.

00:16:47.760 --> 00:16:50.980
I also just want to give a shout out to Cloudflare Turnstile.

00:16:50.980 --> 00:16:58.320
I've been going through and classifying trucks, cars, crosswalks, stoplights.

00:16:58.320 --> 00:16:59.500
Holy moly.

00:16:59.500 --> 00:17:02.740
What a dreadful, unnecessary thing.

00:17:02.740 --> 00:17:12.260
So way back in 304 on October, 2022, I talked about Turnstile, which is a privacy friendly,

00:17:12.260 --> 00:17:18.420
user friendly, privacy preserving alternative to reCAPTCHA and all those things.

00:17:18.420 --> 00:17:20.000
And it just sits down here.

00:17:20.000 --> 00:17:23.980
And while we're waiting, you know how, like sometimes if you are slow filling out a form,

00:17:23.980 --> 00:17:28.980
it'll say your selection of taxis has expired and you got to do it again.

00:17:29.880 --> 00:17:35.020
This one automatically, I saw it while I was waiting for you to talk about your new course

00:17:35.020 --> 00:17:35.560
and bundle.

00:17:35.560 --> 00:17:40.520
That thing just did a little flicker and regenerated its validation with no user input,

00:17:40.520 --> 00:17:41.620
just in the background.

00:17:41.620 --> 00:17:42.300
Telling you.

00:17:42.300 --> 00:17:42.660
Come on.

00:17:42.660 --> 00:17:44.460
So how does it know you're not a robot?

00:17:44.460 --> 00:17:45.020
Do you know?

00:17:45.020 --> 00:17:51.340
It runs some JavaScript and it also, I think, you know, I don't remember all the details.

00:17:51.340 --> 00:17:55.900
It runs through a bunch of other heuristics that like they know from, I think from your

00:17:55.900 --> 00:18:01.780
IP address talking to, because, you know, Cloudflare like fronts something like 25% of the internet.

00:18:01.780 --> 00:18:04.960
So they can tell if you're going to a bunch of different sites and things.

00:18:04.960 --> 00:18:06.640
And it kind of uses that background information.

00:18:06.640 --> 00:18:07.220
I think.

00:18:07.220 --> 00:18:08.140
I think.

00:18:08.140 --> 00:18:12.560
But anyway, I have not even had to find a taxi to be able to submit that.

00:18:12.560 --> 00:18:17.240
But it's made it so that you don't have a bunch of automated stuff coming in.

00:18:17.240 --> 00:18:17.720
Exactly.

00:18:17.720 --> 00:18:20.960
People used to be hammering on it, doing all sorts of bad stuff.

00:18:20.960 --> 00:18:21.420
Yeah.

00:18:21.420 --> 00:18:22.180
That's not good.

00:18:22.180 --> 00:18:22.960
Yep.

00:18:23.800 --> 00:18:30.520
So, yeah, I had to add it for like the login page and for the registration page.

00:18:30.520 --> 00:18:31.700
A bunch of bots were signing up.

00:18:31.700 --> 00:18:35.280
I'm like, I don't understand why they're signing up because it's a free account and you don't

00:18:35.280 --> 00:18:36.440
really get anything for free.

00:18:36.440 --> 00:18:39.540
So I couldn't understand why they were all, but hundreds of them were signing up.

00:18:39.540 --> 00:18:41.100
I'm like, okay, I'm going to do something.

00:18:41.100 --> 00:18:43.700
And then this is an improvement over reCAPTCHA.

00:18:43.700 --> 00:18:44.860
All right.

00:18:44.860 --> 00:18:45.480
PyBay.

00:18:45.480 --> 00:18:48.480
PyBay is coming up October 8th.

00:18:48.480 --> 00:18:55.700
I will be there speaking about Python type hints and how you can superpower your apps.

00:18:55.700 --> 00:19:00.020
Something like five amazing ways and tools you can use with your apps, I believe is what

00:19:00.020 --> 00:19:02.140
my topic is roughly supposed to be.

00:19:02.140 --> 00:19:08.520
But I will be there and people can, they happen to be in the San Francisco area or wanting to

00:19:08.520 --> 00:19:08.780
be there.

00:19:08.780 --> 00:19:09.860
They can check it out.

00:19:09.860 --> 00:19:11.280
They gave me a coupon.

00:19:11.280 --> 00:19:13.060
It's a friend of speaker.

00:19:13.060 --> 00:19:16.780
If you use that friend of speaker, no spaces, you get 20% off regular tickets.

00:19:16.780 --> 00:19:18.200
So that's always fun.

00:19:18.560 --> 00:19:18.760
Nice.

00:19:18.760 --> 00:19:19.220
Yeah.

00:19:19.220 --> 00:19:22.240
Always a fun trip, a road trip down to San Francisco.

00:19:22.240 --> 00:19:27.280
And let's see, following up on your doc strings, we got some really nice follow up here, Brian.

00:19:27.280 --> 00:19:34.500
Rhett Turnbull says, with regard to the doc strings article Brian covered last episode, the Google

00:19:34.500 --> 00:19:37.820
format allows for a raises section.

00:19:37.820 --> 00:19:41.320
Remember I said, oh, it'd be awesome if you could say actually what errors could happen.

00:19:41.320 --> 00:19:41.880
Yeah.

00:19:41.880 --> 00:19:42.520
That's really cool.

00:19:42.520 --> 00:19:47.120
And Rhett uses Google doc string format for projects, type hints, descriptive variable names,

00:19:47.500 --> 00:19:49.480
MK docs and MkDocs strings.

00:19:49.480 --> 00:19:52.820
Get pretty docs are free and VS Code will pull doc strings.

00:19:52.820 --> 00:19:57.180
So you can see them in the editor and copilot practically writes the doc streams for you, which

00:19:57.180 --> 00:19:57.740
is excellent.

00:19:57.740 --> 00:20:00.900
And one second attribution.

00:20:01.220 --> 00:20:04.100
John Hagan sent over something saying pretty similar.

00:20:04.100 --> 00:20:08.480
Say, remember we said, look, you don't necessarily need to include the type in the doc string.

00:20:08.480 --> 00:20:11.240
If there's a type hint and sure enough, you don't have to.

00:20:11.240 --> 00:20:11.820
Oh, cool.

00:20:11.820 --> 00:20:13.700
You can just give it a description, which is cool.

00:20:13.900 --> 00:20:17.020
And also points out the syntax for how you use the raises.

00:20:17.020 --> 00:20:20.800
So you say raises and you give it a list of exception types.

00:20:20.800 --> 00:20:24.400
And then the description of when the scenarios, when that might happen.

00:20:24.400 --> 00:20:27.480
So for example, raises invalid factorial error.

00:20:27.480 --> 00:20:30.880
If, and is less than zero is the time that that happens.

00:20:30.880 --> 00:20:31.560
Oh, cool.

00:20:31.560 --> 00:20:32.020
Isn't that cool?

00:20:32.020 --> 00:20:32.520
Yeah.

00:20:32.520 --> 00:20:32.980
Yeah.

00:20:32.980 --> 00:20:39.460
And finally, John also points out that PyCharm has the integration for Google,

00:20:39.460 --> 00:20:42.380
doc strings somewhere in here.

00:20:42.380 --> 00:20:42.880
Yeah.

00:20:42.880 --> 00:20:45.860
for Google doc format and how to set that up.

00:20:45.860 --> 00:20:50.420
So it'll, it'll automatically auto complete and render Google doc strings.

00:20:50.420 --> 00:20:55.160
When you say, give me the quick help control Q and it'll like, just pop that up as a

00:20:55.160 --> 00:20:56.420
rendered sort of thing there.

00:20:56.420 --> 00:20:58.740
So a lot of followup on the doc strings.

00:20:58.740 --> 00:20:59.440
Awesome.

00:20:59.440 --> 00:20:59.880
Cool.

00:20:59.880 --> 00:21:00.220
Yeah.

00:21:00.220 --> 00:21:02.460
And that's all I got for my extras.

00:21:02.460 --> 00:21:03.380
How about a joke?

00:21:03.380 --> 00:21:04.000
What do you think?

00:21:04.000 --> 00:21:04.400
Yeah.

00:21:04.400 --> 00:21:04.740
You ready?

00:21:04.740 --> 00:21:06.140
I've got your joke.

00:21:06.140 --> 00:21:08.680
And then I want to do a dad joke also after that.

00:21:08.680 --> 00:21:09.120
Awesome.

00:21:09.120 --> 00:21:11.740
So this one is a lesson in optimization.

00:21:11.740 --> 00:21:14.400
Careful what you measure, careful what you ask for.

00:21:14.400 --> 00:21:14.700
Right?

00:21:14.900 --> 00:21:18.320
So there's this picture of two tennis ball containers.

00:21:18.320 --> 00:21:20.120
You know, those tubes that are vacuum sealed.

00:21:20.120 --> 00:21:20.540
Yeah.

00:21:20.540 --> 00:21:22.920
One of them is not at all optimized.

00:21:22.920 --> 00:21:29.560
It stores only three tennis balls, but the one to the right says, look, if you cut the

00:21:29.560 --> 00:21:34.680
tennis balls in half, you can, you can store six tennis balls in this container way more

00:21:34.680 --> 00:21:35.440
efficient use.

00:21:35.440 --> 00:21:36.560
Yeah.

00:21:36.560 --> 00:21:37.280
Yeah.

00:21:37.280 --> 00:21:40.780
I mean, your tennis game might suck, but that's awesome.

00:21:40.780 --> 00:21:41.380
Yeah.

00:21:41.380 --> 00:21:41.960
Yeah.

00:21:41.960 --> 00:21:42.900
So there you have it.

00:21:42.900 --> 00:21:43.380
Yeah.

00:21:43.380 --> 00:21:43.920
Okay.

00:21:43.940 --> 00:21:45.720
So over to you to close it out.

00:21:45.720 --> 00:21:51.200
I've got a joke that I just, I was reminded of the other day with, shared with

00:21:51.200 --> 00:21:51.580
my kid.

00:21:51.580 --> 00:21:52.600
It's told dad joke.

00:21:52.600 --> 00:21:56.060
So, have you seen birds fly in a B formation before?

00:21:56.060 --> 00:21:56.600
Sure.

00:21:56.600 --> 00:22:01.040
have you ever noticed that sometimes that one side is a lot longer than the other or

00:22:01.040 --> 00:22:01.900
it's longer than the other?

00:22:01.900 --> 00:22:02.300
Yeah.

00:22:02.300 --> 00:22:03.300
Do you know why that is?

00:22:03.300 --> 00:22:04.200
There's more birds.

00:22:04.200 --> 00:22:04.760
Optimize.

00:22:04.760 --> 00:22:08.380
Amazing.

00:22:08.380 --> 00:22:11.580
Anyway, it's terrible.

00:22:11.580 --> 00:22:12.160
I love it.

00:22:12.160 --> 00:22:13.120
I love it.

00:22:13.120 --> 00:22:14.380
So perfect dad joke.

00:22:14.380 --> 00:22:14.860
All right.

00:22:14.860 --> 00:22:17.120
Well, perfect episode as well.

00:22:17.120 --> 00:22:17.900
Thanks for being here.

00:22:17.900 --> 00:22:18.360
Thank you.

00:22:18.360 --> 00:22:19.180
Thanks everyone for listening.

00:22:19.180 --> 00:22:19.500
Yeah.

