Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 435, recorded June 9th, 2025.
And I am Brian Okken.
And I'm Michael Kennedy.
And this episode is sponsored by us.
So please check out all the awesome courses at Talk Python Training and lots of different options for learning pytest at pythontest.com.
So check that out.
And also thank you to our Patreon supporters.
They've been sticking around for a long time, and we really appreciate them.
If you'd like to connect with us, more about this later, but if you'd like to connect with us, please check out the links in the show notes.
Links to both Blue Sky and Mastodon are there.
And if you would like to join us live, you can head on over to pythonbytes.fm/live, and it'll show you how to do that.
There's a link at the top.
It's really easy.
And then also, when you're listening and you want to check out all the cool things that we talk about but don't want to write them down, no worries.
Just go ahead and sign up to be part of the newsletter, and we'll send those directly to your inbox.
So
with that, do you have a cool item for us, Michael?
I do.
I have some stuff I want to talk about.
It's an
update on things I've spoken about before, but it could have been six years ago.
I can't remember when we covered this and I for some reason didn't do a search.
So here's the deal.
You are writing an application and you're doing things like, hey, I need to have my app save some content in a file.
I don't want the user to access it.
I want my app to be able to get to it.
And that's pretty much it.
Like maybe a SQLite DB file, right?
That's not a thing that the users should be tracking down.
You don't want to put it in their My Documents on Windows or somewhere in the user profile on Mac or Linux or something like that, right?
You need to save it somewhere.
It needs to be associated with the user.
They need to have permissions right there.
So I previously talked about appdurs, the appdurs package, a small Python module for determining appropriate platform-specific directories like user directories or stuff like that, right?
So where's your config?
Where's your cache directory?
So on macOS, that's like tilde slash capital library, capital L library, cache.
Then you probably use app name, something like that.
Those kinds of things, right?
You
want to get
access to that and put things in there.
And it drives me nuts, Brian.
I go to my user profile.
If I want to look at hidden files, there's a ton of dot this app, dot that app settings in my user profile.
And they're not there for me.
They're there because the designers of those apps were too lazy, usually, too lazy to put that into the appropriate location on that platform, right?
There's some that maybe I should mess with.
Like, for example, OhMyZShell, you might want to go and tweak like your prompt, how that looks or whatever.
And right, you would get to that from there.
But a lot of things, they just do it because like, well, we'll just do a dot because it's hidden.
People won't see that.
Just drop it right in there.
So I implore people listening to put stuff in the right place or a better place.
Well, okay, I'm guilty of this, but I don't really think about Windows too much.
I just think about like in a Linux-y environment, the home directory is usually the right place.
well I well maybe I mean let me see what I got in here I don't think so but
let
me do an an A um what do I do my hidden ones there you know I do it this way hold on I do it this way so for example um
well I'm probably doing it the wrong way there too so you're probably maybe but
there's like studio 3t which is a MongoDB GUI management tool it has all of its settings in here is that something that I should be working with should I be seeing this probably not it's like a dot 3t folder and it's got like
roaming history
and crap in there i've got dot android for whenever i have that android sdk doing something
i've got um
i mean i can see like i've got a dot aws maybe it's got things in there right but i have a dot matplotlib for real there's a dot matplotlib in here why why is it here i don't know there's a pip audit cache literally it's called cache should i see the cache. No, the cache is not for reading. It should be in, there's literally a cache folder on all these platforms where it goes. And maybe on Linux, it literally is just like there, but okay, fine. But on the other ones, it shouldn't be, right? Anyway,
maybe I'm
ranting a bit hard on this, but you should probably do these correct things. And I wasn't even thinking about Windows, although Windows does have a different set of places things go, right? So this thing was great and I recommended appdirs.
But if you go up a little bit, it says, note, this project has officially been deprecated.
Oh, no.
No.
We were so close.
So it says, you may want to check out platformdirs, which is my recommendation.
So moving over to platformdirs, this is under toxdev, T-O-X-dev.
So full group there.
And it's a small Python module for determining the appropriate platform-specific directories, such as I just said.
However, it's better in some ways.
So it has, I don't know if you noticed before, but there's maybe three or four directories on the app doors.
This one has documents, downloads, pictures, videos, music, desktop, runtime, et cetera, et cetera.
Lots of different places that you might want to go to depending on what platform you're on, right?
It has a better typing.
It has been rewritten to use path as in path
objects
from pathlib
and
all that.
It's got CI testing against all the different platforms that it supports.
So very, very cool that this is not only continues to live, but it's actually gotten much better.
Yeah, and the TOX development group is going to keep it updated.
So cool.
Yeah, exactly.
It can't require that much support over time, right?
These things are
not super
dynamic, but I do really appreciate them.
Modernizing it, you know, I think that some of the changes were that basically the app just got out of sync with Python rather than out of sync with the platforms, right?
It was just like, well, it doesn't have types.
And so now we got, you know, and there's just a bunch of stuff like that.
So I'm very happy to see it and recommend platform DERS.
I already used it to massive success on some projects.
I was like, I want to use this and some cool caching things.
And it made my app so much better.
And guess what?
There's not yet another.Michael's app cache
in my tilde slash.
Over to you.
I'll have to do this on some of my applications.
So anyway.
It's worth considering.
So I'm glad you brought it up.
All right.
I'd like to actually want to do a shout out to Bob Belderbos because he posted, I think he posted on several platforms, but I saw it on LinkedIn.
It says, I love make files.
They save me time and help my team work in a more uniform way.
I'd love to be able to say this.
I love make files also.
Actually, I don't love them.
I'm just used to them.
So I throw in a make file into something that makes sense.
But for a very long time, nobody else on my projects have been familiar with makefiles.
So
I
can't use them.
That would be
me.
I'd be like, what's a makefile?
Why do we have this?
That would be in Python.
So some Python projects I use, I use Tox because you can do kind of some similar stuff with Tox.
But it is annoying that it like creates a virtual environment.
It's better with uv now because it's fast.
But still, there is, so there's a new kid on the block, or at least new to me, called, that Bob has introduced.
And it's called Poe the Poet.
And I was a little leery because I thought it maybe was too tied to the poetry project.
But even if it is, you don't have to use it with it.
I'm using it without it, of course.
But anyway, so the thing I love about this is, as an example, I'm leaving this on Bob's post because it's great.
In your pyproject.toml, that's where you define the tasks.
And this is great because I don't have to have an extra thing, an extra file in my project.
This makes sense to just put it there.
So here's an example of like, so a test action would be, you can just define it as pytest or something.
Or Cove, you can have pytest running with coverage.
The linter is rough, which is, it's funny, people still do this, but actually I remember rough better than I remember lint anymore, but you know, it's just me.
But anyway, some cool type.
Oh, he has tie check for the ty.
What?
Wow, he's on top
of that.
That is super new.
Integrates well with uv.
I tried it out.
It is pretty slick.
So the Poet the Poet documentation says batteries included task runner that works well with poetry or with uv.
I'm definitely using it with uv.
There's a bunch of cool things how to define this in the documentation.
It's pretty good.
So you can, like Bob said, you just add a section called tool.po.tasks and then define a bunch of actions.
There's ways to have built-up actions like you would with a make file or tox.
Actually, I don't know if you can do this, tox.
Anyway, you'd have multiple actions that run one after another.
The sequences is pretty cool.
You can also add help text to things, which is nice.
Anyway, but having it right in, I just love it.
It's right in the PyProject.toml, and it works well with uv.
Love that.
So definitely going to switch it for a lot of projects.
And there's an example.
I'm not sure where the example is right now, but in the kind of getting started, or maybe it was Bob.
Anyway, adding it to your development dependencies within your PyProject.toml is slick because then now if you're using, hopefully you're using development dependencies within your Project.toml so that new developers can just install all the tools they need to just by using that.
So pretty cool.
Love it.
Yeah, very cool.
And by the way, did you catch that the logo of Poe the Poet is Edgar Allan Poe?
Yeah, he's the poet.
Very interesting.
Okay,
next up is some data science.
There's an article I'm linking to on the new stack by Jacob Jackson.
This is that Pandas 3.0 will significantly boost performance by replacing NumPy with PyArrow as the default engine,
enabling faster
loading and reading of columnar data.
So since 2.0, I think Pandas has had possible support for PyArrow, which is more of an analytics type backend than NumPy, which is more database-y, like traditional rows, like here's an entry in its internal structure,
making
it much easier to ask questions like, what's the average or the max of this aspect of the data?
What is the average sales price for these million rows is way faster in a columnar orientation because you just go write down the data as it is.
It makes it slower for row type of operations, but that's less common for data science.
It also does much, much faster reading and writing of files and all sorts of things.
So I recently spoke with Reuben Lerner about the PyArrow revolution on Talk Python not too long ago,
and that
was a lot of fun.
Basically, we talked about all the benefits of PyArrow and why you might consider it, But the news here is that this will be the default in 3.0 for Pandas.
When is that coming out?
Who knows, right?
Pandas have been around for like many, many, many years, and it's on version 2, so maybe it's going to take, what, another 15 years for version 3 to come out?
I don't know.
I think
the perception of versions is changing over, you know, we talked about zero and all this stuff, but I think versions are starting to go faster these days, right?
Django is on five and it was just on four and it's been around a long time, but it should be out pretty soon.
So we're not exactly sure on the timing. I know some people will know better than me, but
anyway.
Also may have been like that just switching out the backend is a big enough change that they decided that's a good reason to switch to a three.
Yeah, that's a very good point.
It says over time Pyro is becoming better and better integrated with Pandas, but using it as a backend is still experimental and isn't recommended in production.
Presumably until 3.0 where it becomes the default in which it would become recommended because you'd have to work around it to know better, right?
Anyway, that's my item.
Check out Pyro.
Check out the conversation I had with Reuben about it to see what's coming for Pandas.
Cool.
All right.
I wanted to talk about data science a little bit as well.
And I'm going to point to a project called Point Blank.
It's data validation made beautiful and powerful.
At least that's the sales pitch or the sub point.
Anyway, so I don't do a lot of data science, but I really think this is a cool idea.
Even without data science, any sort of pipeline stuff of checking data within your pipeline makes sense and what to do with it.
So here's the idea.
So it says it's a powerful yet elegant data validation framework for Python that transforms how you ensure data quality.
There's a chainable API that you can use to validate data against comprehensive quality checks.
And it says visualize through stunning interactive reports, which I haven't looked at the reports yet.
But anyway, so I'm just at the top example.
You've got, you import point blank, and then you have these validation features where you can take a data set and validate it.
In this example, it says, okay, on column D, there, you know, there's validate that the values are greater than 100.
There's more than 100 values there.
And then actually on column C, validate that there's less than or equal, the values are less than or equal to five.
And then there's certain columns exist.
Make sure the date and the time exist in those columns.
So you get data frames in, or data sets and data frames, and you've got to be able to make sure that they're in the right shape, the data's in the right place.
And that's awesome.
And what do you do if they don't?
Well, there's a REPL with some validation, Git tabular report.
That's great for when you're debugging stuff and looking at it.
But what about in real time?
You're not going to want to do that.
And this is something you can use in real time to check all this because it's got these cool actions.
So there's a bunch of actions as part of this where you can set up callbacks.
It's got a default one that's built in to notify you on Slack.
I don't use Slack anymore, but there's a function called one.
So if there's any failures, you can set up your own notify function, which I love this idea of just, like, give me an API to, like, fill this in, and I can fill that in with whatever I want.
I can call
it rest API.
I'm going to send myself an email or whatever.
Yeah, whatever.
I'll hook it up.
And so this idea of, like, just run this all the time, and then if there's problems with your data chain, let somebody know about it in real time.
Love that idea.
You can even log it.
Lots of stuff there.
And looks like the interface is pretty intuitive.
They've got a roadmap for additional validation methods, advanced logging capabilities, more messaging actions.
So kind of a neat project.
I love that it's set up already with a code of conduct and a governance system.
So pretty promising little project.
so that's that's
it for that i'm really i like it i like the idea of this a lot yeah
i like it too i'm not sure um it'd be fun to to to hear somebody that's used it and see um is it something that really can be used in real time to for uh does it slow things down too much i imagine not because you're gonna do a little bit of work just after you've done a lot of work in a few places validate it a few places in the pipeline to make sure everything's still kosher.
It definitely, you know,
data science has the feel a lot of times of I'm going to do a little bit of work to get things set up and I'm going to do some complex calculations on lots of data.
Yeah.
Rather than a bunch of tiny little function calls. I think here's a function, a bit of functionality I'm adding to like an API. It would be totally reasonable to say, I want that to be under 10 milliseconds for this API call. No one's going, I need my notebook to process stuff unless than 10 milliseconds.
Like if you add a little overhead, it's probably fine.
This certainly looks like it's going to be useful for unit tests as well, right?
Yeah, yep.
And checking to make sure.
Yeah, and that's the sort of thing is like, okay, you've checked all the pieces, but this is, once you put everything together, are we like losing something somewhere?
Is some part of the process filling in nulls or treating invalid data incorrectly and putting garbage in there or something?
Yeah,
it's super easy to lose pieces of data on some of these things.
How is this for a tie-in onto my first extra?
Okay.
If you're working with pollers or something, you can say, I want to do some calculations, and what you get back is a new data frame.
By default, what you get back are the columns you've asked for, like the new computer columns.
But maybe what you intended is, I want to add a column to the existing data frame, not take a data frame and transform it into a new data frame that has just the stuff you asked for.
So instead of doing an operation, you would say dot width columns,
then do the operation.
And it will keep the original data frame and then add on to it, right?
You would maybe like that these columns exist test.
Then you would be able to say, oh, we've lost some of the columns.
Who forgot the width columns?
Why would you know to do that, Brian?
Because you take our Polars for Power Users course that we just released last week.
Oh, nice.
Yeah.
So this is out.
It's by Chris Trudeau.
It's a really awesome course, Polarist for Power Users.
Three hours, almost just under three hours.
And you can go and learn a whole bunch of cool things, how to work with Polarist.
And Polarist uses PyArrow underneath the covers or Arrow underneath the covers.
So you can also get some cool experience with that.
So people, check this out.
It's been well-received and continuing to go.
All right, that's my only extra I have.
I have a joke, but you got any extras before we do that?
Oh,
I'm loaded with extras this week.
So let's load them up so there's my point blank.
I was interested, so I haven't been using Ruff.
I use Ruff a lot, but I don't tweak it very much.
I haven't, well, there's a bunch of new rules or not really new, but there's a lot of rules that you can turn on for Ruff for checking your code.
And if you look at the rules list, there's a lot of rules that you could add.
So I was interested in this discussion on Reddit about, hey, Ruff users, what are the rules you're using and what are you ignoring?
This one was amusing to me that said, I start every project and select all and ignore none.
That's not realistic because some of them conflict with each other.
So I think this was probably a joke, but I'm not sure.
I do like, so there's some serious people that said, hey, this is my set that had like PyFlakes rules and PyCode style and warnings and errors.
Seems like a decent set.
It's just kind of a fun thing to see what other people are using and maybe check out some things.
Here's somebody else that has a different way.
Instead of picking which rules they use, it's a select all but ignore certain rules that don't make sense for them.
And yeah, just kind of an interesting discussion.
Anyway, I'm not sure if I covered this one already, but this was as of May 26th.
3.26 Python 3.14.0 beta 2 is out.
So if you're testing new Python versions, make sure to keep up on the new betas that come out.
Nice.
Yeah, I don't know.
I don't think we covered it.
Okay.
And I guess sort of a, oh, I got a couple more topics.
One of them is if you happen, like just randomly wanted to switch Mastodon servers and not lose anything, not like lose anybody that might be following you already. There is a way to do it. And we'll link to an article on how to do this on Fetty Tips. And it's not, this is not a trivial action. So I guess don't do it on an empty stomach. Looks like a lot of steps, but I'm glad somebody pointed that out. Why might you? Well, there's been a little bit of drama on Fostadon lately. And I am not the expert on this but um i'm there's enough people i trust that um are migrating away from fosdon that i'm looking into it um just haven't done it yet because yeah anyway um thoughts on fosdon i have i have
noticed people who i thought followed me i got notifications yeah on macedon that they had followed me and i think that's why i think they were moving accounts yeah
yeah i got some too i'm like well i want to follow them too and i was already following them so um So if you want, and so I guess this is public service as well.
Even if you're not considering switching, if you're getting notifications from people that they're, that you, that you're like, I thought they all already followed me.
It's probably because of something around this.
The last thing I wanted to talk about is I was, I've, I've got some, I think that my Python or yeah, pythontest.com.
That's what I got. Yeah. That's my site.
I don't know if I can trust the analytics that I was using before because I think I'm getting hit hard by AI bots and stuff.
So I did update my robots.txt, but I'm also checking out a new analytics package.
I'm trying out Fathom Analytics, and I chose them because they don't collect data on anybody.
It's just which pages were hit and which pages weren't, and they are GDPR compliant.
So, yeah.
Anyway, I'm not much more of a plug than that other
than I'm trying it out.
And, yeah, we'll see.
Yeah, very cool.
That's it.
Awesome, awesome.
Yeah, I'm
still loving Umami Analytics.
Again, GDPR, even better than GDPR compliant.
Like, no cookies whatsoever.
How's that?
And we self-host it, so we don't have to – we don't share the data with anybody.
So we don't have to tell you about how we're sharing our data with people.
Because we're not sharing data with people, which I think is great.
Okay.
Effortless.
It says effortless.
I'm not sure it's effortless.
I've expended effort when the migrations don't work or whatever.
But you know what?
It's fine.
It's still good.
Better than Google Analytics.
All right.
Are you ready for something fun as well?
Yes.
I'm not sure
if I call this fun.
I think it's fun E in a sort of sympathy way.
So this joke is a cartoon called Programming Humor, from Programming Humor, called Emotional Damage.
And I think, Brian, you want to be the one, you want to act this down, you want to be the one that does the first square?
Sure. Hey, there's two people looking at a dog. Does your dog bite?
No, but it can hurt you in other ways. I don't know if I was going to say this. I'll do the dog.
The dog says, the feature you spent hours coding will not be deployed. Management finds it unnecessary.
And the person starts crying.
Does your dog bite?
No, but it can hurt you.
Yeah. Do you know what's more rough than software having that happen with you?
hardware people um i've got i remember this was decades ago but i was working with on a team and somebody got a was retiring and they were kind of roasting him during the retirement but um uh he was a fbj developer or known asic developer doing uh um custom chips and like he'd worked on like dozens of projects and only like five percent of them ever shipped most of them got canceled before the project end date. So that's rough.
Yeah, the lead time is definitely longer in hardware than it is on software, right?
Like from the time you work on it until the time it's out. Yeah,
it's in like, you know, single digits or fractional digits of years instead of weeks or months.
I definitely think about the, I'll watch documentaries about, you know, like the Cassini probe that went to Saturn it went to?
And
these people
will be like, yeah, we started that 25 years ago, and now I'm done with this project.
Moving on to the next.
It's like you get two or three projects for your life.
Crazy.
Those things better not burn up in the atmosphere on their way out.
Yeah.
Well, may the dogs that talk about unshipped features stay away from you all.
Yep.
Bye.