TRANSCRIPT 🔗
WEBVTT
00:00:00.020 --> 00:00:04.020
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly
00:00:04.390 --> 00:00:04.860
to your earbuds.
00:00:05.240 --> 00:00:07.020
This is episode 504,
00:00:07.180 --> 00:00:08.800
recorded Monday,
00:00:09.420 --> 00:00:10.040
November 9th,
00:00:10.420 --> 00:00:10.740
2026.
00:00:10.920 --> 00:00:11.460
I'm Michael Kennedy.
00:00:11.780 --> 00:00:12.900
And I'm Calvin Hendrix-Parker.
00:00:13.130 --> 00:00:15.900
And this episode is brought to you by Longlink.
00:00:16.139 --> 00:00:18.920
They're a really awesome platform for building
00:00:19.280 --> 00:00:23.360
business applications on top of things like FastAPI and Python.
00:00:23.530 --> 00:00:24.640
So I'm really excited to
00:00:24.520 --> 00:00:25.740
tell you more about them later.
00:00:26.240 --> 00:00:26.800
Connect with us,
00:00:27.360 --> 00:00:28.160
Mastodon, Bluesky,
00:00:28.740 --> 00:00:28.820
X,
00:00:29.060 --> 00:00:29.220
LinkedIn,
00:00:29.510 --> 00:00:29.980
all the things,
00:00:30.050 --> 00:00:30.900
all that stuff's at the top.
00:00:31.360 --> 00:00:33.080
And we've got this great newsletter,
00:00:33.340 --> 00:00:34.620
really fun stuff that we share
00:00:34.670 --> 00:00:37.880
with people every week, almost every week, almost every week,
00:00:38.340 --> 00:00:40.540
and sign up for it and you'll get it
00:00:40.620 --> 00:00:41.620
as well. You'll enjoy it, I'm sure.
00:00:42.020 --> 00:00:43.400
So with that,
00:00:44.340 --> 00:00:46.060
feeling like some things could use, I don't know,
00:00:46.090 --> 00:00:47.360
some redesigns. What do you think?
00:00:47.520 --> 00:00:51.020
How about a new view on life? A new view on life. Okay.
00:00:51.080 --> 00:00:51.180
Yeah,
00:00:51.650 --> 00:00:53.640
how about a new view for PyPI?
00:00:54.040 --> 00:00:55.120
Oh, I'm here for that,
00:00:55.320 --> 00:00:55.880
yes, let's do it.
00:00:55.940 --> 00:00:56.320
I am too.
00:00:57.140 --> 00:00:59.320
That's kind of critical to a lot of things we do.
00:00:59.840 --> 00:01:03.200
So PyPI has redesigned the project pages,
00:01:04.140 --> 00:01:06.320
which is pretty nice because it now warns
00:01:06.420 --> 00:01:07.540
when there's provenance changes.
00:01:08.110 --> 00:01:08.900
So LiveNow,
00:01:09.370 --> 00:01:10.600
I think as of like three days ago,
00:01:11.040 --> 00:01:11.820
at least they announced it,
00:01:12.650 --> 00:01:14.660
that they were basically doing some user research
00:01:14.840 --> 00:01:15.700
that they talked about in July.
00:01:16.340 --> 00:01:19.120
This was funded by OpenSSF
00:01:19.140 --> 00:01:21.380
and built by the Kabu Creative,
00:01:21.980 --> 00:01:24.700
there is a new security tab on every project page,
00:01:25.080 --> 00:01:26.200
which is gonna show the releases,
00:01:27.020 --> 00:01:30.340
provenance state and per file attestations.
00:01:30.680 --> 00:01:32.140
So actually I'll scroll down and through here.
00:01:32.620 --> 00:01:33.780
There's this new security tab.
00:01:33.780 --> 00:01:35.820
So if you go to PyPI today
00:01:36.480 --> 00:01:37.800
and look at any project that's up there,
00:01:37.920 --> 00:01:39.900
you'll see a new security tab.
00:01:40.780 --> 00:01:43.900
I think you'll see a sense of some of the theme
00:01:44.160 --> 00:01:48.280
of my updates lately have been very much supply chain
00:01:48.300 --> 00:01:50.760
and attack vector related.
00:01:50.900 --> 00:01:52.780
And so this is in response to a lot of that as well.
00:01:53.720 --> 00:01:55.960
You get basically two attestation types.
00:01:56.060 --> 00:01:59.040
There is the on the PyPI publish one,
00:01:59.180 --> 00:02:01.560
which is basically uploaded by a trusted publisher.
00:02:01.780 --> 00:02:03.200
So there's a trusted publisher plan
00:02:03.340 --> 00:02:05.740
or program that you can sign up for.
00:02:06.080 --> 00:02:09.780
And then there is the SLSA build provenance,
00:02:09.880 --> 00:02:11.480
which ties into a files commit,
00:02:11.800 --> 00:02:13.760
the build platform and the instructions.
00:02:14.040 --> 00:02:15.960
So there's two different kinds of provenance
00:02:16.500 --> 00:02:17.000
that's up there.
00:02:17.480 --> 00:02:18.060
So you can see here,
00:02:18.220 --> 00:02:20.440
there's the PI PI trusted publisher
00:02:21.200 --> 00:02:21.800
at the station.
00:02:22.660 --> 00:02:24.760
You're gonna see this for any project that has done
00:02:24.980 --> 00:02:26.660
any of the digital attestations to date.
00:02:26.860 --> 00:02:30.500
So projects like, for example, I pulled up SQLAlchemy.
00:02:30.920 --> 00:02:33.340
SQLAlchemy has a security tab now,
00:02:33.840 --> 00:02:34.360
well, all of them do.
00:02:34.740 --> 00:02:37.160
And you'll see that the last 72 files in this release
00:02:37.210 --> 00:02:39.280
have been uploaded with Providence metadata.
00:02:39.680 --> 00:02:42.540
So all these releases here have that metadata.
00:02:43.220 --> 00:02:46.279
So obviously the crew over there on SQLAlchemy
00:02:46.300 --> 00:02:50.580
ahead of the game and we're publishing these before they were really visible to end users.
00:02:50.670 --> 00:02:56.660
So this solves that problem of making these attestations visible to folks in the community.
00:02:57.120 --> 00:03:03.560
There's also the SLSA style. So you'll see this orange icons which give you the identity,
00:03:03.980 --> 00:03:04.360
the build,
00:03:04.660 --> 00:03:05.200
the commit,
00:03:05.840 --> 00:03:06.780
the hash,
00:03:07.230 --> 00:03:09.879
and all the pieces that basically tie this directly back into
00:03:10.560 --> 00:03:11.400
the CI pipeline.
00:03:11.900 --> 00:03:16.100
There's also in addition to the there's warnings now you'll see.
00:03:16.500 --> 00:03:17.020
So there's like
00:03:17.100 --> 00:03:22.300
a no providence is not necessarily a malware flag. It just means that the file's origins couldn't be
00:03:22.440 --> 00:03:23.460
cryptographically
Load full transcript
verified.
00:03:24.240 --> 00:03:26.860
That's typical for older releases and things not using trusted
00:03:27.020 --> 00:03:30.060
publishing. So don't take that as a necessarily a bad sign.
00:03:30.480 --> 00:03:33.300
But there are four new providence warnings
00:03:33.920 --> 00:03:35.020
down here for incomplete,
00:03:35.420 --> 00:03:36.280
inconsistent,
00:03:36.900 --> 00:03:39.120
and change or loss of providence.
00:03:39.600 --> 00:03:40.420
And those are all described
00:03:40.440 --> 00:03:42.180
here in that release specifically.
00:03:42.860 --> 00:03:45.840
But you'll see here now you'll get a warning at the top of that
00:03:46.740 --> 00:03:50.140
PyPI product page for incomplete providence, for example,
00:03:50.340 --> 00:03:51.520
with an explanation. Like, for example,
00:03:51.620 --> 00:03:55.080
two of the five files were uploaded without the providence metadata,
00:03:55.660 --> 00:03:56.920
which could be signals that
00:03:56.920 --> 00:03:59.020
you may encounter a supply chain attack.
00:03:59.260 --> 00:04:01.860
But I don't think it should be the end-all be-all
00:04:03.240 --> 00:04:06.960
definitive answer. You have to obviously go do your own search on that.
00:04:07.320 --> 00:04:08.500
These are meant to catch
00:04:08.520 --> 00:04:10.900
files that may not have come from maintainers,
00:04:11.140 --> 00:04:13.400
such as after an account or publishing workflow
00:04:13.760 --> 00:04:14.060
takeover.
00:04:14.360 --> 00:04:19.400
PyPI says a change of providence can also indicate a compromised pipeline or the account
00:04:19.519 --> 00:04:25.360
takeover or an unexpected loss of providence should be treated with skepticism until verified.
00:04:25.840 --> 00:04:29.760
And so I think that's the state of most security folks who are in the community,
00:04:31.340 --> 00:04:33.020
treat everything with skepticism until verified.
00:04:33.460 --> 00:04:35.720
The warnings will sit on top of the page until
00:04:35.940 --> 00:04:37.280
it is yanked, for example,
00:04:37.580 --> 00:04:39.120
archived or with pre-release banners,
00:04:39.700 --> 00:04:41.000
the quarantine banner
00:04:41.280 --> 00:04:44.180
overrides all of them. So that's kind of the top one you'll see on there.
00:04:44.680 --> 00:04:45.940
You also notice that the
00:04:46.060 --> 00:04:50.700
redesigned product detail page has some new niceties other than the providence bit.
00:04:51.040 --> 00:04:51.600
But probably the
00:04:51.600 --> 00:04:57.200
more interesting one is the file release files and release history will now clearly state or clearly
00:04:57.380 --> 00:05:00.800
show when there's things that are pre-release or release that has been yanked.
00:05:01.180 --> 00:05:01.820
That's always a big
00:05:01.960 --> 00:05:05.700
question for me when I'm looking at like trying to figure out why maybe a build failed or why I
00:05:05.720 --> 00:05:06.080
find something.
00:05:06.620 --> 00:05:08.680
So now you can actually see that there's a yanked reason,
00:05:09.400 --> 00:05:10.400
you know, set up blunder,
00:05:10.700 --> 00:05:12.860
breaking some bind gen code paths, for example,
00:05:13.040 --> 00:05:14.560
in the one that's in their blog post.
00:05:14.920 --> 00:05:15.240
But I think
00:05:15.300 --> 00:05:20.880
this is really great to highlight or bring to the, you know, the top of the stack when there's
00:05:21.260 --> 00:05:23.280
potential problems with the dependency packages in there.
00:05:23.640 --> 00:05:24.680
Mike, what do you think of the redesign?
00:05:25.040 --> 00:05:25.620
I like it.
00:05:25.800 --> 00:05:26.180
I mean,
00:05:26.540 --> 00:05:27.360
it's pretty familiar.
00:05:27.640 --> 00:05:28.640
There's not a whole lot of change,
00:05:28.820 --> 00:05:29.360
but functionally,
00:05:29.820 --> 00:05:31.900
I think it's a very important change,
00:05:32.220 --> 00:05:33.900
right? I think we've had trusted publishing,
00:05:34.340 --> 00:05:34.480
but.
00:05:34.820 --> 00:05:36.020
It just wasn't very visible.
00:05:36.340 --> 00:05:37.980
Like you had to kind of know this,
00:05:38.000 --> 00:05:42.200
this puts it a little more into the direct line of sight for everyday users
00:05:42.620 --> 00:05:44.020
or everyday developers who are,
00:05:44.400 --> 00:05:44.560
you know,
00:05:44.980 --> 00:05:46.320
maybe not as critical as they should be.
00:05:46.600 --> 00:05:46.800
Yeah.
00:05:47.100 --> 00:05:48.880
Scroll into the partial provenance,
00:05:49.280 --> 00:05:50.820
the one with the reddish orange bar.
00:05:50.960 --> 00:05:51.180
Yeah.
00:05:51.320 --> 00:05:51.380
Yeah.
00:05:51.420 --> 00:05:51.840
Here we go.
00:05:52.800 --> 00:05:53.360
There you go.
00:05:53.700 --> 00:05:53.940
This one.
00:05:54.160 --> 00:05:58.920
As a person who did Python stuff on the web back in the day,
00:05:59.320 --> 00:06:01.740
how about that pyramid debug toolbar in the screenshot?
00:06:01.980 --> 00:06:02.340
Come on now.
00:06:03.720 --> 00:06:05.000
That was a good catch.
00:06:05.510 --> 00:06:07.140
Right over here at the Pyramid Debug Bar.
00:06:07.620 --> 00:06:07.980
Yeah.
00:06:08.420 --> 00:06:10.160
Clicking it will do nothing because it's an image, but still.
00:06:10.540 --> 00:06:10.820
Right.
00:06:12.360 --> 00:06:16.260
Obviously, they made the screenshots from a pre-release version of Warehouse.
00:06:16.700 --> 00:06:17.240
Yeah, that's cool.
00:06:17.390 --> 00:06:18.260
I don't know if this is out.
00:06:18.300 --> 00:06:18.840
Is this out yet?
00:06:18.950 --> 00:06:19.280
Do you know?
00:06:19.440 --> 00:06:19.840
This is out.
00:06:20.020 --> 00:06:20.600
This is live.
00:06:22.560 --> 00:06:24.800
The screen I showed from SQLAlchemy was real.
00:06:25.240 --> 00:06:29.640
I went through and had to search a couple of projects before I found one that had full
00:06:29.940 --> 00:06:31.860
provenance or were using the digital attestations.
00:06:32.340 --> 00:06:34.000
A lot of common projects aren't yet.
00:06:34.100 --> 00:06:35.320
So for example, I searched for Django.
00:06:35.960 --> 00:06:36.440
It was not,
00:06:36.600 --> 00:06:39.020
the Django project's not currently using digital adaptations,
00:06:39.980 --> 00:06:40.620
but boy, it should.
00:06:41.060 --> 00:06:43.580
And hopefully this highlights that for package maintainers.
00:06:44.050 --> 00:06:45.180
So they start doing this.
00:06:45.580 --> 00:06:46.860
Yeah, it makes a lot of sense.
00:06:47.160 --> 00:06:50.560
And you're making me realize I should probably do it for one of my projects I'm just about to talk about.
00:06:50.650 --> 00:06:51.400
So let's talk about it.
00:06:51.780 --> 00:06:52.660
All right, Michael, get on it.
00:06:53.260 --> 00:06:53.600
So I,
00:06:54.200 --> 00:06:54.720
was it last week,
00:06:54.960 --> 00:06:57.620
week before I introduced my chameleon-rs.
00:06:57.690 --> 00:06:58.760
I think that was two weeks ago.
00:06:59.060 --> 00:06:59.260
project,
00:06:59.780 --> 00:07:01.700
which is the chameleon, speaking of pyramid,
00:07:02.160 --> 00:07:04.180
the chameleon template language rebuilt
00:07:04.320 --> 00:07:07.040
for free threading and faster in Rust,
00:07:07.580 --> 00:07:08.460
all these kinds of things, right?
00:07:08.820 --> 00:07:09.580
And that is,
00:07:09.860 --> 00:07:10.320
maybe I hinted
00:07:10.320 --> 00:07:16.600
at this. This is just, that was just the first deposit in a bigger goal that I have to make free
00:07:16.720 --> 00:07:17.800
threading better for Python.
00:07:18.320 --> 00:07:18.760
And I've,
00:07:19.140 --> 00:07:20.100
it's been out for two years,
00:07:20.640 --> 00:07:21.560
two years.
00:07:21.900 --> 00:07:22.640
How many projects
00:07:22.980 --> 00:07:23.360
support it?
00:07:23.700 --> 00:07:24.600
Almost none. It's really,
00:07:24.960 --> 00:07:26.960
I think, honestly, it's a little bit disheartening for me.
00:07:27.020 --> 00:07:29.100
I don't know how you feel about this, but I'm sitting here with,
00:07:29.340 --> 00:07:30.560
you know, 18 cores on my
00:07:30.680 --> 00:07:30.760
machine.
00:07:31.400 --> 00:07:34.060
I get like 5% use out of them on my projects.
00:07:34.400 --> 00:07:35.060
And it's just like,
00:07:35.340 --> 00:07:36.340
I get it. It's new
00:07:36.780 --> 00:07:37.260
last year.
00:07:37.680 --> 00:07:38.380
You know what I mean?
00:07:38.540 --> 00:07:38.720
Right.
00:07:38.920 --> 00:07:41.600
But it's like, okay, we're, we're into the third release,
00:07:42.020 --> 00:07:44.400
third yearly release of Python with free threading.
00:07:44.720 --> 00:07:45.420
And I don't know,
00:07:45.820 --> 00:07:47.940
maybe I was either inspired or
00:07:48.040 --> 00:07:50.700
grumpy. I don't know which way you want to perceive it, but I'm just like, that's it.
00:07:50.700 --> 00:07:51.040
I don't know, Michael,
00:07:51.240 --> 00:07:51.700
what's your hurry?
00:07:52.960 --> 00:07:53.380
Come on.
00:07:53.680 --> 00:07:54.340
Can't you be a little patient?
00:07:54.800 --> 00:07:55.340
I'm like, okay.
00:07:56.620 --> 00:08:00.760
A lot of these projects, I'm like, oh, well, if I could like kind of poke at the edge, maybe this little thing that'll make a little better.
00:08:00.840 --> 00:08:01.400
I'm like, you know what?
00:08:01.740 --> 00:08:09.040
Maybe if it's not going to get moved forward, maybe I can make an alternative version that's somehow API compatible or API similar or just not at all,
00:08:09.380 --> 00:08:10.380
but kind of moves that forward.
00:08:10.460 --> 00:08:13.720
And so the Chameleon-RS one was the first one.
00:08:13.740 --> 00:08:15.720
And that's like full free threading support.
00:08:16.080 --> 00:08:17.480
I'm working on some others I'll talk about.
00:08:17.980 --> 00:08:20.340
But one of the things I had Chris Ariza,
00:08:20.500 --> 00:08:22.060
Christopher Ariza on Talk Python.
00:08:22.720 --> 00:08:23.320
It's not out yet,
00:08:23.500 --> 00:08:24.580
but he has recorded the episode.
00:08:24.980 --> 00:08:25.900
It'll be out in two weeks.
00:08:26.360 --> 00:08:26.380
Yeah.
00:08:26.740 --> 00:08:29.980
And we talked about free threading. And one of the things, I don't know, let me know if you
00:08:30.060 --> 00:08:33.400
know this, because I did not know this. This totally surprised me. If I get Python,
00:08:34.320 --> 00:08:34.719
free threaded
00:08:34.969 --> 00:08:35.099
Python,
00:08:35.560 --> 00:08:37.640
it's not that the GIL is not there.
00:08:37.950 --> 00:08:39.120
The GIL is still there.
00:08:39.280 --> 00:08:40.719
It's just a feature flag
00:08:41.120 --> 00:08:41.620
turned off,
00:08:42.240 --> 00:08:43.460
even in the Python T,
00:08:44.010 --> 00:08:44.159
right?
00:08:44.580 --> 00:08:46.680
And here's where this gets kind of crazy.
00:08:47.160 --> 00:08:47.820
If you import
00:08:47.960 --> 00:08:49.340
something that does not,
00:08:49.800 --> 00:08:51.740
that has native extensions,
00:08:52.140 --> 00:08:53.180
I think this is not sufficient,
00:08:53.420 --> 00:08:53.639
but
00:08:53.880 --> 00:08:56.300
native extensions, like a C extension sort of thing.
00:08:56.580 --> 00:08:59.540
If it does not explicitly say that it is thread safe,
00:08:59.960 --> 00:09:01.960
the gil gets turned back on for the whole process permanently.
00:09:02.420 --> 00:09:02.600
That's it.
00:09:03.380 --> 00:09:03.700
Like what?
00:09:04.120 --> 00:09:05.400
I thought we had free threaded Python.
00:09:05.560 --> 00:09:05.660
Like,
00:09:05.880 --> 00:09:06.000
no,
00:09:06.540 --> 00:09:08.440
you get the possibility of maybe,
00:09:09.200 --> 00:09:11.460
and then eventually it could potentially turn itself back off.
00:09:11.720 --> 00:09:12.420
I'm like, all right,
00:09:13.000 --> 00:09:15.000
that is just nuts.
00:09:15.400 --> 00:09:17.720
So what I would like is some kind of library
00:09:17.920 --> 00:09:20.460
or some kind of indicator that this is a problem
00:09:20.580 --> 00:09:21.640
and it is turned back on.
00:09:21.960 --> 00:09:26.080
Because if I have something like eight threads working on something and I have eight cores
00:09:26.280 --> 00:09:26.540
on it,
00:09:26.880 --> 00:09:27.400
that's fine.
00:09:27.880 --> 00:09:31.640
But if it turns out that it gets turned back into a single thing with the gill,
00:09:32.000 --> 00:09:32.640
the collapse
00:09:32.720 --> 00:09:34.960
of performance, it doesn't just fall back to single threaded.
00:09:35.340 --> 00:09:36.400
It falls below,
00:09:37.120 --> 00:09:40.300
like possibly quite a bit below the performance you would have got if
00:09:40.300 --> 00:09:41.060
you just used one thread,
00:09:41.440 --> 00:09:41.560
right?
00:09:41.720 --> 00:09:42.560
Because there's just contention,
00:09:42.900 --> 00:09:45.740
all this contention and sharing and locking over still
00:09:45.920 --> 00:09:46.500
computed in parallel,
00:09:46.680 --> 00:09:46.780
right?
00:09:47.040 --> 00:09:47.380
All that.
00:09:47.700 --> 00:09:50.920
So I'm introducing to the world my next release,
00:09:51.040 --> 00:09:52.200
and there will be more, like I said,
00:09:52.740 --> 00:09:53.860
called Gilguard,
00:09:54.260 --> 00:09:55.020
the Gilguard.
00:09:55.460 --> 00:09:56.640
And here's what the Gilguard does.
00:09:56.860 --> 00:09:57.300
It's a simple,
00:09:58.000 --> 00:09:58.780
pure Python package
00:09:59.060 --> 00:10:01.120
that only runs in free-threaded Python.
00:10:01.620 --> 00:10:02.720
What it does is,
00:10:04.100 --> 00:10:06.440
is you literally import the project,
00:10:06.780 --> 00:10:08.700
import Gilguard at the top.
00:10:08.960 --> 00:10:11.400
Now, you probably need to do some kind of like rough
00:10:11.860 --> 00:10:15.240
or hashtag ignore this unused import.
00:10:15.860 --> 00:10:18.020
Is this for development only?
00:10:18.200 --> 00:10:19.760
Like you wouldn't want to release this into production?
00:10:20.300 --> 00:10:20.940
Probably not.
00:10:21.120 --> 00:10:21.460
Well, okay.
00:10:21.660 --> 00:10:22.600
Let me show you the features.
00:10:22.660 --> 00:10:23.300
Then you talk about it.
00:10:23.300 --> 00:10:23.340
Okay.
00:10:23.680 --> 00:10:23.820
Okay.
00:10:24.700 --> 00:10:26.460
The way it's written here, probably not.
00:10:27.540 --> 00:10:31.700
So what you can do is you can put import Gilguard at the top before all of your other imports.
00:10:31.800 --> 00:10:34.120
You don't want it to get reordered because it's I sort,
00:10:34.320 --> 00:10:35.220
you know, the sort the imports.
00:10:35.440 --> 00:10:36.900
That's going to change what it means.
00:10:38.160 --> 00:10:41.740
So it has to be the first because what it does is it knows it's running on free thread of Python
00:10:42.060 --> 00:10:43.960
and that the Gil is not enabled because it's the first thing.
00:10:44.280 --> 00:10:45.860
And then anything else that gets imported,
00:10:46.020 --> 00:10:47.800
either on this page, the next page,
00:10:48.000 --> 00:10:48.560
lazy imported
00:10:48.860 --> 00:10:53.720
in some other module that imports another module that then turns the gil back on.
00:10:54.100 --> 00:10:56.480
What you get is an exception with a whole ton of details.
00:10:57.120 --> 00:10:58.440
Crash, the gil has been re-enabled.
00:10:58.880 --> 00:11:01.160
And then this module from this file,
00:11:01.340 --> 00:11:01.900
this version,
00:11:02.260 --> 00:11:04.100
and this is the import sequence that it took
00:11:04.220 --> 00:11:04.680
to get there.
00:11:04.960 --> 00:11:05.720
All that kind of stuff.
00:11:06.120 --> 00:11:06.580
That's cool, right?
00:11:06.840 --> 00:11:07.380
That's really cool.
00:11:07.920 --> 00:11:09.800
It's not like you just named the package.
00:11:10.020 --> 00:11:11.440
You're like, no, it's right here.
00:11:11.880 --> 00:11:12.000
Exactly.
00:11:13.300 --> 00:11:13.520
Yes,
00:11:13.740 --> 00:11:13.840
exactly.
00:11:14.340 --> 00:11:15.540
And here's the file.
00:11:16.010 --> 00:11:19.720
And then here is the sequence of import statements that got you to this file.
00:11:19.850 --> 00:11:19.940
Right.
00:11:20.230 --> 00:11:20.340
Exactly.
00:11:20.740 --> 00:11:21.780
So if you'd like to go fix it,
00:11:22.800 --> 00:11:23.220
here's the pointer.
00:11:23.640 --> 00:11:27.480
And I mean, the fix is like you go complain to the maintainer or you do a PR.
00:11:27.650 --> 00:11:28.100
I don't know.
00:11:28.310 --> 00:11:29.240
You stop using it.
00:11:29.500 --> 00:11:29.620
Yeah.
00:11:29.750 --> 00:11:29.880
Yeah.
00:11:30.080 --> 00:11:31.380
But there is no fix.
00:11:31.900 --> 00:11:33.280
Like the gills coming back on.
00:11:33.720 --> 00:11:37.520
I mean, I guess you can ignore it, but it's kind of like it's there's a way to say like,
00:11:37.530 --> 00:11:39.900
I don't care, like YOLO mode sort of for the runtime.
00:11:40.240 --> 00:11:41.540
But that's not the default.
00:11:41.650 --> 00:11:42.400
You got to choose it.
00:11:42.500 --> 00:11:42.560
Okay.
00:11:42.940 --> 00:11:45.440
So this is what it does by default.
00:11:45.610 --> 00:11:46.980
And if you ask about the,
00:11:47.840 --> 00:11:49.120
do I run this in production?
00:11:49.320 --> 00:11:50.260
Probably not like this.
00:11:50.600 --> 00:11:50.700
Maybe,
00:11:50.900 --> 00:11:52.000
but let's say probably not.
00:11:53.040 --> 00:11:54.900
I don't know, unless you want it to crash and then just like,
00:11:55.040 --> 00:11:57.400
I'd rather crash and then have like such a horrible performance.
00:11:57.660 --> 00:11:59.260
But I'm going to go with no on that.
00:11:59.600 --> 00:12:02.820
So another thing you can do on any virtual environment
00:12:03.330 --> 00:12:05.480
is you can just run python-m-gilgard.
00:12:05.820 --> 00:12:06.980
And instead of running your app,
00:12:07.030 --> 00:12:09.820
it will individually create a separate Python runtime
00:12:10.190 --> 00:12:12.480
and import each module separately.
00:12:12.920 --> 00:12:13.640
and to give you a report.
00:12:13.940 --> 00:12:15.640
It'll say like, I imported all
these modules
00:12:16.000 --> 00:12:17.600
and one of them turned the GIL on.
00:12:17.670 --> 00:12:19.360
For example, I ran this on Talk Python training,
00:12:20.680 --> 00:12:22.060
114 modules it imported.
00:12:22.400 --> 00:12:23.980
When it checked the virtual environment
00:12:24.070 --> 00:12:24.760
for the runtime stuff,
00:12:24.960 --> 00:12:26.560
113 of them were fine,
00:12:26.590 --> 00:12:28.140
but one of them, this PDF thing,
00:12:28.620 --> 00:12:29.420
turned the GIL back on.
00:12:29.800 --> 00:12:30.280
And guess what?
00:12:30.440 --> 00:12:31.960
It's not running in process anymore.
00:12:32.240 --> 00:12:33.120
I don't know what we're doing with it,
00:12:33.560 --> 00:12:35.400
but it's, I mean, just running as a,
00:12:35.400 --> 00:12:36.920
so this is like a generated PDF.
00:12:37.090 --> 00:12:39.360
I could easily just do that as a multi-processing
00:12:39.420 --> 00:12:41.100
or sub-process and get the answer.
00:12:41.760 --> 00:12:42.680
and that fixes that, right?
00:12:42.720 --> 00:12:44.420
It's not always you gotta replace it.
00:12:44.540 --> 00:12:45.600
I kinda like that you could run this
00:12:45.720 --> 00:12:46.660
as like a pre-commit hook,
00:12:46.920 --> 00:12:48.540
like so I can just continually get a report
00:12:48.900 --> 00:12:50.280
or after an event of like,
00:12:50.560 --> 00:12:52.820
I added a new import into my project
00:12:53.080 --> 00:12:53.960
or new dependency,
00:12:54.660 --> 00:12:55.080
I'd wanna know.
00:12:55.360 --> 00:12:55.500
Yeah,
00:12:55.740 --> 00:12:56.100
or CI,
00:12:56.500 --> 00:12:56.920
how about this?
00:12:57.000 --> 00:13:01.360
The next feature is it also has a pytest plugin.
00:13:01.840 --> 00:13:02.960
So you could just run it,
00:13:03.160 --> 00:13:04.800
run your pytests with the GoR.
00:13:04.980 --> 00:13:05.720
Why would you not do this?
00:13:05.880 --> 00:13:07.560
This is gonna save a lot of head scratching
00:13:07.740 --> 00:13:08.660
from a lot of people who are like,
00:13:08.700 --> 00:13:09.860
why is my thing not running faster?
00:13:10.740 --> 00:13:14.880
right it went for a while and then it gets worse right and they may be blaming free threading when
00:13:14.960 --> 00:13:19.160
it's not actually free threading's fault it's some dependency that brought in and permanently
00:13:19.660 --> 00:13:24.180
disabled this for you comes from the fact like you what do you mean the gil can get turned back on i
00:13:24.340 --> 00:13:29.680
ran the free threaded one like that's insane to me yeah so all right also anything else oh yeah so
00:13:29.880 --> 00:13:34.640
if you go over to the docs um this is not the docs but i have a security tab it has no
00:13:35.680 --> 00:13:39.539
astestations don't tell anyone but if you go over the documentation which is that'll be fixed tonight
00:13:41.420 --> 00:13:47.020
it's um built on great docs which is a glorious glorious thing um but if you go to the user guide
00:13:47.300 --> 00:13:53.980
audit environment scroll down till you see some stuff and then where is it here um gosh i forgot
00:13:54.120 --> 00:13:59.380
the guy's name who sent me this message on linkedin when i talked about this but there's a way to run
00:13:59.390 --> 00:14:07.039
it even if you're on like python 312 non free threaded version you can run this uv run command
00:14:07.360 --> 00:14:08.540
against your requirements file.
00:14:09.020 --> 00:14:12.380
And then it will basically sample it.
00:14:12.660 --> 00:14:13.240
Yeah, so you're like,
00:14:13.270 --> 00:14:14.380
I don't want to touch my code or nothing,
00:14:14.450 --> 00:14:15.700
but let me just run this command,
00:14:15.900 --> 00:14:17.260
these two commands against,
00:14:17.700 --> 00:14:19.000
with uv against the project,
00:14:19.410 --> 00:14:19.520
right?
00:14:19.620 --> 00:14:20.160
And then off it goes.
00:14:20.170 --> 00:14:21.180
And because uv is so awesome,
00:14:21.230 --> 00:14:22.240
it manages the environments,
00:14:22.430 --> 00:14:23.680
the installing a free-threaded Python
00:14:23.790 --> 00:14:25.180
to make it work, all that stuff, right?
00:14:25.480 --> 00:14:25.600
Yep.
00:14:25.850 --> 00:14:26.660
And I think that's something we mentioned
00:14:26.750 --> 00:14:28.120
in last week's episode
00:14:28.250 --> 00:14:31.080
was about uv making brand new isolated environment,
00:14:31.310 --> 00:14:32.280
multiple isolated environments,
00:14:32.470 --> 00:14:33.340
even inside of one project.
00:14:33.780 --> 00:14:33.960
Yeah.
00:14:34.280 --> 00:14:34.700
Yeah, that's crazy.
00:14:35.020 --> 00:14:35.340
So anyway,
00:14:35.610 --> 00:14:36.160
there it is.
00:14:36.720 --> 00:14:38.300
That's my new project,
00:14:38.800 --> 00:14:40.120
Gilguard, G-I-L guard.
00:14:40.720 --> 00:14:41.680
And hopefully people,
00:14:41.940 --> 00:14:43.540
it's just one more contribution
00:14:43.730 --> 00:14:46.580
to help people move to at least potentially supporting
00:14:46.690 --> 00:14:47.360
free-threaded Python.
00:14:47.470 --> 00:14:50.580
And I think this is, even though it's a simple little package,
00:14:50.790 --> 00:14:52.400
I think it'll be pretty significant
00:14:52.680 --> 00:14:55.160
because you turn it on and it catches a lot of these errors automatically.
00:14:55.560 --> 00:14:55.760
Yeah,
00:14:55.960 --> 00:14:58.300
I'm not sure about the import part of that in my code,
00:14:58.310 --> 00:15:00.380
but definitely the pytest version,
00:15:00.760 --> 00:15:05.740
the running as an inline module or this isolated run of that,
00:15:06.080 --> 00:15:11.420
Like it's just completely hands off and not going to mutate or potentially affect the
00:15:11.540 --> 00:15:12.620
output of the run to my code.
00:15:12.840 --> 00:15:17.600
You can also put it in warning mode for the import and it'll just give like detailed reports
00:15:17.690 --> 00:15:18.740
with like super big warnings.
00:15:19.300 --> 00:15:22.240
So you can choose to not have it
crash your production.
00:15:22.720 --> 00:15:24.940
If you're touching free threading, you better be using this package.
00:15:26.660 --> 00:15:27.080
Why not?
00:15:27.250 --> 00:15:27.680
Why not?
00:15:27.980 --> 00:15:29.040
It's totally free.
00:15:29.400 --> 00:15:29.880
For real.
00:15:29.980 --> 00:15:30.300
MIT,
00:15:30.610 --> 00:15:32.560
go out there and just have at it.
00:15:32.840 --> 00:15:33.020
All right.
00:15:33.190 --> 00:15:33.920
I love that.
00:15:34.500 --> 00:15:34.600
Yeah.
00:15:35.030 --> 00:15:35.140
Awesome.
00:15:35.360 --> 00:15:35.440
Thanks.
00:15:35.540 --> 00:15:42.360
let me switch this around all right so i want to tell you all now about our sponsor longlink so
00:15:42.640 --> 00:15:48.280
longlink is a cool project so if you go over to their main website first of all their most
00:15:48.540 --> 00:15:51.860
important call to action is you know please could you just star the GitHub project and give it a
00:15:51.980 --> 00:15:58.020
look but here's the deal so this is made by a growing startup out of switzerland and if you've
00:15:58.080 --> 00:16:04.319
got a company that's not a pure tech company or maybe even if it is like you ask yourself how much
00:16:04.340 --> 00:16:07.840
your company still runs on spreadsheets and unrepeatable,
00:16:08.140 --> 00:16:09.160
unreliable things.
00:16:09.340 --> 00:16:10.080
So for most
00:16:10.300 --> 00:16:10.480
businesses,
00:16:10.880 --> 00:16:13.720
that's a lot of the, a lot of the runtime is Excel,
00:16:14.020 --> 00:16:14.140
right?
00:16:14.360 --> 00:16:15.360
Approvals might live in
00:16:15.360 --> 00:16:15.940
an email thread,
00:16:16.760 --> 00:16:18.300
tracking lives in a shared Excel file.
00:16:18.860 --> 00:16:22.080
Off the shelf software rarely fits the way
00:16:22.280 --> 00:16:24.720
that work actually happens. So you kind of got to work around it.
00:16:24.980 --> 00:16:25.400
And now,
00:16:26.020 --> 00:16:27.120
obviously we're in 2026,
00:16:27.520 --> 00:16:31.979
that AI has totally changed that math. So you could build custom software pretty easily for
00:16:32.000 --> 00:16:32.320
your business.
00:16:32.650 --> 00:16:35.600
But keeping it simple and affordable to maintain,
00:16:36.220 --> 00:16:37.800
that's now the hard part. So the
00:16:37.890 --> 00:16:43.140
problem Longlink is trying to solve is making that easy to maintain reliable by providing a platform
00:16:43.270 --> 00:16:46.140
for all these things to be built on to run business processes.
00:16:46.420 --> 00:16:47.880
You write your business apps in plain
00:16:48.140 --> 00:16:51.020
Python with familiar libraries and standard development practices.
00:16:51.520 --> 00:16:52.520
Longlink provides the
00:16:52.720 --> 00:16:53.300
platform underneath.
00:16:53.640 --> 00:16:53.980
Authentication,
00:16:54.140 --> 00:16:54.420
permission,
00:16:54.660 --> 00:16:54.940
deployment,
00:16:55.130 --> 00:16:55.260
storage,
00:16:55.420 --> 00:16:55.620
routing,
00:16:56.100 --> 00:16:57.180
and logging are all
00:16:57.320 --> 00:16:59.340
handled for you. You focus on the business logic,
00:16:59.900 --> 00:17:00.540
maybe you and Claude.
00:17:00.730 --> 00:17:01.820
You think purchase approval,
00:17:02.160 --> 00:17:03.980
vendor onboarding, work orders,
00:17:04.420 --> 00:17:05.439
or complaint tracking.
00:17:05.980 --> 00:17:06.640
Start with one process,
00:17:07.260 --> 00:17:07.900
then build the next.
00:17:08.020 --> 00:17:08.660
See how it goes.
00:17:08.959 --> 00:17:10.920
Getting started is one command,
00:17:11.199 --> 00:17:13.180
uvx long link init.
00:17:13.800 --> 00:17:14.300
There's uv again.
00:17:14.640 --> 00:17:17.079
The platform has a free tier, no credit card required.
00:17:17.600 --> 00:17:19.579
The project is open source and in beta,
00:17:19.660 --> 00:17:21.160
and the team would love for you to try it
00:17:21.400 --> 00:17:21.980
and share your feedback.
00:17:22.400 --> 00:17:22.819
And while you're there,
00:17:23.180 --> 00:17:24.839
they'd really appreciate it at GitHub Star as well.
00:17:24.880 --> 00:17:28.000
So check them out at pythonbytes.fm/long link.
00:17:28.620 --> 00:17:30.640
Link is in your podcast player show notes.
00:17:30.980 --> 00:17:32.340
So pretty neat project.
00:17:32.870 --> 00:17:33.160
Check it out,
00:17:33.320 --> 00:17:33.400
everyone.
00:17:33.560 --> 00:17:33.860
It is cool.
00:17:34.520 --> 00:17:34.640
Yeah.
00:17:35.060 --> 00:17:36.000
When you first said that,
00:17:36.170 --> 00:17:38.060
I wondered if there were the opposite of a URL shortener,
00:17:38.440 --> 00:17:38.600
but no.
00:17:39.400 --> 00:17:39.740
Exactly.
00:17:40.100 --> 00:17:43.700
I want something completely obscured as a URL.
00:17:44.320 --> 00:17:44.940
Longer the better.
00:17:45.210 --> 00:17:45.760
Remember Bitly?
00:17:46.150 --> 00:17:47.180
Give me the opposite of that.
00:17:48.260 --> 00:17:49.580
Sounds like a total vibe-coded project.
00:17:50.160 --> 00:17:50.340
Yeah,
00:17:50.520 --> 00:17:50.680
exactly.
00:17:51.280 --> 00:17:53.080
And it's going to exist pretty soon now.
00:17:54.540 --> 00:17:55.360
I'm sure it will.
00:17:56.100 --> 00:17:57.140
Long week's a cool project.
00:17:57.230 --> 00:17:57.540
Check it out.
00:17:58.440 --> 00:17:59.360
And pip,
00:17:59.540 --> 00:18:01.800
I mean, we talk about uv, but it's not the only way.
00:18:02.140 --> 00:18:02.640
No, that's true.
00:18:02.880 --> 00:18:04.220
And pip has a new release,
00:18:04.600 --> 00:18:05.060
which again,
00:18:05.340 --> 00:18:10.380
a little more on the supply chain security bandwagon.
00:18:11.160 --> 00:18:15.980
PIP 26.3 has a couple really interesting features and some documentation update.
00:18:16.500 --> 00:18:18.020
But most importantly,
00:18:19.060 --> 00:18:20.280
since the November 2nd release,
00:18:20.780 --> 00:18:22.859
its security policy and the documentation
00:18:22.880 --> 00:18:28.980
got updated basically to clarify that pip has
never considered installing untrusted wheels safe
00:18:29.380 --> 00:18:35.400
but because python's import system is dynamic pip can't guarantee that installing a wheel won't
00:18:35.660 --> 00:18:40.320
execute third-party code so this should sound familiar to folks out in the audience because a
00:18:40.320 --> 00:18:48.460
lot of these have been relying on some startup hooks and path pth file exploits to basically get
00:18:48.480 --> 00:18:51.000
things thrown where they probably shouldn't belong.
00:18:52.040 --> 00:18:54.480
Another thing that the big change is there's been
00:18:54.480 --> 00:19:02.020
a warning since 26.1 around avoiding loading code from packages being replaced. So pip now blocks
00:19:02.320 --> 00:19:04.220
unexpected imports during wheel installation.
00:19:05.010 --> 00:19:07.060
So it'll load what needs for installing and it'll
00:19:07.240 --> 00:19:08.200
report the error up front.
00:19:08.630 --> 00:19:11.420
If you're using a command line, the CLI like pip, for example,
00:19:11.740 --> 00:19:14.080
you'll get basically blocked until pip exits.
00:19:14.490 --> 00:19:17.180
The import won't happen and the execution won't happen.
00:19:17.700 --> 00:19:23.880
The code that calls pip programmatically will get warnings after the return controls from the pip library.
00:19:24.350 --> 00:19:26.360
And this has been rolled out in steps.
00:19:26.390 --> 00:19:26.880
Like I mentioned,
00:19:27.060 --> 00:19:32.320
it first started in 26.1 with a warning at the unexpected import of blank after pip started.
00:19:33.120 --> 00:19:38.320
26.3 now enforces this behavior change and it will turn it into an error and stop.
00:19:38.450 --> 00:19:45.740
So there's quite a few links I put in the show notes about the issue and the pull requests and some of the comments.
00:19:46.540 --> 00:19:52.580
Basically what tripped this up in the wild was one of the user's organizations had a
00:19:53.460 --> 00:19:57.320
at exit handler that was reporting interpreter usage metrics over HTTP.
00:19:58.180 --> 00:20:00.060
And that basically gave some warnings.
00:20:00.110 --> 00:20:05.000
And there's a couple other projects that are in the Python space that have maybe stumbled
00:20:05.090 --> 00:20:05.660
across this,
00:20:06.030 --> 00:20:09.140
like Rich in the Emoji Codes was doing this.
00:20:09.540 --> 00:20:12.280
The Lark API project was doing this.
00:20:12.880 --> 00:20:14.320
It was not without controversy.
00:20:14.940 --> 00:20:21.000
There is a slight issue right now is that there's an additional overhead to running this check.
00:20:21.580 --> 00:20:26.600
So the author and a couple of people went back and forth inside of the various pull requests.
00:20:27.030 --> 00:20:29.440
But basically importing pip's install command,
00:20:29.720 --> 00:20:35.360
which is where they were putting the kind of list of things that we're going to possibly lazily import during the install process,
00:20:35.960 --> 00:20:39.800
is adding about 700 milliseconds of latency to the install process.
00:20:39.940 --> 00:20:42.720
So others were complaining because, you know, yes,
00:20:43.120 --> 00:20:46.420
it's not pip isn't necessarily installed in every environment and it could be called.
00:20:46.980 --> 00:20:48.400
But the authors reply.
00:20:48.520 --> 00:20:52.140
So this is Damien Shaw said that just moves where the import cost is.
00:20:52.320 --> 00:20:55.980
And turning this on or turning this warning into an error is now crucial,
00:20:56.520 --> 00:20:59.740
given the stance of security and supply chain attacks that are out there.
00:21:00.160 --> 00:21:01.820
So if there's any kind of interrupted install,
00:21:02.080 --> 00:21:06.160
PIP will now write recovery metadata and reports to allow you to understand what happened.
00:21:06.680 --> 00:21:09.200
An interrupted uninstall may need a manual recovery.
00:21:09.480 --> 00:21:10.280
That's an uninstall,
00:21:10.480 --> 00:21:10.840
not install.
00:21:11.500 --> 00:21:12.200
So check that out.
00:21:12.540 --> 00:21:14.800
Another thing in 26.3, so if you are still a pip user,
00:21:15.180 --> 00:21:18.780
there are pylock.toml improvements for installing extras.
00:21:19.300 --> 00:21:22.200
And then there's also some new --group
00:21:22.700 --> 00:21:25.620
for installing non-default groups of dependencies.
00:21:26.480 --> 00:21:28.100
So a couple of little nice little dependencies.
00:21:28.280 --> 00:21:30.680
And another thing that pip will also refuse to do
00:21:30.720 --> 00:21:34.620
is follow a file URL redirect,
00:21:35.120 --> 00:21:37.539
which obviously can lead to hilarity
00:21:37.560 --> 00:21:41.140
or most likely security and supply chain issues also.
00:21:41.460 --> 00:21:46.300
So again, I linked in the show notes to the issue,
00:21:47.020 --> 00:21:50.720
the PR and that other kind of details in there.
00:21:51.080 --> 00:21:52.320
I know it's a small thing, but again,
00:21:52.760 --> 00:21:55.200
anything we can do to make sure folks are not susceptible
00:21:55.340 --> 00:21:58.140
to these supply chain issues and chain problems,
00:21:58.250 --> 00:21:59.740
I want to make sure we're all on top of.
00:21:59.940 --> 00:22:02.860
So I'm also not a pip user anymore.
00:22:03.120 --> 00:22:04.240
I'm a uv all the way,
00:22:04.710 --> 00:22:06.360
but I know that that's not normal.
00:22:06.780 --> 00:22:10.720
there's probably a tremendous majority of people who are probably still out there using pip for
00:22:10.740 --> 00:22:16.860
things yeah absolutely and you know security is good this is all very important also just beginners
00:22:17.260 --> 00:22:21.420
you know a lot of beginners come on they're not like oh the first thing i learned is uv yes exactly
00:22:21.680 --> 00:22:26.120
how many docs still say pip install xyz you know yeah don't install i don't know what package that
00:22:26.120 --> 00:22:30.060
is by the way so but yes it's it's just interesting because during
the pip install
00:22:31.340 --> 00:22:36.740
lazy imported pieces of code were the problem like it's like you were i'm going to install this thing
00:22:36.760 --> 00:22:37.820
And then like in the middle of it,
00:22:37.860 --> 00:22:38.880
as you were like raising the curtain
00:22:38.980 --> 00:22:40.860
and getting ready to put down the next piece of like stuff,
00:22:41.220 --> 00:22:43.440
something else would happen that you weren't expecting.
00:22:43.900 --> 00:22:45.800
And that is where this is blocking it now.
00:22:46.060 --> 00:22:47.280
Probably a wise thing to do.
00:22:47.640 --> 00:22:48.360
Just tightening everything up.
00:22:48.560 --> 00:22:49.260
I'm here for it.
00:22:49.460 --> 00:22:50.260
Sounds good to me.
00:22:50.660 --> 00:22:51.000
All right.
00:22:51.280 --> 00:22:52.380
Let's talk about some developer tools.
00:22:52.920 --> 00:22:54.060
How about all of them?
00:22:54.180 --> 00:22:54.580
All of them.
00:22:54.660 --> 00:22:55.160
All of them.
00:22:56.280 --> 00:22:57.960
So guy behind this sent me and said,
00:22:58.040 --> 00:22:58.160
hey,
00:22:58.680 --> 00:23:01.560
I want to tell you about some regex tool that I made.
00:23:01.780 --> 00:23:02.520
I'm like, I don't know.
00:23:02.640 --> 00:23:03.680
I mean, regex, like we talked,
00:23:03.860 --> 00:23:04.540
there's a lot of regex.
00:23:04.880 --> 00:23:08.560
But then I kind of poke around this place called HeyUtils.com.
00:23:08.840 --> 00:23:09.440
I've never heard of it.
00:23:09.440 --> 00:23:09.580
Flash tools.
00:23:10.020 --> 00:23:10.440
I hadn't either.
00:23:10.720 --> 00:23:11.800
There are 306 tools.
00:23:12.200 --> 00:23:12.700
So look at this.
00:23:13.460 --> 00:23:17.480
You got some JSON and you want it in Tommel and you don't feel like making your AI do it.
00:23:17.600 --> 00:23:20.180
Just go in here, paste that bad boy in there and boom, you got Tommel.
00:23:20.580 --> 00:23:21.200
Or you've got...
00:23:21.200 --> 00:23:21.800
Oh, that's cool.
00:23:21.880 --> 00:23:23.380
So the tools are all online.
00:23:23.500 --> 00:23:24.880
You can use them in line from here?
00:23:25.540 --> 00:23:25.760
Exactly.
00:23:26.060 --> 00:23:27.320
It's a JSON path tester.
00:23:27.840 --> 00:23:29.880
There's a JSON diff over there,
00:23:30.120 --> 00:23:32.380
which probably if they're out of order, it doesn't matter,
00:23:32.520 --> 00:23:32.860
I'm guessing.
00:23:33.260 --> 00:23:33.960
JSON to Go,
00:23:34.180 --> 00:23:35.380
JSON to Java,
00:23:35.870 --> 00:23:36.940
to TypeScript, to Python.
00:23:37.500 --> 00:23:37.860
What do we get?
00:23:39.080 --> 00:23:39.820
We get data classes.
00:23:40.260 --> 00:23:40.380
Yeah,
00:23:40.640 --> 00:23:41.060
that's pretty sweet.
00:23:41.190 --> 00:23:43.000
Like there's a note about a Pydantic one.
00:23:43.260 --> 00:23:43.800
Yeah, oh wait, hold on.
00:23:43.920 --> 00:23:44.740
You might be able to get more.
00:23:45.060 --> 00:23:47.160
Target is Pydantic or data classes.
00:23:47.290 --> 00:23:47.740
How about that?
00:23:48.040 --> 00:23:48.540
That's pretty solid.
00:23:48.920 --> 00:23:50.080
Scroll, there's CSV stuff.
00:23:50.340 --> 00:23:50.840
There's file stuff,
00:23:51.020 --> 00:23:51.340
text encoding,
00:23:51.680 --> 00:23:51.960
regex.
00:23:52.030 --> 00:23:52.320
There we go.
00:23:52.330 --> 00:23:52.860
That's what I said.
00:23:53.060 --> 00:23:53.860
UUID generators,
00:23:54.840 --> 00:23:55.660
time and math,
00:23:56.180 --> 00:23:56.440
you know.
00:23:57.340 --> 00:24:02.520
That's pretty handy because I can't tell you the number of times I have like JSON I want to validate in my clipboard.
00:24:02.700 --> 00:24:04.220
And I'm just like, I just want to go to a web page.
00:24:04.340 --> 00:24:06.820
So I go search for a new tool every time I do it.
00:24:07.800 --> 00:24:08.380
Course tester.
00:24:08.910 --> 00:24:09.000
Exactly.
00:24:09.540 --> 00:24:09.940
I'm like,
00:24:10.350 --> 00:24:10.640
every time,
00:24:11.100 --> 00:24:12.700
JSON validator online.
00:24:12.970 --> 00:24:14.520
And it feels like it's purple.
00:24:14.670 --> 00:24:15.440
I'm like, yeah, it's purple.
00:24:15.640 --> 00:24:16.420
But I just, I don't remember,
00:24:16.620 --> 00:24:16.760
right?
00:24:17.200 --> 00:24:17.560
Certificates.
00:24:17.960 --> 00:24:19.780
Anyway, we're only like 75% of the way through.
00:24:19.830 --> 00:24:20.940
So there's a lot of stuff here.
00:24:21.300 --> 00:24:22.100
I just thought, you know what?
00:24:22.400 --> 00:24:24.200
I was, you have no idea.
00:24:24.260 --> 00:24:25.040
I mean, you have an idea.
00:24:25.050 --> 00:24:29.860
But the general you out there has no idea how many tools we get sent.
00:24:29.960 --> 00:24:32.280
It's honestly kind of overwhelming.
00:24:32.320 --> 00:24:33.860
to open up my email in the morning.
00:24:33.890 --> 00:24:35.060
I get so many.
00:24:35.540 --> 00:24:35.600
Hey,
00:24:35.760 --> 00:24:36.420
Michael and Brian,
00:24:36.830 --> 00:24:38.720
we just, I really enjoyed your episode.
00:24:38.870 --> 00:24:40.400
And I'm like, no, I did not misspeak
00:24:40.580 --> 00:24:41.360
and forget Calvin's name.
00:24:41.540 --> 00:24:42.300
That's what the email says.
00:24:42.580 --> 00:24:43.360
Hi, Michael and Brian.
00:24:43.820 --> 00:24:46.120
Because they got some crap AI
00:24:46.250 --> 00:24:47.480
that was trained six months ago
00:24:47.720 --> 00:24:48.740
that's trying to submit their stuff
00:24:48.810 --> 00:24:50.220
to every podcast they can find.
00:24:50.350 --> 00:24:50.820
You know what I mean?
00:24:51.180 --> 00:24:52.280
And I'm like, erase,
00:24:52.660 --> 00:24:53.060
erase,
00:24:53.440 --> 00:24:54.040
erase.
00:24:54.720 --> 00:24:56.300
But I feel bad because every now and then
00:24:56.300 --> 00:24:57.240
I'll get a real one,
00:24:57.350 --> 00:24:58.100
a real legitimate,
00:24:58.340 --> 00:24:59.500
somebody's taking the time to send in something.
00:25:00.000 --> 00:25:00.420
And I'm like,
00:25:00.930 --> 00:25:02.280
oh, I almost deleted you
00:25:02.300 --> 00:25:08.820
you were the ninth one in a row you know what i mean so anyway that's why i put emojis in my
00:25:08.960 --> 00:25:14.600
subject lines so i always stand out exactly i'm just kidding hashtag drop a dolphin if you if you
00:25:14.760 --> 00:25:21.820
also use right how about uh how about dropping an extra i got an extra for you i got a fun little
00:25:21.840 --> 00:25:29.560
one here uh you've heard of all the refrigerator and freezer hacks going on in europe because people
00:25:29.580 --> 00:25:33.020
didn't patch their OSs or left the default password on there.
00:25:33.370 --> 00:25:34.440
So someone developed a nice
00:25:34.510 --> 00:25:35.560
little honeypot project,
00:25:36.450 --> 00:25:36.600
which,
00:25:37.160 --> 00:25:40.260
okay, I'm not into hacking refrigerators, but it is an interesting
00:25:40.500 --> 00:25:41.120
research project.
00:25:41.440 --> 00:25:46.360
And they managed to build a single file Python with no dependencies other
00:25:46.460 --> 00:25:52.220
than the standard library version of a honeypot that acts like it's one of these supermarket
00:25:52.400 --> 00:25:55.420
refrigeration controllers from Dan Foss or Dixle.
00:25:55.930 --> 00:25:58.940
And so it'll return login pages and
00:25:58.960 --> 00:26:03.440
all the pieces that make it look like it's actually doing the thing that the malicious
00:26:03.740 --> 00:26:04.400
attackers would do.
00:26:04.860 --> 00:26:07.920
And then it writes out a nice little report for you as the person running the
00:26:08.040 --> 00:26:08.340
honeypot.
00:26:08.720 --> 00:26:12.780
If you're a security researcher or you want to just kind of tinker with security research,
00:26:13.040 --> 00:26:14.840
this is a fun little way to get started.
00:26:15.060 --> 00:26:16.880
So check it out. It is called Cold Frame.
00:26:17.640 --> 00:26:22.040
I like to play on the pun on refrigeration controllers,
00:26:22.840 --> 00:26:23.580
but looks pretty fun.
00:26:24.000 --> 00:26:24.700
I haven't
00:26:24.720 --> 00:26:30.140
tried it myself so maybe it maybe itself is a honeypot it's only a few days old but can you
00:26:30.170 --> 00:26:33.740
believe they installed it oh my god yeah well i went and looked at the code like the honeypot
00:26:34.220 --> 00:26:41.900
file itself is only 735 lines of code so it has in there again all the login screens all the the
00:26:42.080 --> 00:26:46.880
bit that makes it look like it's real to one of the potential attackers that's kind of fun i mean
00:26:47.080 --> 00:26:51.080
not cool that it's happening but i love the idea of honeypots and these canaries and type of things
00:26:51.100 --> 00:26:55.480
they're really great especially if it's your hobby and you want to like see what's going on
00:26:55.620 --> 00:26:59.900
and experience it if you can get one of them hitting your honeypot then you'll gather data
00:27:00.120 --> 00:27:04.620
from the attackers yeah absolutely now before we move on to my extra i just we were talking before
00:27:04.760 --> 00:27:09.740
the show but it feels like maybe worth bringing it out to the audience now as i go around and look
00:27:09.740 --> 00:27:13.840
at these different projects that people send me and so on like you never you never know what's out
00:27:13.840 --> 00:27:18.040
on the internet right there's all the supply chain stuff so if you're thinking about a project maybe
00:27:18.060 --> 00:27:19.200
just take the two minutes,
00:27:19.400 --> 00:27:20.580
copy the GitHub URL,
00:27:21.140 --> 00:27:22.860
go to your favorite AI and go, hey, I'm considering
00:27:23.020 --> 00:27:23.340
using this.
00:27:23.560 --> 00:27:25.080
Is there anything malicious in here?
00:27:25.240 --> 00:27:26.280
Don't do a security review.
00:27:26.580 --> 00:27:27.460
Just tell me, is it a
00:27:27.660 --> 00:27:28.300
supply chain thing?
00:27:28.570 --> 00:27:28.880
And just,
00:27:29.220 --> 00:27:29.420
you know,
00:27:29.620 --> 00:27:31.600
that's the new virus scanner I think we got to get to.
00:27:31.820 --> 00:27:36.260
These repositories have hooks potentially in them that could run code on your machines.
00:27:36.720 --> 00:27:37.320
When you clone it,
00:27:37.660 --> 00:27:40.360
and then if you change into another branch, there's a hook that can fire
00:27:40.780 --> 00:27:42.680
that can do whatever it wants.
00:27:43.500 --> 00:27:46.260
Isn't that nice? I get an extra little bit of execution that I
00:27:46.240 --> 00:27:49.880
didn't expect it was convenient it was convenient as developers because we would use it for certain
00:27:50.060 --> 00:27:56.140
things but it's also very convenient for attackers yeah absolutely all right well my only extra is
00:27:57.060 --> 00:28:03.520
congratulations welcome to brett smith so brett smith is joining the python software foundation
00:28:03.940 --> 00:28:09.600
as a security developer along with seth michael larson the security developer resident and mike
00:28:09.720 --> 00:28:14.320
fiedler as the pypi safety and security engineer who i feel like we probably covered some of his
00:28:14.180 --> 00:28:17.820
work at the beginning for your things. He was definitely involved. So this is super cool. And
00:28:17.820 --> 00:28:18.240
this is,
00:28:18.480 --> 00:28:18.880
I think we,
00:28:19.120 --> 00:28:22.460
I gave a unsolicited shout out to Claude earlier,
00:28:23.340 --> 00:28:24.200
but you know,
00:28:24.600 --> 00:28:24.980
Anthropic's
00:28:25.300 --> 00:28:26.880
pretty awesome in terms of their coding tools.
00:28:27.120 --> 00:28:30.120
And this is made possible by Anthropic donating
00:28:30.740 --> 00:28:36.000
support to the PSF. So thanks Anthropic as well. I just hope that Brett's middle name is Michael,
00:28:36.280 --> 00:28:38.460
because we've got Seth Michael Larson,
00:28:38.780 --> 00:28:40.480
Michael Fiedler. We got to keep the mics going.
00:28:41.440 --> 00:28:42.680
There's a lot of Michaels out there.
00:28:43.920 --> 00:28:44.660
No, congrats, Brett.
00:28:44.980 --> 00:28:45.520
And thanks,
00:28:45.900 --> 00:28:46.080
Anthropic.
00:28:46.440 --> 00:28:46.620
Okay,
00:28:46.840 --> 00:28:47.740
close it out with a joke.
00:28:48.100 --> 00:28:48.600
What do you think?
00:28:48.920 --> 00:28:49.700
I never peek.
00:28:49.760 --> 00:28:51.540
I always wait for the joke to hit me
00:28:51.680 --> 00:28:52.920
so you get the actual reaction.
00:28:53.280 --> 00:28:53.920
I love it.
00:28:53.920 --> 00:28:54.280
I love it.
00:28:54.380 --> 00:28:54.980
That's the way to do it.
00:28:55.300 --> 00:28:56.740
I actually have two jokes for you.
00:28:56.980 --> 00:28:57.140
Okay.
00:28:57.540 --> 00:28:58.880
I'll give you my first joke,
00:28:58.940 --> 00:29:00.220
which is I had not planned it,
00:29:00.600 --> 00:29:02.700
but this is a coffee mug that I got
00:29:02.820 --> 00:29:04.000
that one of my older daughters,
00:29:04.500 --> 00:29:04.840
they're twins,
00:29:04.980 --> 00:29:06.160
so I have two older daughters,
00:29:07.040 --> 00:29:08.560
gave to me for something.
00:29:08.980 --> 00:29:09.560
And it says,
00:29:09.660 --> 00:29:10.720
the code doesn't work.
00:29:11.000 --> 00:29:11.360
why?
00:29:12.020 --> 00:29:13.020
This is a frustrated developer.
00:29:13.360 --> 00:29:13.680
Same picture.
00:29:13.840 --> 00:29:14.500
The code works.
00:29:14.720 --> 00:29:15.000
Why?
00:29:15.700 --> 00:29:16.120
That's a good one.
00:29:16.740 --> 00:29:17.580
I haven't seen that one before.
00:29:18.040 --> 00:29:19.500
Yeah, I literally had this conversation
00:29:19.640 --> 00:29:20.440
with Claude yesterday
00:29:20.580 --> 00:29:20.880
and it said,
00:29:21.000 --> 00:29:21.920
oh, I changed this thing
00:29:22.080 --> 00:29:22.800
so this would work.
00:29:23.080 --> 00:29:24.260
I'm like, but it worked before.
00:29:24.900 --> 00:29:25.960
Can you help me understand why?
00:29:26.540 --> 00:29:27.260
Because I don't know.
00:29:27.680 --> 00:29:28.020
And he goes,
00:29:28.200 --> 00:29:28.860
Michael, honestly,
00:29:28.880 --> 00:29:30.000
I can't tell you why this works.
00:29:30.120 --> 00:29:30.460
I'm like, oh,
00:29:30.660 --> 00:29:31.280
nobody knows.
00:29:33.660 --> 00:29:33.920
All right.
00:29:34.260 --> 00:29:35.240
Okay, that's where the joke.
00:29:36.560 --> 00:29:38.080
Sometimes the agents get a little lazy.
00:29:38.260 --> 00:29:39.700
They're like, that seems hard.
00:29:39.860 --> 00:29:40.620
I don't want to do that.
00:29:40.820 --> 00:29:41.400
I know, exactly.
00:29:41.520 --> 00:29:42.200
What do you care?
00:29:44.240 --> 00:29:45.420
Creator said save tokens.
00:29:46.160 --> 00:29:47.200
We're on a subscription plan.
00:29:47.700 --> 00:29:48.220
Okay, you're right.
00:29:48.680 --> 00:29:49.360
Speaking of which,
00:29:49.600 --> 00:29:50.540
so the joke is,
00:29:50.740 --> 00:29:52.100
I've entitled it No Papa.
00:29:52.880 --> 00:29:54.560
So Docker is the papa.
00:29:54.960 --> 00:29:56.740
The CPU is the papa.
00:29:57.160 --> 00:29:58.120
Docker is the kid.
00:29:58.400 --> 00:29:59.020
CPU says,
00:29:59.420 --> 00:29:59.520
Docker,
00:29:59.720 --> 00:29:59.840
Docker.
00:30:00.380 --> 00:30:00.800
Yes, papa.
00:30:01.140 --> 00:30:01.600
Eating RAM?
00:30:02.180 --> 00:30:02.780
No, papa.
00:30:03.180 --> 00:30:03.820
Telling lies?
00:30:04.200 --> 00:30:04.800
No, papa.
00:30:05.140 --> 00:30:05.740
Open your mouth.
00:30:06.080 --> 00:30:06.820
And you look in there,
00:30:06.980 --> 00:30:10.320
it's 9.06 gigs of RAM usage.
00:30:12.240 --> 00:30:13.860
no papa it's fine
00:30:16.760 --> 00:30:22.520
well that was a fine it is yeah that's a fine episode calvin thanks so much as always enjoyed
00:30:22.550 --> 00:30:25.700
it yep you bet bye and bye everyone see you see you next week