Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 433, recorded May 26th, 2025.
I am Brian Okken.
And I'm Michael Kennedy.
And this episode is sponsored by us.
So please check out offerings at the courses at Talk Python Training and at pythontest.com, of course, to learn your pytest goodies.
And also thank you to Patreon supporters.
You rock.
If you'd like to connect with us, of course, check out the links in the show notes for both Michael, myself, and the show at Blue Sky and at Mastodon on Fosstodon.
And if you'd like to listen to the show, if you listen to the show, thank you.
If you'd like to watch it also live, check out pythonbytes.fm/live, usually Monday at 10 a.m., even when we forget that it's a holiday today.
But yeah, also, if you'd like to get, if you're listening to this and you kind of want to check out some of the stuff that we're talking about, but you can't remember the link, sign up for our newsletter on at pythonbytes.fm.
Really easy to find the link there.
And you'll get an email every week with all of the links and everything we talked about, plus extra goodies to help you get up to speed if you want to.
So that's wonderful.
What do we got to start with, Michael?
Let's start
with a throwback, okay?
Okay.
So, did you ever watch the movie Fight Club, Brad Pitt, Edward Norton?
Yeah.
It was a cult classic, right?
It was definitely a...
First rule of Fight Club.
Yeah, first rule of Fight Club.
Don't talk about Fight Club.
Second rule of Fight Club.
You do not talk about Fight Club.
So,
what are we doing?
What are we talking about?
Why am I talking?
Because up next are get flight rules.
fight rules. I want to call it fight. So what are flight rules? They're a guide for astronauts
or programmers who use Git who now do things when stuff goes wrong with Git. So they're hard earned,
they're not fight club rules. They're hard earned body of knowledge recorded in manuals that like,
if this goes on, what do you do? If you stir the tanks and there's an explosion
and a lot of the oxygen shoots out of the spaceship, what do you do? And so on. Okay.
All right.
So this is actually pretty cool.
I think this is going to be super helpful for a lot of people.
So it talks about, well, what do you do with Git when things go wrong, basically?
I mean, source control is awesome until you're like, it says there's a merge conflict and I don't know how to merge it or I don't know how to do that correctly.
Or I've created the repo here, but I want to push to a different origin there.
And how do I do that?
So this is like, uh-oh.
Okay, so it's grouped by sort of category or something, I guess.
So repositories.
I want to start a local repository.
I want to clone a remote one.
These are pretty standard, right?
But as you go down, you'll see.
I set the wrong remote repository.
I want to push to a different origin and so on.
There's edit rules.
There's staging.
And they're pretty interesting.
There's discarding changes.
I want to discard specific unstaged changes, or I want to discard all of my untracked files,
but not the tracked ones, and so on. Or maybe if I am staging, let's see, I staged too many edits,
and I want to break them into a separate commit. What
do
I do? I want to unstage my edits and
unstage my staged edits, right? So all these things of sort of, here's the scenario,
rebase emerging. I need to update the parent commit in my branch when I'm rebasing. Whatever,
there's a bunch here. I even called out a few in the show notes.
I got to check out the rebasing
stuff because that always stresses me out. I
know, me too. One is like, what did I just commit?
I want to store a deleted file. I want to discard a specific unstaged changes. Not all of them,
just one of them and so on. Isn't this cool? Yeah, this is great. Yeah. Well, I think you're
letting me stretch the fight rules a bit, but I do. It's fine. But I think this will be super
helpful. It's sort of how to deal with stuff when, how to deal with Git when Git stuff goes wrong.
It's sub modules,
man. Oh boy. That's a whole nother. That's a whole nother.
No, it's good.
Okay.
So let's talk about t-strings a little bit.
We've already covered t-strings on the show before, I believe.
They came in with PEP 750.
But they're very new.
So to play with them, I think it's just 3.14.0 Beta 1 has them.
I don't know if anything before.
So I was just playing with them this morning a little bit.
But I'm really happy with this article from Brett Cannon, Unraveling t-strings.
And what I really like about it is because I really kind of wanted to play with t-strings
or just understand them more, but I didn't want to actually require, you know, it'd be
great if you didn't have to have the latest 3.14 beta 1 to do this.
And so that's really with this article.
So even though t-strings come in with the 3.14,
this article talks about going through all the details
of kind of how t-strings work without actually using t-strings.
So Brett starts out with this idea of like,
let's say you've got this little converter thing of converting,
take this function called fyeah that takes a T-string,
but here it says T-string, but it's just a variable name.
takes something and returns something.
And right off the bat, it's just an identity.
And what we want, and what he's showing is like with fstrings,
fstrings do a lot of things.
Like they can replace variables.
They can do one of those formatting stuff.
They can do format specs, specifiers, and then there's conversions.
Like this is a raw string conversion thing.
And so he walks with that with an example of just, you know, once you pass the SF string into the function, what do you get out?
But then he talks about, like, basically it starts out simple, but then he goes into, well, what if we wanted to pass in the parts, all the different parts passing into our function?
And then he passes in, uses like the representation or conversions and format specifiers to walk through those.
So basically we've walked through so far evaluating Python expressions, applying specified conversions, and then format specifiers.
And then goes into like just dives into it further of like, let's keep track of all this stuff.
And then let's, you know, let's make, we've got a lot of stuff we're keeping track of.
So let's put some of the things that were like all of the conversion stuff.
We'll put that into an interpolation class.
And I was a bit lost here.
So I actually walked through all of this.
And it was really helpful to actually run the code, like copy it into there and walk through it.
And then a template class and basically walking through all the different parts.
And then at the end, he shows you, says, basically, we've just built up something that would be like t-strings,
even though we don't have t-strings yet.
And then gave an example of what it would look like,
what it looks like through 3.14.
The example in the PEP 750 is right there.
You can run that too.
All really good.
So if you really want to get a handle,
get your brain around what t-strings are,
this is a great article.
But I was a little frustrated that it was all in,
like just files.
So I went ahead and rewrote all of his examples
as Python or pytest tests.
So you can just have one file and run them all.
Also get to show off near the end
because the last example,
you actually have to have a Python version,
Python beta one, 3.4 beta one.
So I'll show you,
show people how to use a skip if to skip that
if you don't have that Python version installed.
So yeah, that's cool.
I really had fun walking through
all of this article from Brett.
So thanks Brett for putting it together.
Yeah, very cool.
real-time follow-up.
This was not what I was expecting to talk about,
but I just had Paul Everett, Jim Baker, and Dave Peck
all on Talk Python just a little bit ago
talk about t-strings.
So if you want to dive into the internals
with some of the folks that worked on that as well.
Keep them listening.
Yeah,
that's not my next topic.
My next topic is like a hacker version,
cyberspace version of HTOP, Neo-HTOP,
HTOP, Matrix version?
No, Neo-HTOP.
a blazing fast system for monitoring your desktop,
which I think is super cool.
And I'm pretty sure it's cross-platform,
yeah, cross-platform,
a modern cross-platform system monitor
built on top of whatever doesn't matter.
But Rust is in there somewhere.
So we look at the features.
It has real-time process monitoring,
CPU and memory usage tracking.
This is a GUI, by the way.
Modern UI with dark and light themes.
Cool filtering.
You can pin processes.
You can kill processes.
Very nice.
So I actually have it running.
Let me pull it up here.
You can see whatever's happening on my computer right now.
Apparently, guess what?
The Vivaldi helper for StreamYard is grinding away using 50% CPU.
But there's all sorts of cool stuff.
You can hit these little informational things here.
No, that's the pin.
Hit the informational things, and it actually shows you stuff like how much CPU and memory is that process using exactly.
What is its ID?
but also what is its parent ID,
has like graphs for the memory,
and also what command was used to launch it.
I think this is super cool.
Oh, that's neat.
So if you see, oh, here's a, there's this,
why is this process running?
You know, it's a sub-process, but what is it doing?
It actually shows you.
And then if you go to the parent,
this is, I think, even cooler maybe.
You go to like, say, Vivaldi in this case,
and it shows all of the different sub-processes
that Vivaldi has created,
and how much CPU they're each using,
how much memory they're using, what their IDs are.
Isn't that cool?
Yeah, actually, I think a lot of these are useful for servers,
but I think I'd use this to store it on the desktop.
Yeah, exactly.
I'm thinking this is really nice for the desktop
because Windows has sysinternals stuff.
What is it?
Sysmon, I think it is, which is incredibly good.
It's way better than this, but it's Windows only, right?
And we've got on the Mac, we've got system and iStats menus around there,
which are really nice, but it doesn't give you the look inside the processes quite like this.
You also get stuff about network, about storage, about memory, all these things.
So I think that's pretty cool.
Yeah, of course.
It looks like you can kill things from here.
Yes, you can definitely kill them.
You can be malicious.
Anyway, that's my item here.
If you want some nice GUI desktop monitoring tools that are cross-platform,
check out this Neo H-Top thing.
It's pretty cool.
H-Top.
All right.
Where are we at?
remove okay next um we i think we just did we just talk about ty or thank you or ty or whatever
that was last week or something recently
so yeah
so that's the uh ty was the astral um type checker
and uh so this week why not do another so pyrefly is a new type checker from it's from facebook meta
So there's an article, a new type checker, yeah, introducing Pyrefly.
And one of the things I think is interesting about this, so it talks, I played with it just a little bit.
This is also based on Rust, so it's super fast.
And one of the reasons why they built it, apparently, the principles behind it are performance, of course, but also IDE first.
So I guess that totally makes sense, but I think a lot of things are built, you know, not thinking about the IDE right away, maybe.
But this is thinking about making sure that it integrates with the IDE really well and have a command line interface experience as well is good.
So IDE first, performance, inference, having this work well with Python programs that are not typed yet.
They're not annotated at least, but they might still have consistent with types.
So it infers types.
And open source, of course.
So even though it's from the Facebook engineering group, it's not closed source, open source stuff.
So that's good.
There's some talk about what they're going to do in the future, but really slick looking website, of course, with a VS Code extension.
And I made a mistake, though.
So I downloaded this and I thought, yeah, I just want to run it on one of my projects to see how well.
And the project I chose was the pytestCheck plugin and it blew up.
It didn't blow up.
It worked fine.
It just told me a whole bunch of stuff that was wrong that's not really wrong.
So I probably shouldn't have chosen the one project that I work on that completely abuses the dynamic nature of Python.
there's a check object
so I do often
from pytest check import check
this check object is both the
interface into the system plus
it's a context manager
and it overloads a whole bunch of stuff
so
yeah maybe
but having all those warnings might be a hint
that maybe I should redesign this
we'll see anyway
Pyrefly another faster type checker
and yeah neat
Interesting. Yeah, two things
that I'd like to add. It's a good find. I was considering covering this as well. Pyrefly is a replacement for the existing Pyre, P-Y-R-E, from Facebook.
Okay.
So
they had had that previously, and I guess this is like a rewrite or something like that.
And the other thing is comparing it to ty, aka Red Knot from Astral, this looks more mypy-like, which is somewhat the goal of ty as well.
But ty, I believe, is meant to be more forgiving.
So maybe it would scream at you less, right?
it's meant to work on less typed code, I guess.
But the main difference that I haven't looked in this deeply,
so maybe it's in there somewhere,
but one of the big deals of TY
is in addition to making a type checker
that comes with an LSP, a language server,
and one of the challenges with PyLance,
the one built into VS Code,
is when you get to extremely large code bases,
basically it falls apart
and sometimes can't even keep up or work with it.
So things like your autocomplete or go-to-definition
just start to shut off because the language server
can't deal with ginormous amounts of files.
And so they're trying to build a Rust-based language server
that flies on even millions of lines of code.
So when you compare ty to Pyrefly,
they're not exact just like, well, one is from Facebook
and one is from Astral, right?
They're slightly different as well.
Do you know if Pyrefly is doing a replacement language server also,
or are they using, you know?
I don't know that either.
They do have LSP as one of their tags,
but I don't see any more words than that.
Let's see.
Okay.
On their website, they don't.
Do you plan to build an LSP?
Yes, see our roadmap.
Oh, okay.
And what does the roadmap say about LSPs?
It doesn't appear on it.
So, you know, it's closed maybe.
LSP?
Yeah, I can't tell.
It's an infinite scroll thing, so it's like sort of hard to get there.
I mean, you kind of need an LSP to understand it.
You need something that parses into something like an abstract syntax tree,
then you start asking type-based questions about it, right?
That's how a lot of these work.
And one of the frustrating things, though, with the limited,
I'm looking forward to having some of these Rust-based language servers come online
because it's the large projects that I really need all the help with.
The smaller projects,
I don't really need, I mean, I kind of can get my head around it already.
But so
anyway.
I'm just going to be using chat to write on my codes.
I don't care.
Just kidding, people.
Just stick with the vibe.
Yes.
Speaking about stuff running on platforms I worked on, talk by then training.
Let me tell you about a new course that we have over here.
Polars for Power Users, Transforming Your Data Analysis Game.
So this is a super fun course put together by Christopher Trudeau.
And it's super fun.
If you want to learn pollers and you know a little bit of pandas
or you know tools like Excel and others,
it kind of walks you through like,
hey, you know how to do this in other tools.
But here's the advantages.
Here's the different API.
Yeah, really fun if you want to get started with pollers
or see it compared to various tools like I mentioned.
Definitely worth checking out.
$29, you can get going there.
And it's three hours, I think.
Not a lot of your time, not a lot of your money,
but you'll have a nice new skill set at the end.
Nice.
And let's see, what else have we got here?
A couple of announcements.
Airflow, the workflow framework,
has its biggest release,
the most significant release in the project history.
They describe it as Airflow 3.0,
builds on to adding a new service-oriented architecture,
modern React-based UI, enhanced security,
host of long-quested features such as DAG versioning,
directed acyclic graph versioning,
improved backfills, event scheduling,
and remote execution.
In this case, I guess that's a good version, a good thing.
A lot of times remote execution is bad,
but when you ask for it, it's good.
Anyway, if people do Airflow, check it out.
It's pretty cool.
There's a new one there.
And my last one, this came in just yesterday,
I think is when I first saw it.
Paste.
Brian, do you use some kind of clipboard manager?
Yeah.
Other than just the clipboard itself, obviously.
Oh, clipboard manager.
No, I don't.
Okay.
So once you start using one of these things, you will never, ever want to go back to working
without it.
Here's the thing.
Have you ever done this?
Have you ever gone and said, oh, I need to copy this.
And then you go over and accidentally copy something else.
Or I
don't know about
you, but I use Bitwarden for my 2FA stuff.
And by default, it has a copy.
In addition to pasting the 2FA code, it'll just copy it because sometimes the paste fails.
But if I didn't have this clipboard thing and I like copy something important and went over and I tried to want to paste it somewhere,
oh, I got to log in.
I hit my Bitwarden thing and I'm like, no, it's gone.
Where did that go?
You go back and find it.
This thing called Paste for Mac.
I know there's similar things for other platforms, but my recommendation in this little extra is Paste.
So
super, super nice thing.
They just released Fivo, which is like a big improvement.
So what it does is it'll keep track of three months, a year, one month, whatever, of clipboard
history.
So you can copy three, four things, go back, hit a button, go back, find them, you get
little thumbnails of them.
Or you can even search.
You're like, just, I want to see what did I copy?
You can just type Firefox and I'll show you everything you've copied from Firefox in the
last month.
And you can copy from that or reuse it or whatever.
And it'll like synchronize across Mac and your iPhone and so on.
So super cool thing.
Anyway, they just had a big release.
It works much nicer.
If
you don't use something like this.
I think I would do it by just like five minutes.
But, you know.
Yeah, you can do five minutes.
I mean, you can change however you want.
But I think you'd be surprised.
You're like, oh, yeah, I know I copied that yesterday.
Or I have the same.
Whenever I'm creating a new Python Bytes stream, I have the same description.
but the software won't remember the same description from,
so I got to copy it or retype a paragraph, right?
Like, no.
So I just hit the hot key to pull this up
and I type
join
us and then boom,
that's the join us to be part of the show
and come to the live stream, da-da-da-da-da,
and I just paste it.
And so from last week,
I just get that back in like three keystrokes.
Oh, nice.
Brilliant.
So
if you're on macOS,
check out this paste.
They had a new release, super nice.
If you're on something else,
maybe send us recommendations.
We'll give them a shout out or something.
All right, those are all my extras.
How about you?
I got a couple.
Let's see.
Where are we at?
So Python, the documentary.
I've kind of looking forward to this.
There's a trailer out, official trailer for the Python, the documentary.
It's just a couple minutes.
But it looks like it might be fun.
This looks great, Brian.
This looks really good.
And I know they did this, like, joke thing about Guido coming back
and the empire strikes back sort of thing and all that.
But if you click on CultRepo, the username of this right there,
and go to their videos and look through it,
like if you look at all the things they've done,
you can see, by the way, that video I talked about.
But they have from Node.js to Dino,
and they've got the Angular, the official documentary, and so on.
They've
got a bunch of cool,
in-depth, highly produced
Ruby on Rails, the documentary, and so on.
A lot of programming-based, framework-based documentaries,
like really nice storytelling there.
So I think that is what's coming
with the Python documentary.
I'm going to have to check out
Life Advice from Bjorn Strewstrup.
Pointers.
Always use pointers in your life.
Never duplicate.
Yeah.
Interesting.
Yeah.
No, some good stuff there.
Okay.
So that was one was the documentary.
Documentary?
Also, quick errata.
I mentioned that when I was talking about t-strings,
I mentioned like the raw conversion.
It wasn't the raw.
Henry corrected me.
It's the repper conversion.
Thank you, Henry.
So the next step.
So, okay.
So the new Python.
Oh, Tim Hopper.
We covered this already.
The Python developer tooling handbook.
And one of my comments was, where's the testing?
So anyway, he added a testing intro also, setting up testing with pytest and uv.
And actually combining the two is kind of fun to show how you do add pytest to your dev environment with uv.
Pretty fun.
Very simple example, a little calculator sort of thing, add, subtract, multiply, testing.
So shameless plug, if this isn't enough intro to pytest you'd like,
I suggest going over to courses.pythontest.com where you can pick up any course you want on pytest.
And a couple others, I guess.
Last thing is I've been using Pocket for a while to keep track of things I want to read.
Pocket's going away.
It's shutting down, I think, as of July, July 1st.
Anyway, I don't know when it's shutting down.
But it's shutting down, so you've got to move off onto it.
If you're using Pocket, don't use Pocket anymore.
What do you should use instead?
Obviously, you can check whatever, try your own things out.
I tried a few things, and I landed on Raindrop.
So I haven't been liking Raindrop so far.
And somebody, I posted this on social media.
Somebody said, well, what does the code look like?
Because sometimes these bookmark sort of apps aren't that great at code highlighting.
And I'll show you an example.
This is of Brett's T-string article.
It's not bad.
It doesn't.
So the web view had, this is the normal view had, oh, it doesn't show highlighting.
The other version I had had syntax highlighting on Brett's site, but it doesn't show syntax highlighting.
It's just code blocks.
So it's not bad.
Anyway, I've been enjoying Raindrop so far.
And that is all of my extras.
Awesome. Yeah, I
started using Raindrop and I love it. I moved all my, I went on a journey, Brian.
Not only did I start using Raindrop, I said, I'm going to go to all my various browsers I've used
throughout the years, Firefox, Vivaldi, and others. I'm going to clean up all of their bookmarks
because they'll be like just cruft. You know what I mean? From like 10 years of, I'm like, nope,
nope, nope, nope, nope, nope, nope, nope. Keep these 100 or whatever. Then I imported all of
those into raindrop and now i have the extension in all my browsers so on any computer any browser
i have all the same history it's really nice so i definitely second that
also beast i just started
off clean
i got like
three things in there so far i
not only migrated i cleaned it up one other
option if you're a self-hosting person this appeals to me but i did not do it because i just don't want
more things to babysit at the moment but this thing that used to be called hoarder now named
Kara Keep. Looks super cool. It's like a self-hosted read it later bookmark service,
which is cool. Automatically tag your bookmarks with AI and et cetera, et cetera. Looks pretty
cool. So yeah, but I'm not using it. Are you ready for a different kind of joke?
Yeah.
All right. Have you seen this yet? No. Okay. Well, here we go. So I was sitting around thinking,
I don't know why I came across this, but I'm like, what if we had like historical quotes
that are well-known, but they were reframed for programmers, right?
So I set
out to make this just the joke for the show.
And then I ended up kind of like, you know what?
Why don't I just publish this?
And then we'll still make it the joke for the show.
So you know the Roosevelt's man in the arena speech?
I
love this speech.
I'll read it.
It's a little bit long, but not very long.
I'll read it for people.
It says, it's not the critic who counts,
not the man who points out how the strong man or woman stumbles
or where the doer of deeds could have done them better.
The critic counts.
The credit belongs to those who are actually in the arena, whose face is marred by dust and sweat and blood, who strives valiantly, who errs, who comes up short and again and again, because there is no effort without error and shortcoming, but who does actually strive to do the deeds, who knows great enthusiasms, great devotions, and who spins oneself in a worthy cause, who at best knows in the end the triumph of high achievement, and who at the worst, if they fail, at least they fail while doing greatly, so that their place shall never be with those cold and timid.
its souls who never, you know, neither know victory nor defeat.
All right.
So that's the famous quote.
What if, what if Theodore was speaking about programmers?
So I came up with a couple of versions.
I think these are more fun.
All right.
It is not the, I kind of gave him title.
This is a legacy code warriors.
This first one, it says it is not the keyboard warrior of comment threads who elevates the
craft, but the engineer whose IDE still glows at midnight, whose mind is seared by stack
trace here graphics and whose resolve endures failed build after failed build.
The honor rests with those who wade into legacy code knee-deep in technical debt,
emerging grimy but triumphant with a cleaner architecture,
or if defeated, bear the proud scars of having fought for elegance.
Then, I'll do the last, I'll read the last one.
This is good.
This is to the open source maintainers.
No glory clings to the spectator who counts another's failed build.
It crowns the open source contributor whose pull request is battle scarred by review,
whose changelog tells the failures endured,
and whose merged code becomes the unseen engine of tomorrow's discoveries.
There you go.
I like it.
Yeah, something inspiring for people there.
You having trouble sleeping, Michael?
Actually, yes, but this is not evidence of it.
Okay.
No, I like it.
Yeah, thanks.
All right.
Well, that's all I got for you, Brian.
That's what I got.
All right.
That's good to wrap it up then.
Indeed.
All right.
See you later.