Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 421, recorded February 24th.
And I'm Brian Okken.
I'm Michael Kennedy.
And this fabulous episode is sponsored by all of you folks that support us at,
like maybe taking a course over at Talk Python Training or heading to pythontest.com,
learn about pytest, maybe taking a course.
We also love our Patreon supporters, so thank you.
If you'd like to connect with us, of course, you can check.
There's six links in the show notes for the show and me and Michael over at Bluesky or Fosstodon or Mastodon.
So keep in track of both of those.
And if you'd ever like to jump into the show live, you can head to pythonbytes.fm/live
and check out when the next recording will be and you can be with us and ask questions and stuff.
And it's fun.
And finally, the newsletter is still going out.
And Michael's made some improvements to it.
So we're making some neat things.
And I think it's a really cool resource now.
If you're, especially if sometimes you listen to the show and you're like,
that seems like a cool topic, but I don't quite know much about that thing that they're talking about.
We're including some background information.
So if you'd like to learn more about the topic, we're including a lot of links and that's really cool.
Yeah.
Super fun.
Yeah.
Speaking of super fun, what's your first topic for us, Michael?
You know what is super fun?
Debugging is super fun.
Because testing is sometimes fun, but debugging, that's where the mysteries really live.
You never know.
And if you don't do much testing, you might do more debugging.
You never know.
Anyway, I want to talk about debugging HTTP calls.
Now, one way in which you might do this is you might say, I have this well-factored piece of code over here.
And I can call this function and we can, in isolation, test how it talks to some part, something else in the world.
Right.
And maybe we'll mock the HTTP later out.
We talked about REST, RSPX, which was a cool way to mock out HTTPX.
And, you know, there's VCR and other things like that, which you might do.
But this kind of allows you to intercept what's actually happening.
You could use it during tests or you could use it just when your app is running.
All the HTTP calls coming out of your Python app and then gives you a UI for understanding them.
Pretty darn cool, I think.
Yeah.
Okay.
So what you do is the thing is called HTTP DBG for debug because those two vowels are hard work, folks.
And so HTTP debug tool is for Python developers to easily debug HTTP or HTTPS client requests in a Python program.
All you got to do to use it is instead of saying Python, my app, you say, hi, HTTP debug, my app.
And it will sort of wrap and mock out all of the stuff.
Mock is maybe not quite the right word because it still does the action.
sort of put an adapter or an intercepting layer on top of all your behaviors, right?
Okay.
So you get, yeah, it's pretty cool.
So you get this UI and it shows you all the requests that your app has made.
And then you can click on them.
You can put them side by side and compare them.
All those kinds of stuff.
Which for the grand total effort of pip install and then run your code slightly differently.
But it's, you know, that's a lot of benefit and a lot of visibility into your app.
So if you're doing things like maybe using Postman or something like that to kind of test out the calls and you try to replicate it over there and you're like, why is it not quite the same?
Well, you put this thing on it and see what happens.
Yeah, I can also see this like as a learning tool while you're just learning how all of this stuff gets put together.
Like, how does the request get, what does the data look like and what's going on here?
Yeah.
It's pretty neat.
Absolutely.
Yeah, yeah, absolutely.
And the other thing you can do is it's not just your direct HTTP calls, like say HTTPX or requests or something.
If something else, a library you're using is then calling the API and it's not your library, you still get visibility into what that thing's doing.
Because it's anything the application does, not anything that your code does, which is pretty cool.
So if you're using, say, the Sentry API and you're like, why is it failing to talk to this thing?
Like, what is it even doing?
You know, you just say capture exception.
But, you know, somewhere along the way, HTTP request is being done.
So you could intercept that as well, like all the traffic.
And I guess if you're like, is my thing spying on me?
Is this library that I'm using reaching out to something that I'm not aware of that's happening?
You could also catch that theoretically.
But it supports requests, URL, HTTPX, my fave these days, aiohttp, pip, pytest, UnitTest, and your package.
Yes, if you include it.
Anyway, there's, then when you run it, you get a web interface that gives you some behaviors in the UI.
You can change the strategy to group requests.
You can hide the scheme, the network URL.
You can group rows, tags, all these different things.
So there you have it, folks.
HTTP.
I think you're supposed to just say the initials like HTTP.
This is hard.
HTTP.
DBG.
Yeah, that's.
Yeah, possibly.
Anyway.
Okay.
Something a little easier to pronounce.
PyPI now supports iOS and Android wheels for mobile Python development.
This is cool, I think.
This is very cool.
Yeah.
This is very cool.
So this is brought to us by Sarah Gooding.
And so the announcement really is there's been some work.
Russell Keith McGee has been a longtime advocate to try to push this ball forward and get Python directly on devices better.
So there's a couple of PEPs, 730 and 738, to talk about adding iOS and Android as a supported platform.
So now they are their wheels supported there.
So how do we take advantage of this?
Well, there are some information in the article that we're linking to.
But also, let's see.
There is, there's some tools that I've heard of Beware and we've covered Beware and Kivi before.
And then Chakopi, Chakopi, maybe?
I don't think, I don't know if we've covered that.
But that's another one for Android.
Yeah, that sounds new to me as well.
I haven't, I don't remember that one.
So, however, so you're going to either use these.
But I was curious about like, so for pure Python stuff, if I want to be able, like, if I'm not doing anything too fancy,
and I want to be able to have it be installable on one of these, what would I could possibly do?
And CI Build Wheel is one of the tools that people have used before for other operating systems.
And apparently that's not ready yet, but that is in the works.
So CI Build Wheel updates are in progress to simplify iOS and Android wheel creation.
So soon, more and more third-party little libraries might be in, possibly big libraries might be available for.
Yeah, that's awesome.
I'm very excited for this.
I think this is, you know, there's two areas of Python that are very troublesome, right?
If someone comes to you and says, hey, I want to do some programming.
What language should I use?
Python, that's a great one.
Yeah.
So I'm looking to build a mobile app like this.
Hold on, hold on, hold on.
I totally retract my statement.
You can't even, don't do that.
It's the one.
And then the other is like Vue, React, other front-end JavaScript-y things, right?
And what's cool is that the folks at Anaconda are actually really working hard to address both of those.
And part of what we're seeing here is some of the work from them.
I actually had, bumping over this way, I had Russell Keith McGee on, the guy behind Beware,
to talk about the state of Python on mobile just, YouTube helped me out, five days ago.
Wow.
To talk about this.
And he's been working, employed by Anaconda, as part of their open source team for a couple
years, solving these problems.
Getting him and a guy named Malcolm are getting peps to have Python officially be, to have iOS
and Android an official build target of CPython, which is pretty interesting, right?
Yeah.
We expect, as part of the core developer process, we should be able to build it so that it runs
on those platforms.
And those peps, I believe, are accepted, but not necessarily in yet.
So that's upstream in a lot of the work that Russell has done.
And they're using CI Build Will to make this happen.
So a lot of interesting stuff happening there.
Yeah.
Cool.
Yeah.
I wasn't planning to talk about that episode, but since you brought it up, it sounds like
if you guys are like, wait, what, what is all this about?
You know, listen, I don't know that much, but Russell gives us the whole rundown last week.
So you can check that out.
Can't wait to listen.
Yeah, definitely.
Should be out soon.
Okay.
No joke.
How about a game, though?
Yeah.
I like games.
I'm ready for the joke.
But the game.
So we got a notification from, I can't remember.
Oh, yes.
Mayak Simering, who's working on Arcade, the game platform, and it hasn't had any major updates
for a while until now.
They just released 3.0 of Arcade.
So if you are a huge fan of Mario Brothers type of 2D scrolling games, or you want to build
something like Asteroid, you know, the game from the 70s, that kind of UI, well, this
is a really great platform for it.
So what are the changes?
Breaking changes.
But, you know, I guess that's expected after a while.
Drop Python 3.8.
Seems fine after, you know, the world has moved on from there.
But texture management completely changed.
And they used to cache everything.
Apparently it was too much.
But now you can reload and probably things are fast enough that you don't need caching.
It works better.
Like, keep working memory.
In the graphics card or something better.
Remove some stuff.
Fixed Arcade context and so on.
But, you know, mostly, I want to put this out there as if you've been thinking of building,
like a 2D game type of thing.
And you're like, well, Arcade's interesting, but it hasn't gotten a lot of love.
Well, now it has, right?
Last update yesterday.
Pretty cool.
You know, actually.
If you want an example, there's some examples.
Sorry, Brian.
There's some examples you can link to off of the Arcade Academy website.
Go ahead.
No, I just, you said it hasn't had a lot of love in a long time, but it's still been,
I mean, I don't know if they needed to fix some things to get it to work on modern Python.
Okay.
Yeah, I'm not sure if they, I don't know that they necessarily did, but it just hasn't had
any major releases, you know?
Well, I'm noticing, so I've been doing that top pytest plugin thing and investigating a
lot of the plugins.
And there's a lot of stuff, I'm noticing there's a lot of stuff that used to be updated a lot.
And for, just to say, like in the trove classifiers to say, I support, you know, 3.8, 3.9, 3.10.
And then they just sort of stop.
But a lot of, I guess, try stuff out because Python has been pretty stable for a lot of
things.
And it's been, even though we've gotten some really cool things, it's still very backwards
compatible.
So there's a lot of old packages that don't say that they work on modern Python, like 3.13
or something, but still do.
So don't dismiss a package just because it hasn't been updated for a while.
Try it out.
It might be fine.
So that's good advice.
There's one thing where I can't remember if it, was it Rust or some other platform, their
equivalent of PyPI was they were automatically putting security warnings or something like
that onto packages that had not had a Git commit in two years.
But, you know, it might be done.
There's a thing that could just completely do what it's supposed to do and not need to
change anyway.
Yeah.
So you can check out the different kinds of games.
I got some, a bunch of example games that you can play.
And try on.
They look, they look pretty cool.
Like if you're looking for a, I don't want to use Unreal Engine and go completely down the
higher team of a hundred people to build a game.
Yeah.
That's the fun.
That looks pretty cool.
It does look pretty cool.
Yeah.
And I think it's, I think it's OpenGL based.
Pretty sure.
Is that right?
Yeah.
It's built on top of Piglet and OpenGL.
Yeah.
So use your graphics card for all sorts of fun stuff.
Yeah.
I guess I'm, I'm on tangent mode right now.
I guess I was thinking about games and a lot of people think, I think a lot of kids get
into like want to get into programming because they think game programming would be fun and
game programming is hard.
And I mean, there's a lot of programming that's hard, but, but big game programming, there's
a lot of stuff going on.
And, and it doesn't necessarily, I just don't get frustrated if you start game programming
and it, it, it's a little difficult and that's, there's a lot of programming that's pretty, pretty
straightforward.
Yeah.
So yeah, I totally agree.
I, I did some of my first programming was 3d simulators in OpenGL and it was not the easiest
thing ever in C++.
Yeah.
Nice.
Okay.
Well, other things to not do, is don't, okay.
I'm, I think I'm going to have too many negatives here.
I just, I guess one to announce that PEP 765 has been accepted and PEP 765 is to disallow
return, break, and continue, that exit a finally block.
That's a lot of terms.
So what am I saying?
it's that there's the keywords return, break, and continue shouldn't show up.
In a finally block.
And, when I first saw this, I'm like, why would I do that anyway?
I, I just don't, I usually put pretty simple stuff in finalies and I wouldn't ever think
to do a, I might think to do a return or anyway, that the, the, the, it's just bad.
And the behavior apparently is surprising.
So, so they really would hope to not have that in there.
So apparently this was rejected once before, but now it's accepted slightly different.
There's a, the, I guess there's some, cost benefit analysis of the change that was
done and it will be better for everybody if we do this.
However, because of some backwards compatibility stuff, it will not be a syntax error.
It will be a syntax warning.
So I guess, we'll, we'll rely on, people running with dash W a or having rougher
like eight or pilot or something.
Check this stuff for us, but basically don't, don't do it.
Just don't.
So it's not good.
Not good.
Yeah.
I can sure.
I can sure see return in it.
Finally.
That makes a lot of sense to me.
I, it's a little, I'm not sure why return is pulled out, but like break and continue
and other looping.
And I can see why that's all right, but yeah.
Yeah.
Whatever.
I mean, it's not hard to work around.
Just that.
Yeah.
So this isn't a big topic.
Just, just to be aware if you're doing something fancy within your finally blocks,
pay attention to this.
Stop.
Apparently.
Yeah.
All right.
Well, we're going to stop with our items, aren't we?
Yeah, we are.
We got some extras.
We sure do.
So exciting.
Let me fire some up.
So remember our teapot episode for 18.
I'm a teapot.
Well, we had our joke about the teapot and, I think the person who created the joke that
we covered felt that he didn't get enough love or something like that.
Cause we pulled up a post somebody had on Mastodon, Mastodon, Bluesky, Bluesky, I think that
said, Hey, funny joke.
Person shared it.
Well, Nikita says important correction.
we, I think it's, I created this joke.
So anyway, thank you, Nikita for, creating this joke.
It was very funny.
So I'll, I'll link to that to give him a little bit of credit.
Next up, Brian.
Oh, it's just like a slightly different name.
So Nikita reported it.
It was a joke by Nikki Tonsky, a different person.
Oh, different.
Okay.
All right.
Perfect.
Well, thanks for the correction.
So I have something really surprising.
So check this out.
I had a Mac mini M1, the very, very first.
Apple Silicon Mac that came out, the Mac mini.
I got it in 2020.
And I remember, I think we talked about this at the time in 2020.
I'd already ordered the new MacBook pro, which was still the Intel.
Then I saw the Apple Silicon stuff come out and I actually canceled it and like reordered
the mini.
And it was best decision ever.
Well, good decision and worked out great, but it's just been chilling around here.
I've had my Mac mini M2 pro that's all maxed out and it's been laying around at that.
You know, I'm not doing a lot with the other one, but I wanted to set it up so I could do
easier recording.
And I'm like, starting to get a little slow, but you know what?
I'll just, I'll just live with it.
I don't really need to buy a new mini.
Like I don't need to waste the money just for that.
And then for some reason I start, I saw the, that Apple started having refurbished ones that
you could buy.
And it turns out to not be a very good deal.
It's like, Hey, the refurbished one's like 579.
The new one's 599.
And I go, wait, I'll just take the new one.
I looked at what would my old 2020 Mac mini trade in for?
Well, first of all, how much is a new Mac mini with the M4 10 core, 10, pretty much the same
specs except for the hard drive.
Oh, and it's the brand new way, way faster computer.
599, 600 bucks us.
Wow.
My old mini from five years ago traded in for 425.
What?
So I got a brand new Mac mini M4 for $175.
I want to point out anyone else before any of this stuff changes, you might also want to get a new
mini for $175.
If you have a five-year-old one, how awesome is that?
Yeah.
I think mine's only a couple of years.
I should check it out, but it might be worth checking out.
And I ran it through geek bench here.
And even against my M2 pro, which is way faster than my old mini, it is this new one that was $175,
a lot faster than even the M2 pro single core is like 40% faster.
Even multi-core is something like 20% faster for that little bit of money.
So, hey, that's just putting it on the radar.
Y'all might want to check that out.
That's a pretty good trade, in my opinion.
Nice.
All right.
That's all for my extras.
But yeah, I just thought that that was a really surprising thing.
I'm like, you know, all right.
Okay.
I'll do the trade.
I'll trade the mini.
A couple extras.
Also, I just really love using the mini to record with because it's always silent.
It's always silent.
And it's...
Yeah.
And they're pretty cheap, even go big.
So I just went for a bottom-end one.
I think I spent $400 on this or something.
Ridiculous.
Well, you probably can trade it and get one for like another $20.
Yeah, maybe.
So I have mentioned before that I'm not a fan of Scheme and Lisp.
And I guess I just want to hit a nerve for at least one person.
Philip.
And I'm sorry, Philip.
I'm not going to try to pronounce your last name.
But it looks cool.
Lisiak?
Something like that?
Okay.
Lisiak?
Nice.
I'll probably mess it up, but we'll see.
Okay.
But he decided to...
And we interacted on the...
I think Fosstodon or Bluesky or something.
And just kind of...
He said, you know, basically, what do you got against it?
I'm like, I don't have anything against Scheme, really.
I just...
Personally, me, I didn't find a lot of use for it.
And we talked about it.
And I actually wrote up this big conversation with him that I need to make into a blog post.
Because I do appreciate that I learned Scheme.
I just haven't used it a lot.
So...
And he said, there's a lot of uses.
And I said, I'd love to hear some.
And he's like, oh, okay.
Well, then I'm going to have to write a blog post.
So he wrote My Land of Scheme in 2025.
So we're going to link to a blog post of all the cool stuff that Scheme does lately.
At least from his perspective.
So that's cool.
And then...
Actually, I really enjoy his writing style.
So I really like good long-form blog posts.
But anyway, good writing style.
Thanks, Philip.
And he also just recently released another article,
Exposing Flaky Tests with pytest Rerun Failures.
And it's a plugin that I've used a lot too.
So cool writing.
So keep up the blogs, people.
Like it.
And I'm really sorry if I have offended anybody that likes Scheme or...
Or what else?
Who else can I offend?
Pearl writers?
C-sharp.
I just don't enjoy writing C-sharp in Scheme.
It isn't anything against the language.
It's just not for me.
So anyway.
All right.
Well, I can see why it's tough, Brian.
I can see why it's tough.
I actually pulled this joke up when I thought of...
I can see why it's tough.
And I thought of you when I said...
So, question.
This is like you being too logical or you may be a tester.
When I was four, my sister was two.
I'm now 44.
How old is my sister?
Programmer.
Easy.
44 minus four, but minus two from that.
And all that.
That's two years difference in the gap.
So, 42.
Tester.
Well, you see.
This is a tough one.
She might be 42, but she could be 41 or 43 also.
Since you didn't say when your birthday is and her birthday is.
Also, she could be dead.
Finally, I thought she was your sister.
You might have thought she was your sister, but actually your mom had an affair with another
man and a woman who was one.
And it turns out it's not your sister.
So, with that...
You know, and on and on it goes.
Give it away your real sister.
You don't know how old she is.
Finally, what if you think your sister is dead, but she actually has become an astronaut on
a secret government project and she's been traveling at near light speed.
Now, her time is going much more slowly.
She could actually be younger than 41.
You see, it's hard to be a tester, right?
Yeah, I like it.
I like Anthony's answer.
Two is half of four.
So, if...
Oh, my God.
Hey, Anthony.
Shout out in the audience there.
You are absolutely right.
And if you go to the YouTube comments, it's...
Duh.
She's 22.
Then it says...
Someone else says, a fellow McDonald's graduate, I see.
Yeah, that was an easy one.
Oh, follow up.
That's a chat GTP answer.
Chat GPT answer.
Last time she was half your age.
Oh, my gosh.
Okay.
Oh, and nice inside joke there.
Anthony making fun of AI since he's pretty much an AI pimp these days, as far as I remember.
But anyway.
Anyway, the comments are pretty funny as well.
And then someone just responds green.
Green.
Awesome.
Well, it's great to have people in the audience to chat with and be part of the show.
And, Brian, great to be here with you, right?
It's good to be with you.