WEBVTT
00:00:00.020 -->
00:00:00.780Hey, Brian. Hey, everyone.
00:00:01.240 -->
00:00:01.340Hey.
00:00:01.660 -->
00:00:02.200Happy summer.
00:00:02.680 -->
00:00:04.480It's lovely. Been working in the garden.
00:00:04.860 -->
00:00:05.540I know. Me too.
00:00:05.890 -->
00:00:08.320I have six bags of leaves I've piled up outside.
00:00:09.200 -->
00:00:11.780It's only a tiny corner of my yard that I...
00:00:12.540 -->
00:00:13.080Yeah, there's a lot of leaves.
00:00:13.510 -->
00:00:13.920Welcome to Oregon.
00:00:14.320 -->
00:00:14.400Okay.
00:00:15.680 -->
00:00:17.040Let's do it. Let's kick off the show.
00:00:17.340 -->
00:00:22.660Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
00:00:22.880 -->
00:00:28.060This is episode 428, recorded April 14th, 2025.
00:00:28.400 -->
00:00:29.040I'm Michael Kennedy.
00:00:29.360 -->
00:00:30.520And I am Brian Okken.
00:00:30.720 -->
00:00:33.740This episode is brought to you by Posit and Posit Connect.
00:00:34.320 -->
00:00:35.720Thank you to Posit for supporting the show.
00:00:35.790 -->
00:00:37.880We will tell you more about them later.
00:00:38.700 -->
00:00:45.400If you're a social type and you want to connect with us socially, you can do so on Mastodon and Bluesky.
00:00:46.420 -->
00:00:54.280You can join us on YouTube at pythonbytes.fm/live, usually on Monday at 10, today a few minutes later, but generally around there.
00:00:54.280 -->
00:00:55.580You can also catch the older episodes.
00:00:55.700 -->
00:00:59.560Every episode page has YouTube trailer or poster you can click.
00:00:59.980 -->
00:01:12.920And finally, if you want our increasingly cool artisanal handcrafted digest of what is going on, put together by the one and only Brian Okken, join our friends of the show mailing list, go to the website, click newsletter, sign up.
00:01:13.760 -->
00:01:15.860More and more people are writing in Brian and say they like the newsletter.
00:01:16.180 -->
00:01:16.580That's great.
00:01:16.860 -->
00:01:17.720Yeah, I think it's
00:01:17.720 -->
00:01:17.820really good.
00:01:17.820 -->
00:01:18.160I like it.
00:01:18.380 -->
00:01:18.660I do too.
00:01:18.830 -->
00:01:19.480I'm glad we're doing it.
00:01:19.860 -->
00:01:19.960I
00:01:19.960 -->
00:01:23.580wish maybe other people might learn how to write Git commit messages better.
00:01:23.760 -->
00:01:24.320Well, honestly.
00:01:24.520 -->
00:01:24.960I'm trying.
00:01:25.260 -->
00:01:25.560I'm learning.
00:01:25.640 -->
00:01:30.140but let's get going uh so i'm going to cover a something
00:01:30.140 -->
00:01:57.860by chris beams um how to write a git commit message and oh man i probably write like a dozen git commits commit messages a day maybe you know from one to a dozen um and uh so i was interested to see how to do it better so uh the there's an xkcd at the top which is you know just gibberish the first commit message is created main loop and timing control is pretty good.
00:01:58.170 -->
00:02:02.980And then by the end, like the most recent is like, hey, hands, just something.
00:02:03.560 -->
00:02:04.920Here I have code, more code.
00:02:05.150 -->
00:02:07.320Ah, my hands are typing words.
00:02:08.119 -->
00:02:20.840And one of the things that, this isn't part of the article, but one of the things I enjoy is being able to be fun with my commit messages when I'm just doing, when I'm doing it on a branch, that I'm just doing it for local saves essentially.
00:02:21.400 -->
00:02:27.860And then I squash it into a main branch and I really want the squashed commit message because that's the one that'll stay there to be really good.
00:02:28.070 -->
00:02:31.840So when you want to write a good commit message, here's what you have.
00:02:32.330 -->
00:02:37.480And there's like seven tips or seven rules, but I was intrigued by like the first one.
00:02:37.680 -->
00:02:48.580So like, for example, at the top, there's an example of kind of a run-on commit message that you have to kind of like scroll to the right to see all of it, huge commit message, not good.
00:02:49.380 -->
00:02:51.420And then some better ones that are shorter.
00:02:51.940 -->
00:02:53.520So how do we get that?
00:02:54.140 -->
00:02:57.360And having included, have like good information.
00:02:57.900 -->
00:03:19.240Well, one of the things that I didn't really, I didn't know about, and I learned from reading this is that if you separate the subject and body with a blank line, so the top line is get will, or get and a lot of get tools recognize everything up to the first blank line as the title of your commit message.
00:03:19.840 -->
00:03:30.960So in the example, there's an example with like just one line, the short line, and then a blank line, and then the rest of it, that your log and everything will just show that one line.
00:03:31.140 -->
00:03:35.640And then it doesn't show the rest of it unless you should like click for details or something.
00:03:36.020 -->
00:03:36.460Really cool.
00:03:36.460 -->
00:03:37.580I didn't know this did this.
00:03:37.680 -->
00:03:38.480So that's great.
00:03:39.320 -->
00:03:42.260So separate the subject and body with a blank line.
00:03:42.940 -->
00:03:44.840Limit subject line to 50 characters.
00:03:45.220 -->
00:03:48.440I think that's just to keep it because you're a lot.
00:03:48.530 -->
00:03:50.820We kind of do like the 80 character thing sometimes.
00:03:51.480 -->
00:03:58.180And like a bunch of the characters are used for the actual like the timestamp and stuff like that.
00:03:58.300 -->
00:04:01.800So or the hash, like the first few digits of the hash.
00:04:01.940 -->
00:04:04.180So we want to leave some space for that.
00:04:04.340 -->
00:04:07.700So 50 characters, subject, capitalize the subject line.
00:04:07.960 -->
00:04:11.260Don't worry about a period because, you know, that's one of your characters.
00:04:11.760 -->
00:04:12.540So don't worry about it.
00:04:13.020 -->
00:04:15.280Use imperative mood in the subject line.
00:04:15.340 -->
00:04:20.200And if you don't know or don't remember what imperative mood is, which I didn't.
00:04:20.359 -->
00:04:22.300So I'm glad there's a discussion later.
00:04:22.660 -->
00:04:24.920There's a discussion about all of these in the article.
00:04:25.780 -->
00:04:28.020Wrap the body at 72 characters.
00:04:28.840 -->
00:04:32.880That was an interesting thing that I, it just is interesting.
00:04:33.400 -->
00:04:37.960So I use tools that wrap it automatically, but a lot of people are using tools that don't.
00:04:38.280 -->
00:04:42.880And so to store it in approximately 72 characters.
00:04:43.380 -->
00:04:49.600And I just think of this as keep lines short-ish and actually use new lines and don't depend on wrapping.
00:04:50.400 -->
00:04:52.460And then the most important is number seven.
00:04:52.600 -->
00:04:54.080I think this is the most important.
00:04:54.500 -->
00:04:58.940Use the body to explain what and why and not how.
00:04:59.300 -->
00:05:02.060The code changes how you did the change.
00:05:02.720 -->
00:05:06.380So the commit message is what did you do and why did you do it?
00:05:07.120 -->
00:05:09.900And I really kind of actually just focus on why.
00:05:10.190 -->
00:05:11.980I don't even really do the what too much.
00:05:13.479 -->
00:05:16.360So good information about commit messages.
00:05:16.550 -->
00:05:19.000I also love, there's a lot of people that have talked about this before.
00:05:19.340 -->
00:05:21.940So he references a handful of this.
00:05:22.010 -->
00:05:23.060It says, keep this in mind.
00:05:23.220 -->
00:05:24.060This has all been said before.
00:05:24.540 -->
00:05:30.040And each one of these words is like this and has are all different links to different articles.
00:05:30.320 -->
00:05:32.800It's kind of a fun way to reference other people's work.
00:05:33.060 -->
00:05:33.180So
00:05:33.180 -->
00:05:33.600good job.
00:05:33.820 -->
00:05:34.840Yeah, that's really interesting.
00:05:35.080 -->
00:05:40.660And I not too long ago learned the thing about one sentence and then a paragraph or two being extra.
00:05:40.730 -->
00:05:45.200And I learned it from the JetBrains AI in PyCharm.
00:05:45.480 -->
00:05:45.840Oh, really?
00:05:46.280 -->
00:05:52.660Yeah, because it's actually really quite good at writing a commit message if you just press the AI summarize what I did.
00:05:52.980 -->
00:05:53.200Okay.
00:05:53.400 -->
00:05:55.600Provided that what you're doing is focused.
00:05:55.790 -->
00:06:03.940So if what you did was run pip compile and update 20 dependencies and then you ran rough and reformatted it, never click that button.
00:06:04.240 -->
00:06:13.000But if you legitimately did something, you know, that is like a focus thing that it can look at and go not like you remove 700 spaces in these locations.
00:06:13.480 -->
00:06:14.360And then it comes out really good.
00:06:14.520 -->
00:06:15.280And it does that.
00:06:15.540 -->
00:06:20.200It'll put like one sentence and then it'll summarize in detail what it's discovered below.
00:06:20.600 -->
00:06:20.820Yeah.
00:06:21.140 -->
00:06:21.200Yeah.
00:06:21.360 -->
00:06:21.760So very cool.
00:06:22.400 -->
00:06:22.740That's it.
00:06:22.740 -->
00:06:23.500I don't use it that much.
00:06:23.500 -->
00:06:28.040I probably should use it more, but sometimes end up in hands just work.
00:06:30.860 -->
00:06:38.260But usually for me, when I end up writing commit messages like that, I am frantically trying to fix something I just broke in production.
00:06:38.840 -->
00:06:40.160And I'm like, oh, I got to put it back.
00:06:40.280 -->
00:06:41.580Just take this.
00:06:41.770 -->
00:06:47.300I just need you to be able to get pull on the server again and try again before it disrupts too much.
00:06:47.420 -->
00:06:47.900You know what I mean?
00:06:48.100 -->
00:06:48.380Yeah.
00:06:48.610 -->
00:07:04.260Well, I just realized that there's another thing that I do frequently as well is if I commit and then push everything and then CI breaks for some reason, like because I forgot something, like I forgot to add, like I added a file and I forgot to add it and push that.
00:07:04.500 -->
00:07:18.440I will, the second commit, I will try to have that, the message be identical to the first one so that when people are looking at, it will show up as a different commit, but then it makes it obvious that it's part of that same commit.
00:07:18.600 -->
00:07:19.940It is intended to be together.
00:07:20.400 -->
00:07:20.860Yeah, that makes sense.
00:07:20.980 -->
00:07:21.460I agree with that.
00:07:21.660 -->
00:07:22.300This looks really useful.
00:07:22.660 -->
00:07:22.780Cool.
00:07:22.860 -->
00:07:23.800Who knew writing a
00:07:23.800 -->
00:07:25.880single sentence would
00:07:25.880 -->
00:07:26.440be so
00:07:26.440 -->
00:07:26.840interesting.
00:07:27.260 -->
00:07:27.660Hands.
00:07:29.560 -->
00:07:32.720All right. Let's talk about Caddy.
00:07:33.260 -->
00:07:34.160Brian, are you familiar with Caddy?
00:07:34.800 -->
00:07:35.900Just Caddy people?
00:07:36.200 -->
00:07:37.080I mean, it's Caddy Shack.
00:07:37.390 -->
00:07:37.900What is that?
00:07:38.180 -->
00:07:39.520Yeah, but this is not that.
00:07:39.700 -->
00:07:42.180This is Caddy, the ultimate server, ultimate web server.
00:07:42.660 -->
00:07:54.920So if people are thinking about how do I host my web apps with Python, there are a few now that the thing that runs your Python code could theoretically also be the thing that serves, that talks to the web browsers.
00:07:55.140 -->
00:07:59.360But typically and certainly traditionally, there's been an interesting divide there.
00:07:59.460 -->
00:08:04.140We've got static web servers and proxies and firewall type things.
00:08:04.700 -->
00:08:06.200That's like Nginx and others.
00:08:06.680 -->
00:08:06.780Yeah.
00:08:07.100 -->
00:08:20.900And then you've got the stuff that actually runs your Python code, probably scaled out to be like four of them or something in a web farm with uvicorn, Gunicorn, uWSGI, which don't use uWSGI anymore.
00:08:21.000 -->
00:08:24.260We covered that, but, you know, Gradient, all those types of things, right?
00:08:24.600 -->
00:09:01.180So this one I want to cover, this thing I want to cover today called Caddy is actually sort of a parallel of Nginx. So this comes to us from Frederick L. Storm. And Storm, thank you so much for sending this in. But it's something I've been tracking as well. And I've wanted to switch over, but my world is just so complicated. I have every line of Nginx, you know, you've got to put like a little configuration YAML JSON-like combo file together, I have 2,200 lines of JSON or whatever, Nginx config files.
00:09:01.640 -->
00:09:02.000That's a problem.
00:09:02.290 -->
00:09:05.160And I don't really want to mess with trying to move that, so it's going to stay.
00:09:05.410 -->
00:09:09.420But if I were starting over, I believe I would be probably choosing Caddy.
00:09:09.580 -->
00:09:14.620It's a super, super simple way to create web apps that you can run.
00:09:15.040 -->
00:09:23.580It comes with automatic, internal, no action on your fault, your behalf, HTTPS through Let's Encrypt.
00:09:23.600 -->
00:09:42.180So for example, you set up a website, you say my website is like michaildeploys.com or whatever, and you don't have an SSL certificate, you start it up, and as long as it's running on the server that actually that domain resolves to, it will just automatically get you a Let's Encrypt certificate and keep it up to date.
00:09:42.420 -->
00:09:42.760Oh, wow.
00:09:42.860 -->
00:09:43.760That's really
00:09:43.760 -->
00:09:44.220cool, right?
00:09:44.680 -->
00:09:44.980It has
00:09:44.980 -->
00:09:47.14063,000 stars on GitHub.
00:09:47.580 -->
00:09:48.400That's pretty awesome.
00:09:49.540 -->
00:09:57.600If you want to do development, sometimes you need to have HTTPS, and it will automatically do a local trusted certificate for you.
00:09:57.700 -->
00:10:02.320If you want to run on localhost, it'll just do, like even localhost is over HTTPS, does clusters.
00:10:02.959 -->
00:10:03.980It has a little test.
00:10:04.000 -->
00:10:08.620You can test it out for yourself, like put your domain to this location or whatever and try it out.
00:10:10.220 -->
00:10:11.060Let's see if I can find the config.
00:10:11.540 -->
00:10:13.040The config is super, super simple.
00:10:13.480 -->
00:10:15.600We just write a couple of lines.
00:10:15.900 -->
00:10:20.620If you've ever worked with HTTP files from PyCharm, It looks a little tiny bit like that.
00:10:20.660 -->
00:10:21.540But yeah, it's like real simple.
00:10:21.540 -->
00:10:26.300You just say handle slash blog slash star and put the details out of there.
00:10:26.440 -->
00:10:27.980That's just how that processes that.
00:10:28.460 -->
00:10:33.100But it can reverse proxy slash API, which actually goes over to another server.
00:10:33.540 -->
00:10:42.160And it can reverse proxy another one, which actually does like a round robin load balancing to yet another cluster of servers.
00:10:42.440 -->
00:10:42.780Isn't that cool?
00:10:42.820 -->
00:10:44.060Just like all that stuff so simple.
00:10:45.980 -->
00:10:46.840Yeah, it's really cool.
00:10:47.020 -->
00:10:48.200It still doesn't look simple to me.
00:10:49.300 -->
00:10:51.340Well, you know, try the alternative, right?
00:10:52.040 -->
00:10:53.340So people can check this out.
00:10:53.390 -->
00:10:54.220I think it's really neat.
00:10:55.190 -->
00:10:57.800The caddy files are super easy to work with here.
00:10:58.280 -->
00:10:58.900What was I showing?
00:10:58.930 -->
00:11:00.060I think, yeah.
00:11:00.740 -->
00:11:01.940Anyway, there's a bunch of different examples.
00:11:02.160 -->
00:11:04.900Some of them are simpler than others like this.
00:11:06.200 -->
00:11:06.900No, this is cool.
00:11:07.560 -->
00:11:07.860Yeah, but
00:11:07.860 -->
00:11:19.920one of the other things that's cool is if you're coming from somewhere else, like I was complaining that I have all this Nginx config, you can actually just pass it an Nginx configuration file and go, I'm not ready to rewrite this in your world, Caddy.
00:11:20.080 -->
00:11:22.100Just run this Nginx configuration, but
00:11:22.100 -->
00:11:22.960you'd be our server for
00:11:22.960 -->
00:11:23.060that.
00:11:23.330 -->
00:11:25.900So you could slowly migrate over into that.
00:11:26.720 -->
00:11:26.840Yeah.
00:11:27.180 -->
00:11:36.360Anyway, you can even use apparently a MySQL database as a source of definition of your front end web server, which
00:11:36.360 -->
00:11:37.000sounds
00:11:37.000 -->
00:11:37.460kind of wild.
00:11:37.510 -->
00:11:40.740But then again, you can write code and APIs and stuff to control it then, right?
00:11:40.980 -->
00:11:43.140Just change the database and then you change the web server.
00:11:43.500 -->
00:11:44.280So all pretty cool.
00:11:44.360 -->
00:11:49.300Anyway, I think people, if they're thinking about Nginx or something like that, should maybe give this a look.
00:11:49.350 -->
00:11:50.220I don't remember what it's getting.
00:11:50.350 -->
00:11:51.100Oh, it's written in Go.
00:11:51.440 -->
00:11:52.080That's what it's written in.
00:11:52.220 -->
00:11:53.720So it's pretty high performance.
00:11:53.870 -->
00:11:55.720It does HTTP 1, 2, and 3.
00:11:55.940 -->
00:11:58.360So the 2 is most important, but 3 is also interesting.
00:11:58.740 -->
00:12:01.580Anyway, 98% Go, 2% HTML.
00:12:01.900 -->
00:12:02.180Nice.
00:12:03.020 -->
00:12:03.160Indeed.
00:12:04.060 -->
00:12:07.800So if you ever got stuff to host and you're not doing platform as a service, there you go.
00:12:08.060 -->
00:12:08.200Cool.
00:12:09.000 -->
00:12:15.140Speaking of which, let's talk about, before we move on, Let's talk about our sponsor, huh?
00:12:15.560 -->
00:12:15.720Yeah.
00:12:16.160 -->
00:12:19.580Yeah, so a couple weeks ago, Brian, you told people about Posit Connect.
00:12:20.300 -->
00:12:24.400And I want to talk about it again, but for a slightly different reason.
00:12:24.720 -->
00:12:26.460So you talked about how easy it was to use.
00:12:26.500 -->
00:12:34.420I want to talk about how you can use it to share your data science projects and how you can do that securely with things like single sign-on and so on.
00:12:34.480 -->
00:12:38.440So this episode is definitely brought to you by the folks at Posit.
00:12:39.040 -->
00:12:49.640They've made a huge investment in Python, originally known as being an R shop, making RStudio and others, they've been putting maybe the majority, certainly a ton of effort, into things for Python people these days.
00:12:50.100 -->
00:13:05.220So if the mentions of words like HIPAA, GDPR, or other privacy policies make the hair on your neck stand up, you'll know you want a trusted partner to help your data become shareable, but also follow those safety rules that we all have to live by.
00:13:05.470 -->
00:13:06.920So Posit Connect can help.
00:13:07.220 -->
00:13:12.020And Posit Connect lets you securely develop, deploy, and share what you build with Python.
00:13:12.660 -->
00:13:19.300If you build it with Streamlit, Dash, Plotly, Bokeh, FastAPI, Shiny, Flask, Quarto, and other APIs.
00:13:19.640 -->
00:13:20.440So here's how it works.
00:13:20.840 -->
00:13:32.800You or your team set up Posit Connect on a secure server within your org or behind some VPN in the cloud amongst your cloud servers and using your existing authentication system.
00:13:33.140 -->
00:13:40.900Then when you publish a piece of content, Posit Connect lets you set user level permissions for that content, making it visible to some users, not others.
00:13:41.370 -->
00:13:47.120But what's even more interesting, I think here, is that you can set credentials on a per user basis.
00:13:47.720 -->
00:13:52.620So imagine you write code that then goes talks to a database that then accesses a bunch of data.
00:13:53.080 -->
00:13:59.480And depending on who is doing that, they can see some of the data, but not all of it are different things and so on, different team reports or whatever.
00:13:59.920 -->
00:14:33.440so in Posit Connect you can actually per user set how they can access other things like your database or your APIs or external APIs or whatever that's pretty cool so if you work on a data science team where security matters you owe it to you and your org to check out Posit Connect do that by going to pythonbytes.fm/connect today and get a three-month trial to see if it's a good fit that's pythonbytes.fm/connect the links in your podcast player show notes and yes we all know you can just Google AI, Bing, whatever, Posit Connect, but please use our link so they know that it came from us.
00:14:33.660 -->
00:14:35.180That way they will continue to support the show.
00:14:35.680 -->
00:14:38.020Thanks to Posit for supporting Python Bytes.
00:14:38.960 -->
00:14:39.140Yeah.
00:14:39.760 -->
00:14:40.460All right, back to you.
00:14:41.180 -->
00:14:42.000What's your third item?
00:14:42.400 -->
00:14:43.720Well, not third item, your second item.
00:14:44.440 -->
00:14:47.880I am going to talk about, let's see, I'm going to talk about peps.
00:14:48.260 -->
00:14:51.040So we've got actually a couple of peps coming in.
00:14:52.160 -->
00:14:53.000That's good because I need a pep
00:14:53.000 -->
00:14:53.160talk.
00:14:54.660 -->
00:14:54.960Sorry,
00:14:55.020 -->
00:14:55.280go ahead.
00:14:56.760 -->
00:15:00.040So a couple of peps that just recently got accepted.
00:15:00.370 -->
00:15:06.380So one of the peps is for packaging and one is for Python 3.14.
00:15:08.160 -->
00:15:12.060So let's do the packaging topic first.
00:15:12.560 -->
00:15:19.040PEP 770 is improving measurability of Python packages with software bill of materials.
00:15:19.780 -->
00:15:22.080And that's a mouthful, but it's about SBOMs.
00:15:22.340 -->
00:15:25.800And if you don't know about SBOMs, you probably ought to know a little bit.
00:15:26.500 -->
00:15:27.840So this is a good thing to read.
00:15:28.220 -->
00:15:31.560And if you do know about SBOMs, they're stressing you out, probably.
00:15:32.320 -->
00:15:35.680So this is something that we're in the corporate world.
00:15:36.300 -->
00:15:38.640A lot of people are trying to think about.
00:15:39.100 -->
00:15:48.560And SBOMs, I'm probably going to massacre this definition, but generally are a way for us to, because we're using a lot of open source projects and third-party libraries.
00:15:48.790 -->
00:15:51.360And like a Python package isn't just the Python code.
00:15:51.540 -->
00:15:59.380It's also possibly some Fortran code in it or whatever, and some other things inside or Rust that you want to try to track all those dependencies.
00:16:00.460 -->
00:16:08.300And the SBOM system is a way to get that right so that you can make sure that you know where all of the code's coming from.
00:16:08.700 -->
00:16:12.980And this was, there were some different ideas about how to do this within Python.
00:16:14.520 -->
00:16:18.080This 770 came from Seth Larson, sponsored by Brett Cannon.
00:16:18.720 -->
00:16:27.960Really kind of a neat way to look at, Seth has looked at the different ways that we're already specifying a lot of this stuff with our packaging metadata.
00:16:28.490 -->
00:16:32.300So how do we use that to try to fill out a lot of the SPOM fields
00:16:32.300 -->
00:16:33.320automatically?
00:16:34.320 -->
00:16:36.940And this is just really some great work.
00:16:38.939 -->
00:16:40.980So I'm glad this is going in.
00:16:41.290 -->
00:16:46.900Again, since it's part of packaging, it doesn't really attach to a release.
00:16:47.480 -->
00:16:54.800So I'm not sure when we'll get like, I didn't look through if this is something that's already implemented or not, but it's just accepted.
00:16:55.100 -->
00:16:58.760So, and if, even if we did do get it, we'll get it through tools and stuff.
00:16:58.760 -->
00:17:01.840We won't get it through the Python release versions.
00:17:02.520 -->
00:17:10.240So next one that I'm, I'm also a little confused about, but excited about is PEP 750 template strings.
00:17:11.000 -->
00:17:12.459So we've got f-strings.
00:17:13.040 -->
00:17:14.839These are like f-strings on steroids.
00:17:15.240 -->
00:17:22.000The t-strings will replace the, when you do a template string, you won't say F string, you'll say T string.
00:17:22.480 -->
00:17:31.500And so it builds, so like, for example, if you had hello name with the name in curly braces with an F string, that would fill in the name with whatever variable.
00:17:31.810 -->
00:17:37.720But we want it to be like, just to, to just hold that thought and we'll fill in the name later, sort of a thing.
00:17:38.500 -->
00:17:41.700And I still like, I'm just sort of getting into this.
00:17:41.840 -->
00:17:46.460don't know really how to use these, but I'm really excited that a lot of this has been thought out.
00:17:46.780 -->
00:18:18.080Now there's a whole bunch of authors, Jim Baker, Greedan Van Rossum, Paul Everitt, three other people, Dave Peck, Lissandro Nicolau, and Caudiano, I'm sorry about massacring your name, I'm sure, but a lot of people working on this. Really well thought out also some really cool stuff about being able to combine. They thought about like with fstrings, you can do math on it or, you know, sort of like adding and concatenating and stuff like that.
00:18:18.310 -->
00:18:29.940All that stuff's been thought out. How do we deal with like displaying them, using them, the whole shebang? This is going into Python 3.14 with 3.14. So that's just, you know,
00:18:30.080 -->
00:18:33.000right around the corner. So really, really excited about this one.
00:18:33.200 -->
00:18:34.020So many pi jokes
00:18:34.020 -->
00:18:34.940are coming in that version.
00:18:35.220 -->
00:18:48.880I think this is really interesting. I talked to Paul a few times about this, and I know he's really excited from a web developer's perspective. So think about Jinja templates, Django templates, Chameleon templates, like that kind of thing.
00:18:49.300 -->
00:18:49.380Yeah.
00:18:49.590 -->
00:18:59.780But with more flexibility, and they're being supported by the Python runtime itself, not a third-party library that parses and processes it separately.
00:19:00.040 -->
00:19:02.080Well, that's what I was thinking. Like, would we need, with
00:19:02.080 -->
00:19:07.260this in place, would you need Jinja templates, or could you just implement your stuff with this?
00:19:07.280 -->
00:19:08.380I think you can just deal with this.
00:19:08.640 -->
00:19:24.500I mean, I think it's somewhat inspired by components and stuff from the JavaScript libraries where you've got your JavaScript, but then there's a string in there, like some weird HTML fragment in there that's actually the template that you would use.
00:19:24.620 -->
00:19:30.020And they're just kind of interwoven so they can have a little bit more locality of behavior with each other.
00:19:30.270 -->
00:19:30.380I
00:19:30.380 -->
00:19:32.500think that is a part of the motivation here,
00:19:33.300 -->
00:19:33.840I do believe.
00:19:34.240 -->
00:19:34.380Yeah.
00:19:34.640 -->
00:19:38.620I'll probably have to have Paul and maybe some of the other folks on Talk Python to talk about it.
00:19:38.840 -->
00:19:42.100Yeah, I'm sure we're going to have lots of articles about it and everything.
00:19:42.580 -->
00:19:44.460So we will talk about it more for sure.
00:19:45.180 -->
00:19:45.300Indeed.
00:19:45.620 -->
00:19:45.740Awesome.
00:19:46.100 -->
00:19:46.340Indeed.
00:19:46.520 -->
00:19:46.720All right.
00:19:46.860 -->
00:19:50.380Well, let's round things out with a little data science.
00:19:51.240 -->
00:19:52.440Have we spoken about uv before?
00:19:53.080 -->
00:19:54.820People out there, do you know UV?
00:19:55.060 -->
00:19:55.640Have you heard of this?
00:19:55.820 -->
00:19:59.100It's a library for managing dependencies and projects.
00:19:59.520 -->
00:20:05.760Actually, I'm probably going to get my jacket signed by Charlie Marsh when I go to PyCon because that's how much we talk about it.
00:20:05.980 -->
00:20:07.200No, definitely fanboy of uv.
00:20:07.860 -->
00:20:18.240And I want to talk about a pretty new project called, you want to pronounce it as Juv, J-U-V, but I think it's J-U-V is probably the way to say it because it's based on uv.
00:20:18.380 -->
00:20:28.920And what this is, this is a toolkit for notebooks where the virtual environments and the dependencies and such of it are managed by uv, which is pretty cool.
00:20:29.260 -->
00:20:29.780So what can
00:20:29.780 -->
00:20:30.020you do?
00:20:30.460 -->
00:20:32.940Hey, by the way, this is a pretty new project, 222 stars.
00:20:33.200 -->
00:21:03.800it's only been created six months ago, and it's not too well known, but I want to shine a light on it. You can create, manage, and run Jupyter Notebooks along with their dependencies, which is cool. You can pin the dependencies with the PEP 723 inline script metadata, which has been accepted. It must be, right? Yes, final. You can launch ephemeral sessions for multiple front ends like JupyterLab or Notebook or MB Classic, okay?
00:21:04.270 -->
00:21:05.180And it's all powered by uv.
00:21:05.630 -->
00:21:06.320So pretty cool.
00:21:06.650 -->
00:21:12.700You can, as you would expect, uv tool install JUV, or you can also pipx install it.
00:21:12.930 -->
00:21:16.920And then once you've done that, you can just say uvx JUV and it'll run.
00:21:17.300 -->
00:21:27.800But more importantly, if you look at the different things you can do to it, you can say things like JUV init some notebook, or you can init a notebook with Python 3 and give it a name, which is cool.
00:21:28.180 -->
00:21:33.860You can go to that notebook and you can add a dependency for pandas and numpy to it.
00:21:34.280 -->
00:21:36.580That's not something you can normally do to notebooks, right?
00:21:36.860 -->
00:21:37.060Or
00:21:37.060 -->
00:21:37.460you can
00:21:37.460 -->
00:21:43.600say I have a requirements.txt file I've created with pin versions using uv pip compile.
00:21:44.440 -->
00:21:50.060Then I can say juv add --requirements and give it a full on requirements file.
00:21:50.240 -->
00:21:53.780So in case you have a ton of requirements with versions and stuff, you want to manage separately.
00:21:53.940 -->
00:21:55.900You don't have to keep typing them out.
00:21:56.180 -->
00:22:20.720You can also do interesting things like put a time stamp for reproducibility onto your dependency so i can say jv stamp this thing and then it won't get dependencies that are released after now which is pretty cool i think all right i don't know of anything else like that like i want to just have it whatever the latest of everything i'm using is as right now that's what i want they ship something new i don't want it until i change my mind that's pretty cool
00:22:20.720 -->
00:22:25.800but now here or now there anyway time yeah
00:22:25.800 -->
00:22:28.000i know time zones, it'll make you want to cry.
00:22:28.270 -->
00:22:29.320You can also say run
00:22:29.320 -->
00:22:55.360--with, and it'll run those even if you don't want to put them in as a particular dependency. And you can lock it to create a lock file, right? All sorts of the uv types of things, but you can have it run there. You can also say run notebook with like Jupyter Notebook rather than Jupyter Lab and give it a notebook, give it a version. Like there's a lot of different things you can do. So I think I've been talking enough, but there's like quite a bit more.
00:22:55.920 -->
00:22:56.480You can go on here.
00:22:56.560 -->
00:22:59.620So this is a pretty comprehensive project for being six months old.
00:23:00.779 -->
00:23:06.260Anyway, if you notebook and you like uv, consider giving JUV a look.
00:23:06.260 -->
00:23:06.840It looks pretty cool.
00:23:07.040 -->
00:23:07.960What else you got that's cool, Brian?
00:23:08.120 -->
00:23:08.960That's it for our main items.
00:23:09.720 -->
00:23:14.160I just have a couple extras and I have a feeling we've covered this, but I don't remember.
00:23:14.420 -->
00:23:15.740So I'm going to go ahead and cover it anyway.
00:23:16.120 -->
00:23:19.800So I'm going to take a look at the status of Python versions.
00:23:20.120 -->
00:24:20.200So this is on the Python Developers Guide, devguide.python.org. And I just, there was within the last couple of months, there was a reformatting of this, I think. This is my memory. So the big list is at the bottom with like the full chart of all of the, all the different versions and what's left. And what we see about the full chart is most of them are end of life because it starts at 2.6, 2.7, 3.0. And so that's not really that interesting. So the new format highlights the ones you might be caring about right now. So the last few end of life's, there's a two sevens end of life, but then three, six, seven, eight are all end of life. So hopefully you're not using Python 3.8 anymore. But one of the interesting things, so there's a couple of interesting things about here. So highlighting there's, there's where we're at with, so currently three nines is still getting security updates, three, nine, 10 and 11 are, and then like right now, as of, it looks like right, the, the, it's, it's a hairy, it's hard to tell where the green and yellow start with the blue line.
00:24:20.420 -->
00:24:29.620So there is, there's dates around, but there's a link to in here for endoflife.date.date slash Python.
00:24:30.040 -->
00:24:31.160And so I took a look at that.
00:24:31.340 -->
00:24:35.380And that is like very clear as to what the timeline, what we got left.
00:24:35.800 -->
00:24:40.440So 3.13, the active support.
00:24:40.620 -->
00:24:42.100So it was released six months ago.
00:24:42.220 -->
00:24:45.560And it's all, so these relative times are really nice.
00:24:45.840 -->
00:24:46.920It was released six months ago.
00:24:47.400 -->
00:24:55.300We have a year and five months left in active support and then security updates for four more years, four years and six months.
00:24:55.500 -->
00:24:57.180So this, the timeline is really nice.
00:24:57.680 -->
00:25:02.980This also highlights the, so in the first graph, we just had like this difference between green and yellow.
00:25:03.060 -->
00:25:04.480So we got bug fix and security.
00:25:04.800 -->
00:25:13.960Doesn't seem like that big of a deal, but when you look at it with the reality of it It is 3.12, which I'm using a lot of lately.
00:25:15.040 -->
00:25:17.460That active support ended a week ago.
00:25:18.700 -->
00:25:19.900We're not like right on the edge.
00:25:20.180 -->
00:25:20.840We're past it.
00:25:21.020 -->
00:25:23.100So active support ended for 3.12.
00:25:23.980 -->
00:25:26.120We still have security supports.
00:25:27.140 -->
00:25:28.420So there's security problems.
00:25:28.690 -->
00:25:30.300We still get three years of security.
00:25:30.760 -->
00:25:32.920But we're not going to get like bug fixes and stuff.
00:25:33.360 -->
00:25:35.920Like minor bug fixes are not going to go into 3.12.
00:25:36.320 -->
00:25:38.220So 3.13 is where you probably ought to be.
00:25:38.940 -->
00:25:40.420Anyway, so I like both these graphs.
00:25:40.840 -->
00:25:48.860And these are really great graphs to pull out if you want to help convince your management chain that you can switch to a different version sort of thing.
00:25:49.050 -->
00:25:49.520If you need that.
00:25:49.820 -->
00:25:56.720Actually, the second one that you linked to here, the end of life, date slash Python is really good for that sort of motivation.
00:25:57.240 -->
00:25:57.440Yeah.
00:25:57.660 -->
00:25:59.960Look, we've got one year and six months.
00:26:01.260 -->
00:26:02.000How do you feel about that?
00:26:02.160 -->
00:26:02.760Maybe we should change.
00:26:03.240 -->
00:26:08.180In the part where if you pull up 2.7, it just goes, what are you reading this for?
00:26:08.600 -->
00:26:10.060Stop right now and go back to migrating.
00:26:10.100 -->
00:26:12.160And then 2.8 just says never.
00:26:13.020 -->
00:26:13.600No, I'm just making
00:26:13.600 -->
00:26:13.980it up.
00:26:13.980 -->
00:26:14.020Really?
00:26:14.080 -->
00:26:14.660It should say that.
00:26:15.320 -->
00:26:16.000No, it should say that.
00:26:16.020 -->
00:26:16.580I've never done it.
00:26:16.640 -->
00:26:17.220Oh, okay.
00:26:18.720 -->
00:26:19.280It should though.
00:26:19.820 -->
00:26:20.360Yeah, it should.
00:26:20.420 -->
00:26:20.700Just go,
00:26:20.760 -->
00:26:21.540stop, what are you doing?
00:26:21.980 -->
00:26:22.080Stop.
00:26:22.180 -->
00:26:22.600No, it has
00:26:22.600 -->
00:26:28.720all the unsupported versions from 3.7 and older just collapsed saying like unsupported, go
00:26:28.720 -->
00:26:28.860away.
00:26:28.940 -->
00:26:29.060Yeah.
00:26:29.820 -->
00:26:29.980Well,
00:26:30.080 -->
00:26:31.580you can expand it, but it's collapsed.
00:26:32.240 -->
00:26:35.140But having the relative time is really nice.
00:26:35.180 -->
00:26:35.620How much time
00:26:35.620 -->
00:26:36.260you have left?
00:26:36.320 -->
00:26:36.820Yeah, I agree.
00:26:36.980 -->
00:26:38.200I think that's very powerful as
00:26:38.200 -->
00:26:38.980a mental model.
00:26:39.260 -->
00:26:39.420Yeah.
00:26:39.660 -->
00:26:39.880Anyway.
00:26:40.240 -->
00:27:32.020cool cool well let's carry on with that theme because i just want to point out that 3.13.3 is out and some of the changes don't matter too much to you oh if you use the mac installer this happens like okay well i install with ev so next and then windows has things like updated ssls tests have been updated a little bit but it's got a few security fixes here which is none of them are like run for your life sort of thing but avoid unbounded buffering that sounds like you want to avoid that and so on. If you don't see the word CVE, you're probably safe, but still it's good to have it fixed. And then a bunch of changes to the library thing is getting better. And so might as well upgrade, right? Might as well upgrade to the new one. I just have to rebuild our base Docker container and uv will find the new one, download it, and then all the websites, including Python Bytes, they'll be off to the races. I think I'm most excited about the update to TCLTK. I know.
00:27:34.500 -->
00:27:36.320All right, a couple, one more really quick.
00:27:38.480 -->
00:27:48.900Siam Yalamarti, thank you so much for sending this in because somebody, I think in the comments mentioned, oh, just use.get-blame-ignore-revs
00:27:48.900 -->
00:27:50.700for the
00:27:50.700 -->
00:27:51.600Ruff format.
00:27:51.670 -->
00:27:57.220And we were somehow complaining like, you're looking at diffs and bases, especially looking at blame.
00:27:57.560 -->
00:28:01.480Whoever ran Ruff format, and you said, Brian, don't run format on this because you're going to own it then.
00:28:01.800 -->
00:28:09.760What you can do is you can create this.get blame ignore revs, put probably the SHA of the commit, the hash, and then that will not show up.
00:28:09.940 -->
00:28:13.740And you're like, okay, that's, we're not going to consider that when we compute the blame.
00:28:14.160 -->
00:28:14.800Oh, okay.
00:28:15.100 -->
00:28:21.080So that's, you can use, in that file, you can do a list of revisions to not part of the import.
00:28:21.540 -->
00:28:21.600That
00:28:21.600 -->
00:28:22.580makes sense now.
00:28:22.820 -->
00:28:22.960Yeah,
00:28:23.060 -->
00:28:29.220and they also pointed out that get blame has a flag, dash, dash, ignore revs file if you want to pass another one.
00:28:29.440 -->
00:28:30.100Pass a different file.
00:28:30.180 -->
00:28:31.060Oh, it's not automatic.
00:28:31.500 -->
00:28:31.580Okay.
00:28:31.640 -->
00:28:34.160Or use, yeah, I guess you got to use it with that probably.
00:28:34.880 -->
00:28:35.020Maybe
00:28:35.020 -->
00:28:35.440not automatically,
00:28:35.580 -->
00:28:35.920but you can.
00:28:36.180 -->
00:28:39.220So anyway, I am learning about this.
00:28:39.320 -->
00:28:39.980This is all news to me.
00:28:40.420 -->
00:28:40.660Yeah,
00:28:41.060 -->
00:28:41.280interesting.
00:28:41.640 -->
00:28:41.700Cool.
00:28:42.130 -->
00:28:42.240Indeed.
00:28:43.000 -->
00:28:43.660Thanks for sending that in.
00:28:43.760 -->
00:28:44.920That's always appreciated.
00:28:45.140 -->
00:28:46.780All right, so let's close this out with a joke.
00:28:47.200 -->
00:28:58.460Brian, you've heard about BC and AD and sometimes referred to as BCE before the common era and Western calendars, you know, so we don't have negative numbers because
00:28:58.460 -->
00:28:59.020negative is
00:28:59.020 -->
00:29:00.420hard in calendars, apparently.
00:29:00.760 -->
00:29:04.940I never really thought, why don't we just have like negative 400, but whatever.
00:29:05.900 -->
00:29:06.260BCE.
00:29:06.980 -->
00:29:10.280So I want to introduce you to a different calendar.
00:29:11.020 -->
00:29:13.520It's such an important epoch, a different thing here.
00:29:13.820 -->
00:29:16.460There's BGPT and AGPT.
00:29:17.230 -->
00:29:20.600So before GPT, ChatGPT, and after ChatGPT.
00:29:21.180 -->
00:29:21.720So before,
00:29:21.900 -->
00:29:29.700if you're debugging a problem, the developers probably sitting there for two hours, working really hard and going, oh, okay, how's this going to work?
00:29:29.760 -->
00:29:42.960they finally think it's working and then hands to the face six hours of debugging yeah that's before that's b gpt a gpt is chat gpt generates code in five minutes 24 hours debugging even more tears
00:29:44.380 -->
00:29:44.940yeah
00:29:44.940 -->
00:29:46.220what do you think yeah
00:29:46.220 -->
00:29:52.420well so 24 hours if you're if you're being good with your body and working three only
00:29:52.420 -->
00:29:54.680eight hour days that's three days so
00:29:54.680 -->
00:29:55.540yeah see
00:29:55.540 -->
00:29:57.440it saves you time this is how we save time with it.
00:29:58.340 -->
00:29:58.440Yeah.
00:29:58.840 -->
00:29:59.960No, I've
00:29:59.960 -->
00:30:01.400both saved time and lost time with
00:30:01.400 -->
00:30:02.280this so far.
00:30:02.860 -->
00:30:03.000Yeah.
00:30:03.440 -->
00:30:08.900I feel like that's more vibe coding than it is just like I asked GPT for a little help with a function.
00:30:09.300 -->
00:30:09.520You
00:30:09.520 -->
00:30:09.900know what I mean?
00:30:09.940 -->
00:30:10.320It's like...
00:30:10.540 -->
00:30:13.340I still haven't jumped on the vibe bandway and I haven't tried that yet.
00:30:13.680 -->
00:30:13.760So
00:30:13.760 -->
00:30:14.440I'll try that out.
00:30:14.460 -->
00:30:14.580Neither
00:30:14.580 -->
00:30:14.960have I.
00:30:15.400 -->
00:30:18.260It's both amazing and terrifying all at the same time.
00:30:18.840 -->
00:30:19.080But I haven't
00:30:19.080 -->
00:30:19.520done it either.
00:30:19.520 -->
00:30:20.380Yeah, it's like jumping off a cliff.
00:30:20.620 -->
00:30:21.000Just do it.
00:30:21.140 -->
00:30:22.080It'll be fun for a while.
00:30:23.340 -->
00:30:26.340Yeah, and Ro out in the audience asks, where's the Stack Overflow step?
00:30:27.080 -->
00:30:28.600oh yeah yeah
00:30:28.600 -->
00:30:40.060that's got to be in there somewhere probably you're like i'm sorry i left you chat stack overflow i will not stray from you again i will go back and maybe you can help me get out of this probably not you just find the same answer generated by chat gpt over there as well
00:30:40.060 -->
00:30:43.900well stack overflow is changing their name right they're gonna
00:30:43.900 -->
00:30:46.000go by uh training data no
00:30:47.500 -->
00:30:49.560training under flow okay okay
00:30:49.560 -->
00:30:59.120you know what doesn't waste your time though what this show and us in a good way yeah so let's get out of here thanks everyone for listening thanks Brian for being here as always