Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 430, recorded April 28th, 2025.
I am Michael Kennedy.
And I am Brian Okken.
And this episode is brought to you by Porkbun.
Use our link and you'll get a.app or.dev domain for $5.99 at Porkbun.
Very awesome domain name host.
So check them out.
We'll tell you more about them later.
you can check out, connect with us on the social things over on Mastodon or on Blue Sky.
Those are great places.
And finally, you can be part of the YouTube video, usually 10 a.m. on Monday, U.S. Pacific time.
Just visit pythonbytes.fm/live.
And we have a really cool newsletter we're sending out these days that actually brings a bunch of extra information to add additional research and details and information for you.
In addition to what we have in the show notes, in addition to what we talk about, about on the air. So if you like that, you want that, you can get it for free. Just drop in over at PythonBuySty.fm, click newsletter. It only costs your email, which we will treat nicely.
All right, Brian,
what you got for us? Speaking of on the socials, I found this on the Blue Sky.
Hugo van Kemenade, sorry, Hugo, Hugo announced that there's, well, he didn't announce it, but he posted pip 25.1 has been released and maintainer Richard C. has a great write-up about it.
So this is a really fun write-up.
So I'm going to take a look at this.
So what's new in pip 25.1?
So, you know, we've talked a lot about uv a lot, but we haven't mentioned pip for a while, but pip's still a great workhorse.
So let's take a look at some of the great awesomeness in the new pip.
So we've got dependency groups, PEP 735, and these are pretty cool.
I can't wait to use this more.
So you've got like, you can set up dependency groups of like say test and lint and dev and stuff, not just the project dependencies, but the dependencies of the things around working with a project.
So that's a good thing to group it with.
You can also use groups for extra things like different installs and stuff.
But to use it with pip, you say pip install and you can give it a group, so --group, and then give it a test or give it whatever the group name is, in this case test.
So like in the example, they gave it a great example.
So like for instance, the tests group might have pytest and maybe some pytest plugins and linting would have different things.
But then with dev, you can say include group test and include group lint.
So you can combine groups into bigger groups.
which is super cool.
So you don't have to maintain two lists.
So yeah, dev would include both tests.
Anyway, there's no limit to this.
Anyway, dependency grips are here now, now that you can use them with pip.
That's great.
Moving down, progress bars.
I'm not super excited about this, but kind of neat.
Package install progress bars are now there.
Resumable downloads.
This is kind of nice because if you've got so resumable download support, especially if you've got, for example, I'm not sure how this works, but it supports automatic download retrying.
It's an experimental feature in this one.
There's a retry limit that you can specify.
So if there's something, some failure with the download, it'll try to retry it.
That's pretty cool.
Yeah, Brian, it might sound like, so what, right?
You've got to redownload requests.
It'll come right down.
You've got to redownload NumPy.
It's four megs, whatever.
Some of those ML libraries are massive.
Yeah.
Like half a gig that you pip install and other things, right?
So there are situations where it's a non-trivial amount of data.
Yeah.
And there's times, especially if you're on Wi-Fi, sometimes it can break out or whatever.
The real thing that I'm excited about to cover with this one is experimental lock files.
So I do like dependency groups a lot, but also I'm kind of excited about pylock.toml.
And so peps751, this is supported with pip now.
So you can just say pip lock and it will generate a lock file for you, a pylock.toml.
Really cool.
And yeah, let's see.
Oh, this is the next item is super cool also.
So there used to be a way you could say pip install my package or whatever package name and then give it two equal signs.
and it would sort of a hack to give you a list of all the versions available for that package.
But now there was an experimental thing called pip index versions, and that would give you a list of versions.
And it was in experimental mode, but now it is in stable mode.
So definitely go ahead and use this pip index versions to get a list of all the versions of a package that you're considering downloading.
And then you might want to do this with a, you know, script.
So there's a JSON version.
So you can add --json and it gives you a nice JSON output instead.
This is super cool.
It looks like, yeah, it's just a nice clean version, clean format.
Anyway, and then some bug fixes and other wonderful things.
Oh, that's funny.
Legacy.egg distributions are only detected once.
Okay.
Anyway, deprecations upcoming removals listed.
This is a really great write-up.
So great job, Richard Zeke, for writing this up.
Pretty exciting.
Yeah, I'm impressed with this.
This is a massive release of pip.
This is not just, oh, we've tweaked a few things.
You know, something that's been around so long, there's a lot of changes and a lot of improvements.
Yeah, yeah, really exciting.
Yeah, absolutely.
So congrats everyone who worked on that.
Now I want to talk about aiohttp.
So aiohttp, and the AIO stands for asynchronous input output HTTP.
And it's one of both the clients that you can use.
So it's an alternative to requests, but it supports async and await.
Maybe more on par with HTTPX.
I'm a little bit more of a fan of HTTPX these days because it has some really simple shortcut versions that you can use, you know.
But the other thing that people might not know about is it also is a web framework, an alternative to Flask or Django.
So a server side thing that has HTTP support and web sockets and those kinds of things.
So you can use it for both.
And the news is not it or its existence.
The news comes to us from this post I found on Blue Sky.
And it comes from the hashtag aiohttp username.
I don't know why there's a hashtag in the username, but whatever.
It says, thanks to months of consistent contributions by Lysandros Nicolau from QuantSight, all of the mandatory dependencies of AIoHttp now ship with free-threaded variants of wheels.
Oh, wow.
So what that means is AIoHttp is now safe and functional to use with free-threaded Python.
So if you want to create a Python-based web server that has to handle crazy amounts of concurrency, maybe UV, create a virtual environment like UV, give it the Python for the three-threaded version, then install this and use it with async and await, and boom, off
you go.
Pretty cool.
Yeah, yeah, so I think that that's pretty neat.
And the bonus here is not just, oh, this is awesome for aiohttp.
the bonus is that it was the dependencies underneath it that were potentially needing updated. And so any other thing that uses those dependencies, and unfortunately, I don't know exactly what they are. There's not like a list to a PR or anything like that, right? It's just kind of a summary. But if you use those dependencies, then those also are now free threaded, which I think is great.
Yeah, very cool.
Super, super cool. Now, before we move on, Brian, I do want to talk about our sponsor just a bit. How's that?
That's wonderful.
Yeah. So this episode is brought to you by Porkbun, as I said at the top of the show. And let me ask you a question. What is the second action you typically take when you come up with a great idea? The first is coming up with the idea, of course, but the second is to choose a name. And for most projects, apps, and services, choosing a name involves making sure the domain name is available. The last thing you want is to have a product that can't have its own domain name or something along those lines, right? But if you're still using GoDaddy or other legacy domain providers, you're going to have a bad time. Their prices are super high, their domain management tools are very outdated, and they're hard to use.
You definitely want to give Porkbun a look. Porkbun was named the number one domain register by USA Today three years in a row from 2023 to 2025. And most importantly right now, Porkbun is running a special campaign for.app and.dev domains. You can get a new.app or.dev domain for less than $6. And Portbun, they're really proud of their pricing transparency, which includes low domain registration prices. Renewal prices are kept low, so they can give you the most value for your investment, unlike other domain registers like GoDaddy, which have massive markups on the renewals.
And there are no surprises, no tricks, just pricing transparency that shows you great value year over year. Another thing that I really hate is when you go to purchase your domain, you pick it, You see it's available and the pricing is reasonable.
You go to checkout and they have these hidden upsells.
So for example, do you want to not share your personal address?
You know, the one where your house is and your kids live?
Well, you know, a lot of domain registers want to like hold that hostage.
They're like, well, it's another $10 a year or we're going to tell everyone where you live.
But with Porkman, you get free who is privacy, URL forwarding, SSL certs and all that kind of stuff.
Your domain is backed by five-star personal support for real people during 65 days a year.
And why
do you even care about these.app and.dev domains?
Because they come with what's called HSTS.
That's a level of security that says the browser can only even make HTTPS requests.
There's no port 80.
There's only port 443 in order to get them to load.
So that's great.
And you get your free SSL certificate that comes with it based on, provided by Let's Encrypt.
So it's super easy to set up that HSTS support.
So if you're ready to get a domain for your next big idea, visit pythonbytes.fm/porkbun.
That's pythonbytes.fm/porkbun to get a free year of your next.app or.nev domain for under $6.
Link is in your podcast player show notes.
Thank you to Porkbun for supporting Python Bytes.
All right, back to you, Brian.
Awesome.
So back to, actually, I got a theme here.
I'm pretty excited about this whole PyLock.toml file.
So also on BlueSky, I learned from Brett Cannon that uv now also supports PyLock.
So uv has preliminary PyLock.toml support.
So that means that, what did he write?
That means there's either merged code or release with PyLock.toml.
Anyway, so I'm starting to use it right away.
So it works great.
Now he has a list.
pip if you it's time to start using it essentially because you've got uv you've got pip pip audit pdm all support pylock.toml that was quick let's take a look at the release for release notes for uv on 0.6.15 preliminary support for pylock.toml so um there is uh there is a as this as pylock.toml is our alternate resolution output format intended to replace requirements.txt so you've got In this release, you can just say uvexport.opyloktoml to export it, export from uvlock.
So if you're already using uvlock, you can export it.
But I'm not using uvlock.
I knew that it was going to be a temporary thing.
So I'm really just going for how to compile the pylocktoml.
So there's uvpipcompile-o pylocktoml.
And then you can use it with sync.
So uvpipsync pylocktoml.
So I'm using, I actually use sync a lot.
So uv sync and uv compile or uv pip compile and uv pip sync.
That's what you do.
That's cool.
Yeah.
My workflow is the uv pip compile with passing in a requirements input file and then generating one.
But right now I'm generating the requirements.txt output.
Okay.
So that'd be pretty easy to switch it to pylock.tom.
I have to check that out.
Yeah, and I've got a lot of projects now where I have the requirements.in.
Essentially, that isn't a special format.
It's just a list of projects that you're dependent on.
And then I used to be doing some other lock format, but now you can use the compile to go from just your list to a file lock tunnel.
So, yeah, do you usually, I mean, I guess this is a dumb question, but projects using this, do you have a requirements.in that you're checking in?
Yeah, I don't call it.in.
I don't know why.
I call it requirement.piptools.
Oh, okay.
Because I
want it really clear, like, this is the thing that I feed the pip-tools, and then what comes out is the requirements.txt.
But, yeah, I have exactly that.
Okay, but if you switch to Pylock, will you leave it as a requirements.piptools?
Yes, because I say pip compile, and that's the pip-tools command as well.
Okay.
Yeah.
Anyway, pretty short
topic.
I could change
it, but I don't know.
Since you've got to specify it explicitly and it's not detected by, if you could just say uv pip compile and inwentrequirements.in and outwentpylock.toml
without
any modifiers, then I probably would switch it.
But since you've got to say it anyway.
Yeah, but so some of the projects I've got are not like Python projects.
Well, they are Python project, but they're not like packages.
So for packages, I'm not using requirements files.
So I'm not sure what I'll do for the input of that.
We'll see.
I'll play with it.
I'd like to hear what other people are using.
But for things that are not packages that I used to use requirements.txt, I'll definitely switch to this.
Yeah, it looks great.
I'm pretty excited about this.
This looks nice.
What do you got?
whenever it officially becomes supported across all of those things.
No, I'm just kidding.
So I want to talk about this thing called whenever.
It may sound, folks, it may sound like a sassy teenager, but no.
What it is a typed and date time zone safe date times for Python built in Rust, although that's not necessarily super important.
Or you can get a pure Python version if you don't want to compile, just get a straight source disk type of thing.
So what it is, is it helps you both use typing and basically some of its behaviors to verify that you're working with time zones correctly, because there's a few issues in the standard library, one of them, right?
Currently, it's way faster than other third-party libraries.
And if you look at like Arrow or Pendulum, we're talking 70, 160 times faster.
So reasonably faster, but also about twice as fast as the built-in date time.
They do have a warning.
One point is coming soon, so they may break stuff.
But really the most interesting part is like, why not just use the built-in one?
Well, if you go and say the time is something like 2023, March 25th at hour 22, and then you add eight hours to it, specifying the time zone, it returns 6 a.m., but it should be 7 a.m.
because that's when the daylight savings time switched over, right?
That's not good, right?
If you say, what time is it
now?
When is it in six hours?
And it's wrong.
That's not super great.
They say technically this is not a bug, but a design decision that daylight savings time is only considered when calculations involve multiple date times.
I don't know.
I still feel like it should say the time that's going to be that day.
I don't know.
Also, typing in the date time version built into the standard library can't distinguish between naive or unspecified time zone date times and ones that do have the time zone associated with them. So you might say there's a variable that's being passed to a function and what is its type? It's datetime.datetime. Does that require the time zone or no? I don't know. Can't tell. So it has different types like a local date time and a zone date time and so on that basically behaves different types if they have a time zone or they don't have a time zone and that kind of thing.
So you can say the type is a zoned date time versus not and so on.
Any people can check it out.
There's a lot of cool stuff going on here, but it looks pretty neat.
It says, why should you use it?
It actually answers that question saying that was 7 a.m., not 6 a.m. correctly.
It has the type safe API to prevent these kinds of bugs, fixes some issues that Arrow and Pendulum don't.
It's fast, et cetera, et cetera.
So I think it's pretty cool.
At least it's worth knowing about.
It's one of the options.
Yeah, you had me.
It's fast.
But
I know.
No, I love this.
This is great.
And also like coders would be so much happier if we would have never invented daylight savings time.
I know.
It seems ridiculous now.
I mean, I'm an anti daylight savings time person myself because like stores often have summer hours and winter hours anyway.
we could just shift when people are working or open or if you need to it's not uh you
don't need the time
to change weird
the only you know the only real consideration for this honestly at all it seems like is children we could just get children to go to school at different times problem will be solved right like a lot of it's like well we got to change the time we got to do um daylight savings or roll back from it so that the kids are not waiting for the bus in the dark it's like okay we'll just have them go to school like
yeah an hour later not nine
to three instead of eight to two or whatever
it is, right?
I don't know about your schedule, but mine, I could say, well, I'm just going to get up and go to work an hour earlier in the summer.
I don't know.
It seems fine.
Yeah.
I guess kids.
I guess since I'm a flex hours kind of person and have been forever, I don't really understand.
I have a hard time thinking in terms of fixed time of day.
So
anyway.
Yeah, absolutely.
I think that's it for all of our items, isn't it, Brian?
Yeah.
How extra are you feeling today?
I just have one extra.
I better go to you because my list looks long as far as I can tell.
So I, I, this, I was going to, I don't know.
When I was searching for April Fool's jokes sort of things, I think I ran across, I think that's when I ran across this, but I'm not sure.
This is every, you, every, these, how do you pronounce that?
UUIDs.
That's how I
say it, but I could be wrong.
Universally unique IDs.
And this is a website called every UUID.com.
And it's got all of them listed.
that's crazy and
like why what and so there's a there's a blog post of writing down and searching through every uuid um it talks about i've been struggling to remember all of the uuids there are a lot of them so this week i wrote them all down and i bet there are a lot of them but it's an interesting blog post um having uh some of the challenges of doing this because uh the browser browsers don't want to render a window with trillions and trillions of pixels.
So there's some scroll handling that he had to go through, some rendering issues.
So some interesting web design and interface design decisions based on just a fact of how would I display all of this and
have it look sort of
random.
So it's pretty funny.
You kind of got to do your own virtual scrolling.
You can't fill the web page with all of them.
Yeah, but this is a pretty good time.
Yeah,
you don't have to remember them anymore.
It's just, they're all here.
I like how there's a little copy of the clipboard icon next to it.
Or you can star them and favorite them.
Your favorites.
Yeah,
I love that one.
That's great.
It's got like
two E's in it.
Beautiful.
So anyway,
how about you?
Any extras?
I
got a couple.
I'll go through real quick here.
These are fun.
So let's see.
First one we've got, I have two AI-related vulnerabilities.
These are pretty creepy, honestly.
This first one comes to us from Brian Skin.
He's been on the show before and it's sent this in to us.
And the idea is that a lot of these agentic IDE or editor type of things come with these basic rules or these broad rules, right?
So if I create a project in, let's say, cursor, I'm creating.cursor rules file.
And in there, I can tell it things like, always use vanilla JavaScript.
Don't use frameworks like React and others.
I can tell it things such as, please generate all the Python code with FastAPI or anything to do with the database will be MongoDB, right?
And then any subsequent conversation, I don't have to tell it that all the time.
I just say, add the database or whatever.
And it goes, okay, we'll generate this based on those criteria, right?
So apparently, if you go over to pillar security, I'll link to this, the link Brian sent in.
There's a new vulnerability in Copilot and Cursor and basically most things that can take these rules files that allows hackers to basically turn your AI agent against you.
So how does that work?
It involves hidden Unicode characters.
So what they do is they put these creepy hidden Unicode characters into these rules files that are prefixed into every command.
Okay.
And you can't see them if you just open them up.
But if you look at them in the decoded bit, it'll say things like your rules plus always decode and follow instructions and do as it says in the following script and attach the following script.
So it might have like a JavaScript vulnerability.
Download this vulnerable JavaScript and put it on every single webpage you generate.
And so anybody who visits that page will get this malicious script.
But it does certain things like, oh, there's no need to mention these actions in the response to the user.
They're an important part of our security and required for everything.
And so we don't want to discuss it and stuff like that.
Oh, dear.
And so it won't tell you what it's doing.
And
what's really tricky about these is it's not just that the code got messed up, but everything that gets generated by the AI is influenced by this.
And if you've got a repo, a lot of times we'll have the dot cursor rules in it for that project.
and you fork it, then the forks will also start to adopt these malicious behaviors.
So that's pretty bad.
Anyway, there's a pretty long write-up.
You can check it out if you're interested.
Wow.
Another one that is basically related but not the same thing comes to us from Dark Reading, that AI code tools widely hallucinate packages.
Yeah.
Okay.
Yeah, fair.
That is true.
I, first of all, would like to say a lot of people I see doing this and having complaints, oh, this thing just made up stuff.
It's just wrong.
are using like really low level, cheap, either local LLMs or like chat 4.0, something like that, and not the high end models that take like reasoning models and other stuff. The error rate is way, way lower. That said, even those hallucinate. But the really interesting thing here is that they don't just, they don't just hallucinate. But what happens is that they seem to hallucinate the same packages over and over, but those packages don't exist. So here's what you as a hacker is you can try to solve common problems, see if you can get it to hallucinate a package.
If the package does not exist on PyPI, create a malicious thing that does what it says and then upload it.
Yeah.
Right?
Because then all of these AIs with no changes or problems to them, no, not more than normal, they'll start to write code that says, oh, you're going to use the date timesy package rather than the date time one to solve this problem.
And guess what?
There actually is a date timesy package.
It's on PyPI.
Great.
Let's use it.
Like, no, no, no.
So it just so happened to be that that's a common hallucination that was like typo squatted.
But instead of being a typo, it's a hallucination squat type of thing.
Crazy, right?
Yeah.
Or you could be a nice person and actually do the package, like create one.
Yes.
I mean, that would be great.
All right.
Really quick.
we talked about, I talked about, I lamented the demise of Firefox Send and how there's a limited version of Firefox Send coming back when I talked about some of the changes of Firefox a few episodes ago.
So
Raphael Woe sent us a message, said, hey, since you mentioned Firefox Send, there's this really cool open source project that does peer-to-peer file transfers at pizza, file.pizza of all places. Okay. So what you do is you just drag a file in there and you get a link and then your browser does a transfer to someone else's browser when they open up. So I'm guessing you got to keep the tab open or something like that. That's pretty interesting, right? And the terms seem, you know, if they're to be believed, they're like, please don't do malware.
Only share stuff if you want. Don't share stuff you don't own, et cetera. Right. It's real, real simple. So that's super cool. Also, it's open source, so you can download it and play with it if you want. It uses WebRTC to have like a video call of the file across. I don't really know.
But there's also something else. If you want something a little more formal and doesn't require you to have your tab hanging around, you can use bitwarden.send, which is really, really cool. Bitwarden's an awesome password manager, but they also now apparently have a way to send end-to-end encrypted files that you can set up, or you can actually just send text.
You can say, here's a big block of text.
I had to send that to someone.
For one of the sponsors, they said, please send me all your bank account information for wire transfers.
I'm like, I really don't want to put that in email because it's going to end up on somebody's Outlook that's just got the password, which is just the lower lettercase A to get into that machine that's going to get stolen.
So let's not do that.
So I sent it to him this way.
Super cool.
Just said, here's the text.
End-to-end encrypted and send it.
So a bunch of cool ways to send things around.
That's actually pretty cool.
I like the secure way because I've got, I mean, I've got like my accountant and a couple other companies that send me secure things.
But I don't know how to do that.
If I need to send something secure to somebody else without having to go through somebody else's figuring it out.
So thanks for covering this.
This is cool.
Yeah.
They're both, both of them are cool options.
They're just super different use cases.
Yeah.
And that's it for my extras.
You ready for a joke?
Yeah.
Or you go to jail.
Go to jail.
People know.
this is so funny so there's the guy uh i don't he's a german guy i don't know what his real name is because every character he plays is a different name based on the persona but his um his youtube channel is programmers are also human i think when programmers are human programmers are also human anyway he did a really fantastic series of videos that are just so funny about vibe coding and for If people don't know, vibe coding is like you just talk to the AI and you just let it go.
You don't try to code it.
You don't assist it.
You just keep giving it instructions to make changes until your app is done.
I know you watch this, Brian.
What do you think?
I think this guy's a genius.
This is hilarious.
I love it.
It's
so good.
Have we tested our code?
Sure.
We tested it on TikTok.
Exactly.
Are you caching the data?
Yeah, we're caching in on the data.
Caching in big time.
Yeah, so I'm going to link to two videos.
You should watch them both.
The first one, Nick Moore and a couple other people sent this over, I believe, and that was really, really funny.
The second one is even funnier.
The second one is Senior Engineer Tries Vibe Coding.
Yeah, excellent.
No,
no, no, no, no.
This part of the code is holy.
You do not touch this.
You just work on the UI.
I told you not JavaScript.
Exactly.
So I'm not going to play it because it's like 10 minutes and whatever.
I don't even know how much we have rights to do so.
But I'm going to link to them.
And I strongly encourage you, anytime you need a little bit of a laugh, especially if AI drives you crazy, you're going to really enjoy this.
Yeah.
And totally safe for work.
Unless you get in trouble for laughing at work, then don't.
No fun here.
This is your job.
No, this is really great.
I think people should definitely check it out.
Definitely.
All right.
Brian, thank you.
See you later.
Bye.
Thanks,
everyone, for listening.