WEBVTT

00:00:00.001 --> 00:00:03.340
Python has come a long way since it was released in 1991.

00:00:03.340 --> 00:00:08.520
It originally released when the standard library was primarily the totality of functionality

00:00:08.520 --> 00:00:10.560
you could leverage when building your applications.

00:00:10.560 --> 00:00:18.680
With the addition of pip and 368,000 packages on PyPI, it is indeed a different world where

00:00:18.680 --> 00:00:22.540
what we need and expect from the standard library is not the same.

00:00:22.540 --> 00:00:28.820
Brett Cannon and Christian Himes have introduced PEP 594, which is the first step in trimming

00:00:28.820 --> 00:00:32.780
outdated and unmaintained older modules from the standard library.

00:00:32.780 --> 00:00:36.960
Join us to dive into the history and future of Python's standard library.

00:00:36.960 --> 00:00:43.280
This is Talk Python To Me, episode 360, recorded March 29th, 2022.

00:00:56.400 --> 00:00:59.640
Welcome to Talk Python To Me, a weekly podcast on Python.

00:00:59.640 --> 00:01:01.360
This is your host, Michael Kennedy.

00:01:01.360 --> 00:01:05.560
Follow me on Twitter where I'm @mkennedy and keep up with the show and listen to past

00:01:05.560 --> 00:01:10.640
episodes at talkpython.fm and follow the show on Twitter via at Talk Python.

00:01:10.640 --> 00:01:14.220
We've started streaming most of our episodes live on YouTube.

00:01:14.220 --> 00:01:19.960
Subscribe to our YouTube channel over at talkpython.fm/youtube to get notified about upcoming

00:01:19.960 --> 00:01:21.820
shows and be part of that episode.

00:01:21.820 --> 00:01:26.400
This episode is sponsored by Microsoft for startups founders hub.

00:01:26.400 --> 00:01:32.140
Check them out at talkpython.fm/founders hub to get early support for your startup.

00:01:32.140 --> 00:01:34.760
And it's brought to you by Fusion Auth.

00:01:34.760 --> 00:01:39.200
Your authentication and authorization platform built for devs by devs.

00:01:39.200 --> 00:01:42.460
Check them out at talkpython.fm/fusion auth.

00:01:43.300 --> 00:01:46.900
Transcripts for this and all of our episodes are brought to you by Assembly AI.

00:01:46.900 --> 00:01:49.580
Do you need a great automatic speech to text API?

00:01:49.580 --> 00:01:52.120
Get human level accuracy in just a few lines of code.

00:01:52.120 --> 00:01:54.980
Visit talkpython.fm/assemblyai.

00:01:56.260 --> 00:01:59.020
Brett, Christian, welcome to Talk Python To Me.

00:01:59.020 --> 00:01:59.760
Thanks for having us.

00:01:59.760 --> 00:02:00.080
Yeah.

00:02:00.080 --> 00:02:00.640
Thank you.

00:02:00.640 --> 00:02:01.740
First time for me.

00:02:01.740 --> 00:02:03.840
Yeah, Christian, it's great to have you here.

00:02:03.840 --> 00:02:04.540
That's super.

00:02:04.540 --> 00:02:06.680
And Brett, I think you may have been on before.

00:02:06.680 --> 00:02:07.980
Memory recollects.

00:02:07.980 --> 00:02:09.260
Yes, I have been on.

00:02:09.260 --> 00:02:10.300
I have been on previously.

00:02:10.300 --> 00:02:11.520
I love having you on.

00:02:11.520 --> 00:02:12.980
It's always fun to talk about stuff.

00:02:12.980 --> 00:02:15.700
And it always seems like somehow we touch on WebAssembly.

00:02:15.700 --> 00:02:21.080
I think one of the very last conferences I went to was PyCon and we recorded like on the

00:02:21.080 --> 00:02:23.160
expo floor talking about WebAssembly.

00:02:23.160 --> 00:02:24.760
So maybe we'll find a way to get back to that.

00:02:24.760 --> 00:02:26.900
I do remember that conversation very distinctly, actually.

00:02:26.900 --> 00:02:27.720
Yeah, that was fun.

00:02:27.720 --> 00:02:30.800
Even though you've been on a lot, maybe just real quick, tell people about yourself.

00:02:30.800 --> 00:02:36.300
You've been Python core deving for a long time and something to do with VS Code and Python

00:02:36.300 --> 00:02:36.760
as well.

00:02:36.760 --> 00:02:37.900
So tell people about that.

00:02:37.900 --> 00:02:38.560
Just stuff.

00:02:38.560 --> 00:02:40.500
Yeah, just keep it short and sweet.

00:02:40.500 --> 00:02:44.800
I am the dev manager for the Python experience in VS Code at Microsoft.

00:02:44.800 --> 00:02:48.280
I have been a Python core developer for 19 years.

00:02:48.280 --> 00:02:54.940
And I've been a member of the Python Steering Council since its inception back three and

00:02:54.940 --> 00:02:57.020
some odd months ago, I think.

00:02:57.020 --> 00:02:58.440
I don't even keep track of when that started.

00:02:58.440 --> 00:02:58.880
Yes.

00:02:58.880 --> 00:02:59.360
And that's me.

00:02:59.360 --> 00:02:59.760
Awesome.

00:02:59.760 --> 00:03:01.040
Christian, how about you?

00:03:01.040 --> 00:03:01.920
Tell people about yourself.

00:03:01.920 --> 00:03:03.860
I work for Red Hat.

00:03:03.860 --> 00:03:05.200
You may have seen that.

00:03:05.200 --> 00:03:06.240
So first...

00:03:06.240 --> 00:03:08.080
You have a Red Hat and you work for Red Hat.

00:03:08.080 --> 00:03:08.460
That's awesome.

00:03:08.460 --> 00:03:08.600
Yeah.

00:03:08.600 --> 00:03:10.140
At Red Fedora, by the way.

00:03:10.140 --> 00:03:13.540
So I work for Red Hat in the security engineering department.

00:03:13.540 --> 00:03:19.560
I work on something that could be easiest to describe as an open source implementation of

00:03:19.560 --> 00:03:20.300
Active Directory.

00:03:21.020 --> 00:03:26.340
And currently working on just containerizing all the things and getting that up to the internet.

00:03:26.340 --> 00:03:28.280
So that's a fun one.

00:03:28.280 --> 00:03:31.820
As part of my security work, I also do security for CPython.

00:03:31.820 --> 00:03:38.100
So I take care of some of the models and I'm part of the security response team.

00:03:38.100 --> 00:03:44.000
Been in quite a while for the, I think, 14 years, give or take, probably.

00:03:44.000 --> 00:03:45.780
A long time, eventually.

00:03:45.780 --> 00:03:47.940
So I started doing Python like 20 years ago.

00:03:47.940 --> 00:03:48.480
That was fun.

00:03:48.480 --> 00:03:48.820
Awesome.

00:03:48.820 --> 00:03:49.300
Yeah.

00:03:49.860 --> 00:03:51.840
Anything else you want to know about me?

00:03:51.840 --> 00:03:56.140
No, I would just like to say thank you on behalf of everyone for not, for keeping our

00:03:56.140 --> 00:03:59.200
machines from getting rooted because we're running Python web apps.

00:03:59.200 --> 00:03:59.940
That's pretty awesome.

00:03:59.940 --> 00:04:00.480
You're welcome.

00:04:00.480 --> 00:04:06.280
Seriously, though, how often are there meaningful security problems in CPython?

00:04:06.280 --> 00:04:11.980
I know that one of the big talking points about moving away from Python 2 was like, well,

00:04:11.980 --> 00:04:15.300
if you don't come along for the ride, you're not going to get security updates.

00:04:15.300 --> 00:04:17.660
But how often is that a big problem, really?

00:04:17.840 --> 00:04:20.680
How often are there problems where our CVE is filed?

00:04:20.680 --> 00:04:23.320
You're like, oh, we got to jump on this and quickly get it out before.

00:04:23.320 --> 00:04:27.900
The last version of Python that came out before we had the emergency release for the bugfish.

00:04:27.900 --> 00:04:33.760
So the 3.10.2, I think, had like 11 or 13 CVEs.

00:04:33.760 --> 00:04:37.820
Although only one that directly affected was in the Python code.

00:04:37.940 --> 00:04:40.220
So we also ship a bunch of extensions.

00:04:40.220 --> 00:04:45.600
Like we ship a library to pass XML that had like six or eight CVEs.

00:04:45.600 --> 00:04:46.940
We had a Zlib fix.

00:04:46.940 --> 00:04:48.300
We had something else.

00:04:48.300 --> 00:04:51.500
So it's not just Python core that's affected.

00:04:51.500 --> 00:04:58.700
But since we bundle and ship several libraries with CPython, especially Windows and the Mac installers,

00:04:58.700 --> 00:05:00.020
you may be also affected.

00:05:00.420 --> 00:05:08.400
If you have Linux distros, they typically have their libraries debundled and use system libraries and they update them out of bounds.

00:05:08.400 --> 00:05:09.320
But yeah.

00:05:09.320 --> 00:05:09.620
Okay.

00:05:09.620 --> 00:05:12.300
Well, that's actually more than I realized, to be honest.

00:05:13.020 --> 00:05:18.420
You don't hear too often about it being a big public problem, like log4j or something like that.

00:05:18.420 --> 00:05:18.700
Yeah.

00:05:18.700 --> 00:05:23.200
I'd say typically the CVEs we end up dealing with is the bundling that Christian mentioned, right?

00:05:23.200 --> 00:05:27.880
Like Christian does a lot of work to make sure we're constantly compatible with the newest versions of OpenSSL.

00:05:27.880 --> 00:05:33.820
So for instance, on 2.7, had you not moved over, you're going to have to do the work to be able to use OpenSSL.

00:05:33.820 --> 00:05:36.460
I think 3 is the newest one or the one coming up.

00:05:36.820 --> 00:05:43.720
So that's the real kind of concern and less of we screwed up as core devs and we have a nasty CVE.

00:05:43.720 --> 00:05:46.780
It's usually something we depend on that typically triggers this kind of thing.

00:05:46.780 --> 00:05:47.580
Thank goodness.

00:05:47.580 --> 00:05:48.040
Interesting.

00:05:48.040 --> 00:05:48.720
Yeah.

00:05:48.720 --> 00:05:49.140
Yeah.

00:05:49.140 --> 00:05:50.120
All right.

00:05:50.120 --> 00:05:58.280
Well, speaking of the standard library and stuff, let's start out by talking about Python just on GitHub,

00:05:58.280 --> 00:06:03.480
because I think maybe the time of yours releases, it might be already a week old.

00:06:03.860 --> 00:06:09.540
But Brett, you were one of the big proponents of moving CPython and the Python organization over to GitHub, right?

00:06:09.540 --> 00:06:11.060
Yeah, I drove that move.

00:06:11.060 --> 00:06:11.460
Thank you.

00:06:11.460 --> 00:06:12.260
That's awesome.

00:06:12.260 --> 00:06:14.200
It's so nice to be over there.

00:06:14.200 --> 00:06:21.400
But one of the challenges has been that bugs.python.org has kind of been its own island, especially since this move, right?

00:06:21.400 --> 00:06:21.840
Yeah.

00:06:22.280 --> 00:06:30.640
So when I helped move us off of Macarial to Git and thus moved us to GitHub for pull requests and stuff,

00:06:30.640 --> 00:06:32.300
I basically had to choose my battles.

00:06:32.300 --> 00:06:39.980
And the battle I chose was changing our version control system and no longer self-hosting our version control system.

00:06:40.240 --> 00:06:49.540
I was not up mentally to the challenge of also trying to move the development team over to a new issue tracker as well.

00:06:49.540 --> 00:06:56.000
So I purposely punted on that problem and tackled the one I thought I was capable of handling and dealing with.

00:06:56.000 --> 00:07:04.880
And that's why we ended up with this somewhat split personality problem of Python being on GitHub for pull requests and for code hosting, but not for issue tracker.

00:07:04.880 --> 00:07:10.940
Well, Ido said yesterday, I believe it was yesterday, maybe the day before yesterday on Twitter that, hey, it's happening.

00:07:10.940 --> 00:07:16.040
The bugs, python.org is migrating over and then it got delayed until April 1st.

00:07:16.040 --> 00:07:18.480
So hopefully that happens really soon.

00:07:18.480 --> 00:07:23.480
But what was really surprising to me was just how long that migration is, right?

00:07:23.480 --> 00:07:30.700
It's not like a copy the files over, get in it, git commit or the equivalent of the for the issues.

00:07:30.700 --> 00:07:33.140
It's days to migrate all the issues.

00:07:33.140 --> 00:07:33.520
Yeah.

00:07:33.720 --> 00:07:35.360
So there's tricky parts to this.

00:07:35.360 --> 00:07:44.920
I mean, one is we're getting internal help from GitHub, but obviously it's not common to move issue trackers into GitHub per se.

00:07:44.920 --> 00:07:48.380
Like a lot of projects, I think, just start on GitHub and have for like a decade.

00:07:48.380 --> 00:07:52.080
So the idea of moving over is kind of a new thing.

00:07:52.080 --> 00:07:58.780
And on top of it, not very many projects have the volume of issues historically to move over that we have, right?

00:07:58.920 --> 00:08:02.800
Like we have like 7,000 open issues, I think, alone.

00:08:02.800 --> 00:08:08.740
So the volume there also kind of causes an extra overload.

00:08:08.740 --> 00:08:14.480
And because GitHub, as I said, they have some internal tooling for this, but it's not like something that they work on month over month.

00:08:14.480 --> 00:08:21.760
It's there and we're using it, but it's not optimized because it's just not a typical business concern, which I mean, totally makes sense, right?

00:08:21.760 --> 00:08:26.400
How often do you have a project of our size and age wanting to migrate over like this?

00:08:26.400 --> 00:08:32.040
Just for the numbers, so we have almost 59,000 bugs in total on the bug tracker.

00:08:32.040 --> 00:08:32.660
Yeah.

00:08:32.660 --> 00:08:34.520
And almost 8,000 open.

00:08:34.520 --> 00:08:34.900
Yeah.

00:08:34.900 --> 00:08:36.300
7,000 some hundred.

00:08:36.300 --> 00:08:36.800
Yeah.

00:08:36.800 --> 00:08:45.300
And trying to translate over as much metadata as possible is computationally expensive, right?

00:08:45.300 --> 00:08:48.340
Because what we have to do is we have to generate a dump and then the dump has to get...

00:08:48.340 --> 00:08:49.520
It's a different data model, right?

00:08:49.520 --> 00:08:51.140
And it's a different day model on top of it.

00:08:51.140 --> 00:08:51.440
Correct.

00:08:51.440 --> 00:09:02.320
So, for instance, one of the reasons this took so long was we had to first decide we wanted to do this, convince people that we should do it, find someone.

00:09:02.320 --> 00:09:07.380
It was at Summelade initially to come in and kind of figure out how to map things and get things working.

00:09:07.380 --> 00:09:15.220
And then earlier this year, we had Wukash step in and help out as well as the developer in residence to help push this over the finish line.

00:09:15.400 --> 00:09:24.660
And on top of all that, having to process all that data, export it to the right format, and then have GitHub's tools pull it in and not cause a strain on their system.

00:09:24.660 --> 00:09:30.080
Because, I mean, this is a lot of data to suddenly dump in and have to replicate across their entire cluster, right?

00:09:30.080 --> 00:09:32.300
So, there's a reason why it takes so long.

00:09:32.520 --> 00:09:35.020
And we also don't want to have it happen during...

00:09:35.020 --> 00:09:46.380
Because we're probably going to be run at a low process priority, which also means we want to do it on a Friday in the afternoon so that it's over the weekend and not when GitHub gets hit the hardest.

00:09:46.380 --> 00:09:48.360
So, there's a lot of coordination going on.

00:09:48.360 --> 00:09:51.540
And as we all know, GitHub had some stability issues the other week.

00:09:51.540 --> 00:09:58.240
And so, they just said, can we just wait until a little later to make sure that Sol's good and solid and everything looks good.

00:09:58.240 --> 00:09:59.800
So, the plan is April 1st.

00:09:59.800 --> 00:10:00.080
Excellent.

00:10:00.080 --> 00:10:00.720
Very exciting.

00:10:00.720 --> 00:10:04.520
And we also have a good track count to actually break GitHub.

00:10:04.520 --> 00:10:07.880
I'm not sure if anybody interviewed the live stream.

00:10:07.880 --> 00:10:13.900
Pablo's changed the master branch to main branch to rename the default branch.

00:10:13.900 --> 00:10:15.520
But, yeah, we broke GitHub.

00:10:15.520 --> 00:10:18.020
And it took a while to recover from that, too.

00:10:18.020 --> 00:10:20.500
So, since our repos are so gigantic.

00:10:20.500 --> 00:10:29.380
So, we started with ZVS, then moved to SVN, subversion, then went, recorded all this stuff to Mercurial,

00:10:29.380 --> 00:10:30.700
and then to Git.

00:10:30.700 --> 00:10:36.200
And I'm not sure how many revisions we have in the tip, but it's gigantic.

00:10:36.540 --> 00:10:41.320
So, just to be ultra clear here, thanks to GitHub for working with us directly.

00:10:41.320 --> 00:10:44.020
And actually, they donated money to help us make this all happen.

00:10:44.020 --> 00:10:46.640
So, they've been really great partners in all this.

00:10:46.640 --> 00:10:48.740
Thanks to Ezio for getting this started.

00:10:48.740 --> 00:10:52.380
Marietta for the initial pep, by the way, and even starting this conversation.

00:10:52.380 --> 00:10:56.060
And for Rukash to stepping in and helping get it finished.

00:10:56.140 --> 00:10:57.420
Yeah, definitely a team effort.

00:10:57.420 --> 00:10:59.220
A lot of people involved, and thanks to all of them.

00:10:59.220 --> 00:11:02.960
So, Tushar out in the audience is joking, is this why GitHub has been crashing the whole

00:11:02.960 --> 00:11:03.160
week?

00:11:03.160 --> 00:11:06.780
But, Christian, you were joking, like, maybe, is this actually, did you guys actually cause

00:11:06.780 --> 00:11:07.140
problems?

00:11:07.140 --> 00:11:08.640
Not that I know of, specifically.

00:11:08.640 --> 00:11:09.100
Yeah, okay.

00:11:09.260 --> 00:11:11.480
But I also, yeah, not that I know of.

00:11:11.480 --> 00:11:11.900
Yeah, okay.

00:11:11.900 --> 00:11:12.500
I hope not.

00:11:12.500 --> 00:11:14.260
I apologize to the world if we did, somehow.

00:11:14.260 --> 00:11:16.640
Well, it wouldn't be the first time.

00:11:16.640 --> 00:11:19.520
There's been other outages and other crazy things.

00:11:19.520 --> 00:11:19.800
Yeah.

00:11:19.800 --> 00:11:21.940
And unfortunately, at our sites, we would not be the first time.

00:11:21.940 --> 00:11:23.240
Yeah, for sure.

00:11:23.240 --> 00:11:27.520
I think there was a huge DDoS attack not too long ago.

00:11:27.520 --> 00:11:30.720
Anyway, also, Kim out in the audience asked, assuming there are usernames and email addresses

00:11:30.720 --> 00:11:31.700
on the original issue.

00:11:31.700 --> 00:11:36.660
So, like, how much did you all care about having fidelity across those?

00:11:36.860 --> 00:11:39.920
And, you know, this could have been an opportunity to just say, you know what's awesome?

00:11:39.920 --> 00:11:42.820
Command A, archive in your inbox.

00:11:42.820 --> 00:11:44.780
To just kind of catch up and be okay.

00:11:44.780 --> 00:11:46.860
Like, you could have just dropped it and said, we're just going to start over.

00:11:46.860 --> 00:11:48.520
And if it's important, it'll find its way here.

00:11:48.520 --> 00:11:49.880
And if it's not, then it wasn't.

00:11:49.880 --> 00:11:50.240
Yeah.

00:11:50.240 --> 00:11:52.380
I mean, there has been talk about this.

00:11:52.380 --> 00:11:57.700
There's varying opinions on how important the digital archives are.

00:11:57.700 --> 00:11:59.680
Like, do we need to move all the closed issues over?

00:11:59.680 --> 00:12:00.920
Should we only move open?

00:12:00.920 --> 00:12:05.540
Like, we actually discussed this when we were looking at potentially up to a week to do the

00:12:05.540 --> 00:12:08.620
migration versus the two or three days it's actually going to take now.

00:12:08.620 --> 00:12:12.780
So, but everyone has different opinions of how important the history is.

00:12:12.780 --> 00:12:16.680
To specifically answer the question, though, from the audience about usernames, as long as

00:12:16.680 --> 00:12:21.780
you have your GitHub username attached to your bugs.python.org account, that should map over.

00:12:21.780 --> 00:12:24.160
And you've got until April 1st to get it in there?

00:12:24.160 --> 00:12:24.600
Yeah.

00:12:24.620 --> 00:12:28.340
I don't remember if we map email to email.

00:12:28.340 --> 00:12:30.220
There might be some privacy issues.

00:12:30.220 --> 00:12:31.600
I can't remember where that all landed.

00:12:31.600 --> 00:12:33.040
Like, lawyers were consulted.

00:12:33.040 --> 00:12:35.000
And I was out of the loop on those.

00:12:35.000 --> 00:12:40.420
But I believe if you at least have specified your GitHub username on bugs.python.org, we will be able to do the map.

00:12:40.420 --> 00:12:40.640
Yeah.

00:12:40.640 --> 00:12:41.340
Fantastic.

00:12:41.340 --> 00:12:42.220
All right.

00:12:42.220 --> 00:12:43.660
Well, thank you both for the update on that.

00:12:43.660 --> 00:12:45.900
It's not exactly why we're here, but it's so timely.

00:12:46.080 --> 00:12:49.020
And I think, you know, you're both involved in it and stuff like that.

00:12:49.020 --> 00:12:50.740
So quite cool to see it coming along.

00:12:50.740 --> 00:12:55.420
I personally really think that it's fantastic that CPython is on GitHub.

00:12:55.420 --> 00:13:02.120
I know it's not that different if it was, say, self-hosted Git or GitLab or even Mercurial or SVN.

00:13:02.120 --> 00:13:04.000
But there's just something about it.

00:13:04.000 --> 00:13:12.940
It seems more open to contributors given just sort of the status of GitHub where a lot of people seem to hang out and the whole PR flow and those kinds of things.

00:13:12.940 --> 00:13:13.920
That was part of the motivation.

00:13:14.320 --> 00:13:18.440
Somewhat ironically, we actually had to teach a bunch of core devs how to use GitHub as part of the migration.

00:13:18.440 --> 00:13:23.260
Because, I mean, to be fair, some decent chunk of the core devs don't contribute to other open source.

00:13:23.260 --> 00:13:27.180
I mean, Python alone is a big enough of a project that it absorbs a large chunk of your time.

00:13:27.180 --> 00:13:34.340
So they just didn't have to know how to do any other open source development for a different project other than however Python did it.

00:13:34.340 --> 00:13:36.620
And if we weren't on GitHub, they just didn't have a need to.

00:13:36.620 --> 00:13:39.960
Plus, we also did the move a while ago.

00:13:39.960 --> 00:13:42.620
So I think it's coming close to a decade at this point.

00:13:42.900 --> 00:13:44.340
So it was also a different time.

00:13:47.220 --> 00:13:50.880
This is a great question of Talk Python To Me is brought to you by Microsoft for Startups Founders Hub.

00:13:50.880 --> 00:13:52.960
Starting a business is hard.

00:13:52.960 --> 00:13:57.900
By some estimates, over 90% of startups will go out of business in just their first year.

00:13:57.900 --> 00:14:07.360
With that in mind, Microsoft for Startups set out to understand what startups need to be successful and to create a digital platform to help them overcome those challenges.

00:14:07.800 --> 00:14:10.060
Microsoft for Startups Founders Hub was born.

00:14:10.060 --> 00:14:16.720
Founders Hub provides all founders at any stage with free resources to solve their startup challenges.

00:14:16.720 --> 00:14:25.320
The platform provides technology benefits, access to expert guidance and skilled resources, mentorship and networking connections, and much more.

00:14:25.840 --> 00:14:34.880
Unlike others in the industry, Microsoft for Startups Founders Hub doesn't require startups to be investor-backed or third-party validated to participate.

00:14:34.880 --> 00:14:37.600
Founders Hub is truly open to all.

00:14:37.600 --> 00:14:39.100
So what do you get if you join them?

00:14:39.460 --> 00:14:47.380
You speed up your development with free access to GitHub and Microsoft Cloud computing resources and the ability to unlock more credits over time.

00:14:47.380 --> 00:14:57.100
To help your startup innovate, Founders Hub is partnering with innovative companies like OpenAI, a global leader in AI research and development, to provide exclusive benefits and discounts.

00:14:57.780 --> 00:15:02.520
Through Microsoft for Startups Founders Hub, becoming a founder is no longer about who you know.

00:15:02.520 --> 00:15:16.060
You'll have access to their mentorship network, giving you a pool of hundreds of mentors across a range of disciplines and areas like idea validation, fundraising, management and coaching, sales and marketing, as well as specific technical stress points.

00:15:16.060 --> 00:15:21.280
You'll be able to book a one-on-one meeting with the mentors, many of whom are former founders themselves.

00:15:21.280 --> 00:15:26.420
Make your idea a reality today with the critical support you'll get from Founders Hub.

00:15:26.540 --> 00:15:32.380
To join the program, just visit talkpython.fm/founders hub, all one word, no links in your show notes.

00:15:32.380 --> 00:15:34.700
Thank you to Microsoft for supporting the show.

00:15:34.700 --> 00:15:47.880
So let's start by maybe talking about, speaking at different times, let's talk about the standard library from, maybe you guys could approach it from a historical perspective to start.

00:15:47.880 --> 00:15:54.880
Because we're going to focus on stuff that's in there that maybe should be removed and the benefits of taking it out and stuff.

00:15:54.880 --> 00:15:57.400
But when it got put in, it seemed like a good idea.

00:15:57.400 --> 00:16:05.280
So when I think about Python, one of the key phrases I hear, I don't know its origin, but the batteries included story, right?

00:16:05.280 --> 00:16:09.820
Python comes with batteries included and then its frameworks did like Django and so on.

00:16:09.820 --> 00:16:11.960
And it's a huge selling point, right?

00:16:11.960 --> 00:16:15.520
This is a language that has a bunch of support built in, right?

00:16:15.720 --> 00:16:21.780
Yeah, so the rough history, for those who don't know, Python went public February of 1991, right?

00:16:21.780 --> 00:16:26.300
So 32 years ago, it's predates Linux, right?

00:16:26.300 --> 00:16:30.360
Like it's really crazy when you look at the history of when projects came out, how long Python's been around.

00:16:30.720 --> 00:16:36.340
But the other thing to think about is who was on the internet or the World Wide Web even in 1991?

00:16:36.340 --> 00:16:40.840
Like who even had internet or even a modem back then?

00:16:40.840 --> 00:16:48.540
And so what that led to was people contributing things to Python that Guido would look at and go, oh, yeah, that's useful.

00:16:48.540 --> 00:16:50.580
And then just pull it in and put it in the standard library.

00:16:50.820 --> 00:16:52.060
And it grew and grew and grew.

00:16:52.060 --> 00:17:04.640
And then at some point in the 90s, like there was a website called the Vaults of Parnassus, which had animated GIFs of wall sconces with little candles with the flickering, whatever, like totally a bit like you can imagine what this is like.

00:17:04.640 --> 00:17:06.680
It's back in GeoCities days, right?

00:17:06.680 --> 00:17:08.460
And that's where you went to get your code.

00:17:08.460 --> 00:17:10.700
And all it was was zip files of Python code.

00:17:10.700 --> 00:17:14.840
There's no concept of wheels or conda packages or anything like this.

00:17:15.060 --> 00:17:22.360
There were literally just zip files of code that you just unpacked and just copied over the directory that contained the other Python code.

00:17:22.360 --> 00:17:24.200
And you just vendored everything.

00:17:24.200 --> 00:17:26.320
There was no there was nothing else.

00:17:26.320 --> 00:17:29.080
And stuff moving stuff around the internet was slow as well back then.

00:17:29.080 --> 00:17:30.600
I mean, a lot of people were on dial up.

00:17:30.600 --> 00:17:30.900
Yeah.

00:17:30.900 --> 00:17:32.840
Like internet made noise back then.

00:17:32.840 --> 00:17:36.440
You were blazing fast with your 56k modem if you were lucky enough to have that, right?

00:17:36.440 --> 00:17:44.120
So that meant that it was really hard to find high quality code out there, right?

00:17:44.120 --> 00:17:46.960
And getting done and put up and all that.

00:17:46.960 --> 00:17:49.940
So things just kept getting added and added to the standard library.

00:17:49.940 --> 00:17:52.140
And it kept getting bigger and bigger and continued to be useful.

00:17:52.140 --> 00:17:54.500
And it was just a different time, right?

00:17:54.500 --> 00:17:59.480
Like, hell, not even everyone in the internet even had a web browser, right?

00:17:59.480 --> 00:18:00.880
Like I remember when I first got on the internet.

00:18:00.880 --> 00:18:01.160
Right.

00:18:01.160 --> 00:18:04.780
I mean, didn't Mosaic come out in 93?

00:18:04.780 --> 00:18:05.460
Yeah.

00:18:05.460 --> 00:18:10.760
And actually, one of the very first graphical web browsers was Grail written by Guido in Python, right?

00:18:10.760 --> 00:18:12.360
Like if you go look up the history, right?

00:18:12.360 --> 00:18:17.380
It was like, I think Guido missed being the first graphical browser for like months or something crazy.

00:18:17.380 --> 00:18:21.100
There's a weird history in Python in terms of early web.

00:18:21.100 --> 00:18:23.300
But what this all led to, right?

00:18:23.300 --> 00:18:27.280
Like, and I remember, by the way, when I first got on the internet, it was Usenet and Gopher.

00:18:27.280 --> 00:18:29.060
It wasn't even the worldwide web, right?

00:18:29.100 --> 00:18:34.160
That was still AOL days back then, for those of you who can date yourself based on that knowledge.

00:18:34.160 --> 00:18:34.960
Usenet, Gopher.

00:18:34.960 --> 00:18:37.380
Yeah, it was a different time, Michael.

00:18:37.380 --> 00:18:38.760
It was a bit of a sidebar.

00:18:38.760 --> 00:18:41.280
Like, things were so basic back then.

00:18:41.280 --> 00:18:45.780
But at the same time, there was so much like imagination for what could be, I think.

00:18:45.780 --> 00:18:47.800
Because so much of it was unmaterialized.

00:18:47.800 --> 00:18:49.560
And you're like, ah, I can see where this is going to go.

00:18:49.560 --> 00:18:49.800
Yeah.

00:18:49.800 --> 00:18:52.480
And internet was even much more expensive in Germany.

00:18:52.480 --> 00:18:57.940
So I know that until, so I was lucky, I went to university in 2000.

00:18:57.940 --> 00:19:03.500
But before, when I was living with my parents, I had to pay the internet by the minute.

00:19:03.500 --> 00:19:07.280
So local calls, so we're not free in Germany.

00:19:07.280 --> 00:19:08.620
You had to pay for them.

00:19:08.620 --> 00:19:12.820
And I know that like end of 99, I was lucky.

00:19:12.820 --> 00:19:22.560
I paid like several hundred a month to have like a free, like a persistent internet connection.

00:19:22.560 --> 00:19:23.200
Very persistent.

00:19:23.200 --> 00:19:26.580
But I used the only phone line we had, but I didn't have to pay by the minute.

00:19:26.580 --> 00:19:28.480
But I paid like in bulk.

00:19:28.480 --> 00:19:28.700
Right.

00:19:28.700 --> 00:19:30.120
It's super expensive.

00:19:30.120 --> 00:19:32.520
That's why lots of people.

00:19:32.520 --> 00:19:35.560
So I started actually using mailboxes.

00:19:35.560 --> 00:19:37.120
So I dialed in mailboxes.

00:19:37.120 --> 00:19:37.760
Right.

00:19:37.760 --> 00:19:40.860
And they're like this weird concept that you were sending messages.

00:19:40.860 --> 00:19:45.780
You push the message and later in the night, the mailboxes would call other mailboxes.

00:19:45.780 --> 00:19:49.640
They do this Unix, Unix copy to copy the like the messages around.

00:19:49.640 --> 00:19:53.680
And next day you receive the message from a friend who was living like in a different city.

00:19:53.680 --> 00:19:53.940
Yeah.

00:19:53.940 --> 00:19:54.840
I remember that was amazing.

00:19:54.840 --> 00:19:57.300
Like all the backends that would just kind of sync up.

00:19:57.300 --> 00:20:01.480
And it was like sort of this distributed, like the PBS world and some of the other stuff.

00:20:01.480 --> 00:20:01.680
Yeah.

00:20:01.680 --> 00:20:08.820
So it made a lot of sense back in the days to have all the useful bits and pieces in Python.

00:20:08.820 --> 00:20:11.380
So that's why the library was so big.

00:20:11.380 --> 00:20:13.700
And so we have just Python code.

00:20:13.700 --> 00:20:14.280
It was easy.

00:20:14.280 --> 00:20:17.760
But we also have lots of C code and C extension.

00:20:17.760 --> 00:20:20.960
And these were really complicated to compile and build.

00:20:20.960 --> 00:20:25.560
So you had to like make files and figure out which compilers and libraries you need.

00:20:25.560 --> 00:20:33.760
And building things for Windows was super painful for the Windows people that they had to get the right compiler version.

00:20:34.200 --> 00:20:37.440
They had to figure out their VC vars bat setup.

00:20:37.440 --> 00:20:37.840
Yeah.

00:20:37.840 --> 00:20:42.700
And each Python version had like its requirements for different like Visual Studio versions.

00:20:42.700 --> 00:20:43.400
Yeah.

00:20:43.400 --> 00:20:47.200
So I think that's, you know, people get a sense of the time, right?

00:20:47.200 --> 00:20:55.720
Like at that time, it was amazing for Python to say, as much as we can get into the standard library, it's going to be a benefit to people.

00:20:55.720 --> 00:21:02.680
Because if you need to parse CSS color codes, hex color codes, and it's built in, that's a bonus, right?

00:21:02.680 --> 00:21:07.360
There's not the idea of pip and fast internet and all those things, right?

00:21:07.360 --> 00:21:08.620
Or even disk details, right?

00:21:08.620 --> 00:21:11.320
Like as Christian was saying, compilation was hard enough as it is.

00:21:11.320 --> 00:21:16.880
So getting something in the standard library and ported over to C code for performance was a huge deal.

00:21:16.880 --> 00:21:19.100
So it's not even just distribution.

00:21:19.100 --> 00:21:21.640
It was literally just creating these things.

00:21:21.640 --> 00:21:22.780
It was difficult.

00:21:22.780 --> 00:21:23.020
Sure.

00:21:23.020 --> 00:21:25.060
So it just shows how far we've come, right?

00:21:25.060 --> 00:21:27.040
That these were even problems that we used to have.

00:21:27.040 --> 00:21:27.320
Yeah.

00:21:27.320 --> 00:21:28.460
It's pretty interesting.

00:21:28.700 --> 00:21:39.520
Do you think if Python were designed today from scratch, you know, this is the kind of the language we want, it would be packaged in the same way that it is now?

00:21:39.520 --> 00:21:42.220
Like, would it have a large standard library?

00:21:42.220 --> 00:21:42.600
No.

00:21:42.600 --> 00:21:43.860
So that would be controversial.

00:21:43.860 --> 00:21:45.960
I agree with Brett.

00:21:45.960 --> 00:21:46.340
Yeah.

00:21:46.340 --> 00:21:46.780
Yeah.

00:21:46.780 --> 00:21:50.480
Well, which is why we're friends and why we wrote this pet that we're going to be talking about.

00:21:50.480 --> 00:21:52.100
It would just all be written in WebAssembly.

00:21:52.100 --> 00:21:54.420
Oh, we have friends.

00:21:54.420 --> 00:21:54.960
Thank you.

00:21:56.160 --> 00:21:59.280
We went to a movie together, one of the PyCons of Portland, man.

00:21:59.280 --> 00:21:59.560
Yeah.

00:21:59.560 --> 00:22:02.220
And we are friends on Nintendo Network.

00:22:02.220 --> 00:22:03.460
Yes, on Switch.

00:22:03.460 --> 00:22:03.780
Yes.

00:22:03.780 --> 00:22:05.100
Yeah.

00:22:05.100 --> 00:22:07.860
Look at more recent languages like Rust and Go and stuff.

00:22:07.860 --> 00:22:10.420
They have a much more targeted standard library.

00:22:10.420 --> 00:22:13.180
They're able to lean on the community and people seem fine with it.

00:22:13.180 --> 00:22:17.960
And I think that's a key thing is we get to learn the less.

00:22:17.960 --> 00:22:20.280
People have gotten to learn lessons from us, but we also can learn.

00:22:20.280 --> 00:22:23.460
We would have been able if we started now to learn lessons from other people.

00:22:23.580 --> 00:22:28.300
And I think that'd be one of them is targeted standard library that is very tight and very

00:22:28.300 --> 00:22:30.480
targeted, very foreign, very stable.

00:22:30.480 --> 00:22:34.860
And that's much easier to maintain would probably be the good way to go.

00:22:34.860 --> 00:22:38.840
Because it makes getting yourself up and going a lot easier versus, oh, this isn't useful

00:22:38.840 --> 00:22:43.440
until I have this huge standard library, which as a burgeoning project would have been really

00:22:43.440 --> 00:22:46.580
difficult because you had to build a lot of code to make that happen.

00:22:46.580 --> 00:22:46.800
Right.

00:22:47.280 --> 00:22:50.440
I do value having it there, though, at the same time.

00:22:50.440 --> 00:22:52.200
I understand why it would be smaller.

00:22:52.200 --> 00:22:56.420
I just think there would be some use cases that it would be less of an obvious choice to

00:22:56.420 --> 00:22:56.880
use Python.

00:22:56.880 --> 00:23:01.760
Like, for example, if I just want to script something on my computer, knowing that it has

00:23:01.760 --> 00:23:08.360
Python means it has all these libraries where as opposed to if you've got to start installing

00:23:08.360 --> 00:23:13.360
dependencies just to get your sort of automation scripts to run, like there's this bootstrapping

00:23:13.360 --> 00:23:14.260
stuff that has to happen.

00:23:14.260 --> 00:23:18.420
Yeah, from a philosophical perspective, we actually don't have a definition of what the

00:23:18.420 --> 00:23:20.440
standard library is, right?

00:23:20.440 --> 00:23:21.600
There is no PEP.

00:23:21.600 --> 00:23:26.500
There is no guidance over what the standard library is now meant for, what it should or

00:23:26.500 --> 00:23:27.180
shouldn't have.

00:23:27.180 --> 00:23:28.680
It simply doesn't exist.

00:23:28.680 --> 00:23:32.480
It's always been previously based on Guido's opinion somewhat.

00:23:32.480 --> 00:23:38.080
And then now that's the steering council, it's somewhat based on just kind of consensus on

00:23:38.080 --> 00:23:38.900
the dev team.

00:23:38.900 --> 00:23:42.360
And that's kind of what the steering council will approve more or less.

00:23:42.360 --> 00:23:44.200
But there is no guidance, right?

00:23:44.200 --> 00:23:49.120
Like, should we make it so that, as you said, that simple automation script for managing

00:23:49.120 --> 00:23:50.380
your computer?

00:23:50.380 --> 00:23:54.640
Should that be, have enough in the standard library to make that happen?

00:23:54.640 --> 00:23:59.060
Should we be able to have a simple HTTP server?

00:23:59.060 --> 00:23:59.400
Right.

00:23:59.400 --> 00:24:00.060
I don't know.

00:24:00.060 --> 00:24:01.620
Should we have Tkinter?

00:24:01.620 --> 00:24:02.220
Right.

00:24:02.220 --> 00:24:03.600
Where is the line?

00:24:03.600 --> 00:24:06.520
And we don't have an answer right now.

00:24:06.760 --> 00:24:12.180
There is a discussion going on right now, actually over on Python Dev discussing this kind of

00:24:12.180 --> 00:24:15.860
thing because there was a proposal to potentially rip out URL Lib.

00:24:15.860 --> 00:24:20.500
I think it was partially done by Victor Center to kind of not get a rise out of people, but

00:24:20.500 --> 00:24:21.820
to kind of spark a conversation.

00:24:21.820 --> 00:24:28.540
And some people are going like, okay, URL Lib was written back in the day when OSes did not

00:24:28.540 --> 00:24:30.080
necessarily ship with the network stack.

00:24:30.540 --> 00:24:30.860
Right.

00:24:30.860 --> 00:24:32.380
And when we could plug into it.

00:24:32.380 --> 00:24:34.600
Would it be better to actually rely on the OS?

00:24:34.600 --> 00:24:35.040
Right.

00:24:35.040 --> 00:24:39.440
Do we really have to have all of that code in there just to parse things and figure things

00:24:39.440 --> 00:24:43.900
out to make the right HTTP requests versus just going to macOS or going to Windows or using

00:24:43.900 --> 00:24:49.300
curl and Linux or any Unix platform really, and just have it handle the request?

00:24:49.300 --> 00:24:50.200
I don't know.

00:24:50.200 --> 00:24:53.180
But I mean, this is the kind of question we're getting into now.

00:24:53.180 --> 00:24:56.780
And we'll probably get to, I mean, we'll talk about later.

00:24:56.780 --> 00:25:01.000
I have one of my infamous Brett's grand plan things around the standard library.

00:25:01.000 --> 00:25:06.700
And this all ties into actually finally into making that decision of what do we want the

00:25:06.700 --> 00:25:07.620
standard library to be?

00:25:07.620 --> 00:25:11.200
So we have better guidance for ourselves as to where it should go.

00:25:11.200 --> 00:25:13.320
And that's what should or should not be in the standard library.

00:25:13.320 --> 00:25:17.060
Now, not to spook people, I don't know if this means we never deprecate anything that

00:25:17.060 --> 00:25:18.700
doesn't follow this policy that's in there now.

00:25:18.960 --> 00:25:24.760
But I would like to, at least as a core dev, know what we want it to be for today compared

00:25:24.760 --> 00:25:31.640
to the cheap shipment model of useful Python code on the internet, pre-internet.

00:25:31.640 --> 00:25:31.880
Right.

00:25:31.880 --> 00:25:35.480
So, and Michael, earlier you asked me about security bugs.

00:25:35.480 --> 00:25:42.020
And so Victor's proposal or Victor's threat on Python dev sparked by a discussion I had

00:25:42.020 --> 00:25:49.340
with Victor on internal communication channels where I pointed out that ULLIP is actually a

00:25:49.340 --> 00:25:52.320
place where we have lots of security bugs.

00:25:52.320 --> 00:25:58.520
And even in very trivial things like to insert like parsing like in URL.

00:25:58.520 --> 00:26:02.940
So something like splitting up the protocol, the host, the path name, the suffix.

00:26:03.100 --> 00:26:05.100
This is not trivial.

00:26:05.100 --> 00:26:13.520
And the way how our internal like parser works, it's written for a more forgiving and more open

00:26:13.520 --> 00:26:14.120
world.

00:26:14.120 --> 00:26:23.020
But people also use the routines, the like real open URL parse to verify and validate potential

00:26:23.020 --> 00:26:27.920
hostile requests that sometimes fails because we are too open.

00:26:27.920 --> 00:26:28.700
We are too nice.

00:26:29.500 --> 00:26:33.660
And so this was one of the other reasons why the discussion should spark.

00:26:33.660 --> 00:26:38.300
It's also a bit related to WebAssembly, but I think we can postpone it for later.

00:26:38.300 --> 00:26:43.860
But there are two interesting interactions with how WebAssembly or the WebAssembly runtimes

00:26:43.860 --> 00:26:46.940
environments work and what's not going to work with ULLIP.

00:26:46.940 --> 00:26:47.300
Yeah.

00:26:47.300 --> 00:26:51.720
And the WebAssembly discussion also comes back to what Brett was talking about for sure just

00:26:51.720 --> 00:26:52.180
a minute ago.

00:26:52.180 --> 00:26:54.960
So defining what is the standard library.

00:26:54.960 --> 00:26:58.780
Do you want to come back as well to that later?

00:26:58.780 --> 00:27:01.400
But let's talk about your PEP.

00:27:01.400 --> 00:27:03.080
Which one of you wants to introduce?

00:27:03.080 --> 00:27:07.700
PEP 594, removing dead batteries from the Python standard library.

00:27:07.700 --> 00:27:08.840
Christian is the original author.

00:27:08.840 --> 00:27:11.020
I just PM'd it to the finish line.

00:27:11.020 --> 00:27:12.160
So I'll let Christian take this.

00:27:12.160 --> 00:27:13.040
Yeah.

00:27:13.040 --> 00:27:15.760
I ran out of steam and Brett just pushed and pushed it.

00:27:15.760 --> 00:27:18.300
Helped me to push it over the finish line.

00:27:18.300 --> 00:27:18.560
Yeah.

00:27:18.560 --> 00:27:19.280
So what's the idea here?

00:27:19.280 --> 00:27:27.140
The idea here is to remove things that are in our personal opinion and maybe with some

00:27:27.140 --> 00:27:31.300
reasoning no longer like super required in the modern world.

00:27:31.300 --> 00:27:37.540
So there are especially some parts that cost us lots of time and energy.

00:27:38.060 --> 00:27:41.320
The interesting or the most relevant library for that is like NNTP.

00:27:41.320 --> 00:27:48.520
So the library to interact with new servers that we've got your information.

00:27:48.520 --> 00:27:49.400
Like Usenet?

00:27:49.400 --> 00:27:49.820
Usenet.

00:27:49.820 --> 00:27:50.060
Yeah.

00:27:50.060 --> 00:27:50.880
Usenet.

00:27:50.880 --> 00:27:57.220
So since we don't have a server implementation of NNTP, so the use standards, only the client

00:27:57.220 --> 00:28:03.060
libraries, we need to use like actual new servers for testing.

00:28:03.060 --> 00:28:05.700
So we need to connect to some servers and do some testing.

00:28:05.700 --> 00:28:08.420
These servers are no longer like stable.

00:28:08.420 --> 00:28:16.680
So we used to use libraries like sites like Gmain a lot or one French new server that was

00:28:16.680 --> 00:28:21.440
stable, but they're sometimes don't work like we expect it to work.

00:28:21.440 --> 00:28:26.380
They're sometimes just not available or the NTP connection fail or get like issues with

00:28:26.380 --> 00:28:27.260
GLS connections.

00:28:27.260 --> 00:28:31.440
And these issues we're having blocked our whole CI chain.

00:28:31.440 --> 00:28:40.400
So when you do pull requests, you run your tests against Windows and Linux on X664 and

00:28:40.400 --> 00:28:42.460
on also MacOS.

00:28:42.460 --> 00:28:45.220
So like think for platforms.

00:28:45.220 --> 00:28:50.240
But once your pull requests is merged, it also kicks off the whole build bot farm.

00:28:50.240 --> 00:28:55.960
There are like 20, 30, 40 different platforms that run the tests host commit.

00:28:55.960 --> 00:29:03.580
Anytime one of the NNTP servers had a hiccup, we have like false alarms and like indicating

00:29:03.580 --> 00:29:08.320
problems somewhere which were not problems with the code or with the test, but rather with

00:29:08.320 --> 00:29:10.020
the infrastructure that was failing.

00:29:10.020 --> 00:29:14.500
And it was one of the motivations while I wanted to remove an NNTP.

00:29:14.500 --> 00:29:14.880
Sure.

00:29:14.880 --> 00:29:17.840
And how often are people depending on that these days?

00:29:17.840 --> 00:29:18.940
One.

00:29:18.940 --> 00:29:19.360
Two.

00:29:19.360 --> 00:29:20.580
Who's maintaining it?

00:29:20.580 --> 00:29:24.540
There was a really interesting list you all have of like, these are the things we want to

00:29:24.540 --> 00:29:25.500
consider to remove.

00:29:25.500 --> 00:29:28.360
There is somebody who understands and maintains it now.

00:29:28.360 --> 00:29:30.860
A lot of them have a no for that, right?

00:29:30.860 --> 00:29:31.120
Yep.

00:29:31.480 --> 00:29:32.900
That's another aspect of this, right?

00:29:32.900 --> 00:29:38.540
It wasn't, it was things that were failing our test suite because the thing we had to rely

00:29:38.540 --> 00:29:41.100
on just wasn't stable enough or available.

00:29:41.100 --> 00:29:48.900
But our parts were just simply no one wanted to step forward and say, I will make sure that

00:29:48.900 --> 00:29:53.980
this keeps working in modern versions of Python and compiler errors are dealt with.

00:29:53.980 --> 00:29:57.480
And I will deal with any feature requests and bug reports and all that.

00:29:58.200 --> 00:29:58.320
Right.

00:29:58.320 --> 00:30:04.160
Because the standard library before this PEP was more, had numerically more modules than

00:30:04.160 --> 00:30:05.260
there are countries in the world.

00:30:05.260 --> 00:30:06.180
Right.

00:30:06.180 --> 00:30:08.000
Like the standard library is that vast.

00:30:08.000 --> 00:30:12.820
And I think, I don't even remember if I even delved into sub sub modules of packages.

00:30:12.820 --> 00:30:14.560
Like I think literally the top level namespace.

00:30:14.560 --> 00:30:15.020
Top level.

00:30:15.020 --> 00:30:15.260
Yeah.

00:30:15.260 --> 00:30:21.660
So there is a aspect here of maintainability of just simply, there are only so many core

00:30:21.660 --> 00:30:24.140
devs to handle the influx.

00:30:24.140 --> 00:30:27.340
Hence why we have 1,600 pull requests that are currently open.

00:30:27.780 --> 00:30:33.100
And at some point you just have to kind of stop and go like, okay, who is benefiting from

00:30:33.100 --> 00:30:34.080
us carrying this forward?

00:30:34.080 --> 00:30:37.960
And how much of a detriment is it to the project to keep it going?

00:30:37.960 --> 00:30:43.380
And some of these things, yeah, it was just a question of, right, is this useful enough

00:30:43.380 --> 00:30:47.680
to the world for us to put the effort into maintaining it and having to make a call on some of them?

00:30:47.680 --> 00:30:49.160
And sometimes no one stepped forward.

00:30:49.160 --> 00:30:52.840
And sometimes some people very much stepped forward and said, I totally rely on this.

00:30:53.060 --> 00:30:58.060
And then it became a question that's like, okay, is it just you that needs it?

00:30:58.060 --> 00:31:03.480
Or is it a large or decent enough size chunk of the community that still needed it that

00:31:03.480 --> 00:31:05.440
it warranted keeping around and continuing to support it?

00:31:05.440 --> 00:31:11.760
Because I did a number crunch the other day of certain sub directories in the Git repo.

00:31:12.300 --> 00:31:19.760
And if you look at just straight code between the standard library and the interpreter, 60%

00:31:19.760 --> 00:31:21.060
of that is standard library.

00:31:21.060 --> 00:31:21.380
Wow.

00:31:21.380 --> 00:31:21.680
Yeah.

00:31:21.680 --> 00:31:27.980
How much does it influence your feeling and opinion about something, whether it has some

00:31:27.980 --> 00:31:30.300
C component or if it's just pure Python?

00:31:30.760 --> 00:31:35.420
Is it easier to keep a pure Python thing around that just is sort of higher level, doesn't

00:31:35.420 --> 00:31:38.320
require as much nuance, or does it not really matter?

00:31:38.320 --> 00:31:41.840
At least for this PEP, I don't think we really took that view specifically.

00:31:41.840 --> 00:31:45.940
The management is more just a side effect almost.

00:31:45.940 --> 00:31:49.660
But this was mainly, as the title puts it, dead batteries.

00:31:49.660 --> 00:31:54.220
So when Christian brought this list up initially, it was, I don't think these are useful in modern

00:31:54.220 --> 00:31:55.340
times.

00:31:55.960 --> 00:31:59.920
Less than, oh, well, this is also written in extension modules, which makes it harder

00:31:59.920 --> 00:32:04.460
to maintain because you can't just ask an average Python developer to come in and help maintain

00:32:04.460 --> 00:32:04.640
it.

00:32:04.640 --> 00:32:09.580
You have to ask someone who knows Python and C extension modules to come in and help maintain

00:32:09.580 --> 00:32:09.800
it.

00:32:09.800 --> 00:32:11.620
It was, that was never the motivation directly.

00:32:11.620 --> 00:32:11.960
Okay.

00:32:11.960 --> 00:32:12.520
Yeah.

00:32:12.520 --> 00:32:17.740
But knowing cross-platform networking code in C is, is technically, I would say, harder than

00:32:17.740 --> 00:32:18.500
knowing standard Python.

00:32:18.500 --> 00:32:18.920
Oh, yeah.

00:32:18.920 --> 00:32:24.160
This portion of Talk Python To Me is brought to you by Fusion Auth.

00:32:24.160 --> 00:32:30.100
Fusion Auth is an authentication and authorization platform built by devs for devs.

00:32:30.100 --> 00:32:35.140
It solves the problem of building essential user security without adding risk or distracting

00:32:35.140 --> 00:32:36.540
from the primary application.

00:32:36.540 --> 00:32:41.760
Fusion Auth has all the features you need with great support and a price that won't break the

00:32:41.760 --> 00:32:42.000
bank.

00:32:42.000 --> 00:32:48.200
And you can either self-host it or get the fully managed solution hosted in any AWS region.

00:32:48.200 --> 00:32:53.040
Do you have a side project that needs custom login and registration, multi-factor authentication,

00:32:53.040 --> 00:32:55.080
social logins, or user management?

00:32:55.080 --> 00:32:58.340
Download Fusion Auth Community Edition for free.

00:32:58.340 --> 00:33:04.120
The best part is you get unlimited users and there's no credit card or subscription required.

00:33:04.120 --> 00:33:09.380
Learn more and get started at talkpython.fm/Fusion Auth.

00:33:09.380 --> 00:33:10.880
The links in your show notes.

00:33:11.480 --> 00:33:13.620
Thank you to Fusion Auth for supporting the show.

00:33:13.620 --> 00:33:16.700
Let's first talk about the status.

00:33:16.700 --> 00:33:17.920
So, accepted.

00:33:17.920 --> 00:33:18.660
All right.

00:33:18.660 --> 00:33:19.320
So, this is happening.

00:33:19.320 --> 00:33:24.920
The first PR to document the modules being removed got committed last week.

00:33:24.920 --> 00:33:30.060
And I now, now you all get to see the curtain pulled behind how Python is developed.

00:33:30.200 --> 00:33:34.200
I'm going to publicly ask Christian to review my PR to deprecate AIFC.

00:33:34.200 --> 00:33:35.740
I know he's busy, so.

00:33:35.740 --> 00:33:40.180
But the first PR to actually, or maybe he reviewed it before the podcast.

00:33:40.180 --> 00:33:40.600
I don't know.

00:33:40.600 --> 00:33:46.100
But the first PR to actually deprecate AIFC, the first module in alphabetical order is now up.

00:33:46.100 --> 00:33:49.680
So, I'll just be cranking through them until beta.

00:33:49.920 --> 00:33:55.640
I feel like I saw in the release notes here that the Python 310.4 was out.

00:33:55.640 --> 00:33:59.300
And this has deprecated various modules according to this PEP.

00:33:59.300 --> 00:33:59.740
Is that right?

00:33:59.740 --> 00:34:00.200
Yeah.

00:34:00.200 --> 00:34:09.300
So, the steering council made the decision that it was useful enough to backport the documentation deprecation.

00:34:09.300 --> 00:34:14.300
So, Python 311, obviously, because that's going to raise a deprecation warning.

00:34:14.300 --> 00:34:19.180
But 310 and 3.9 also document that these modules are deprecated.

00:34:19.260 --> 00:34:24.620
Because we didn't want people coming in in a company where they're on 3.9 at the moment,

00:34:24.620 --> 00:34:30.660
start using these modules, and then be surprised in two years' time or what have you when they upgrade to 3.11 or later.

00:34:30.660 --> 00:34:33.360
And suddenly, oh, this thing I've been using is suddenly deprecated.

00:34:33.360 --> 00:34:35.220
Oh, this went back farther than 3.10, huh?

00:34:35.220 --> 00:34:35.680
Mm-hmm.

00:34:35.680 --> 00:34:37.460
Because 3.9 is still accepting bug fixes.

00:34:37.460 --> 00:34:37.880
Got it.

00:34:37.880 --> 00:34:39.200
So, that's what that means.

00:34:39.200 --> 00:34:40.200
It's purely documentation.

00:34:40.200 --> 00:34:41.540
The code is not changed at all.

00:34:41.540 --> 00:34:46.600
It is literally just, if you go to the module index or any of these modules,

00:34:46.700 --> 00:34:49.320
it will just have a big deprecated term on it.

00:34:49.320 --> 00:34:49.420
Yeah.

00:34:49.420 --> 00:34:52.620
Quick bit of nomenclature, real-time follow-up.

00:34:52.620 --> 00:34:56.500
Mr. Hypermagnetic says, what is pure Python if not CPython?

00:34:56.500 --> 00:35:01.680
Christian, you want to sort of disambiguate the CPython from Python that has C?

00:35:01.680 --> 00:35:11.340
So, in Python, we have models that don't have, like, dedicated C models that are just written in Python code.

00:35:11.340 --> 00:35:16.800
There are other models that have a minotary backend in C.

00:35:16.800 --> 00:35:22.680
Like, if you look at the SSL model, which I maintain, the binding still must have written in C.

00:35:22.680 --> 00:35:28.680
And the public-facing SSL model is FSA and adds on top of the C backend.

00:35:28.680 --> 00:35:35.960
And this we would consider as a non-pure Python package because it requires C code.

00:35:35.960 --> 00:35:39.420
There are also other models we had in the past.

00:35:39.420 --> 00:35:42.200
A lot of the data structures like list and so on, right?

00:35:42.200 --> 00:35:42.640
Yes.

00:35:42.640 --> 00:35:44.280
All the core data types are written in C.

00:35:44.280 --> 00:35:44.600
Yeah.

00:35:44.600 --> 00:35:45.120
But they count.

00:35:45.120 --> 00:35:46.360
They are present always.

00:35:46.360 --> 00:35:50.520
So, we're just talking about, like, things you would import and use.

00:35:50.680 --> 00:35:50.980
Got it.

00:35:50.980 --> 00:35:51.240
I see.

00:35:51.240 --> 00:35:51.600
Yeah.

00:35:51.600 --> 00:35:51.920
Yeah.

00:35:51.920 --> 00:35:55.780
And then we have accelerator modules as well, like Datetime, where they're implemented twice.

00:35:55.780 --> 00:35:57.920
Once in pure Python and once in C.

00:35:57.920 --> 00:36:04.240
So, like, PyPy will use the pure Python version or any platforms that can't compile the C code for whatever reason.

00:36:04.240 --> 00:36:07.800
And then there's the full C version for performance.

00:36:07.800 --> 00:36:14.220
So, pure Python just means the entire chunk of code for that module that you import is written only in Python code.

00:36:14.220 --> 00:36:15.260
There's no C code at all.

00:36:15.260 --> 00:36:16.080
Directly.

00:36:16.080 --> 00:36:19.080
Obviously, what you import can transiently cause that.

00:36:19.080 --> 00:36:19.540
For sure.

00:36:19.540 --> 00:36:19.920
Yeah.

00:36:19.980 --> 00:36:20.720
Christian, what's the idea?

00:36:20.720 --> 00:36:24.980
Are we just going to, just when 3.11 comes out, all the modules are just yanked?

00:36:24.980 --> 00:36:25.600
At 3.30.

00:36:25.600 --> 00:36:28.040
So, 3.11, they will.

00:36:28.040 --> 00:36:29.400
What's the plan here?

00:36:29.400 --> 00:36:32.160
It's not so immediate or so abrupt, is it?

00:36:32.160 --> 00:36:32.860
No.

00:36:32.860 --> 00:36:35.320
It's going to take a couple of years.

00:36:35.320 --> 00:36:40.660
So, in 3.11, you'll get, like, the deprecation warnings.

00:36:40.660 --> 00:36:45.060
I think that's a plan, Brad, to just emit a deprecation warning.

00:36:45.160 --> 00:36:50.460
So, if you would import a model and have the warnings model enabled to show you deprecation warnings,

00:36:50.460 --> 00:36:52.240
then you would get a warning pop-up.

00:36:52.240 --> 00:36:59.880
And even in your CI, turn the deprecation warnings into deprecation exceptions, so into a hard failure.

00:37:00.260 --> 00:37:05.260
And then you see, I would fail and inform you that you're importing something deprecated.

00:37:05.260 --> 00:37:11.920
This will continue in 3.12 and 3.13, the models are gone.

00:37:11.920 --> 00:37:12.220
Right.

00:37:12.220 --> 00:37:12.520
Okay.

00:37:12.520 --> 00:37:18.000
So, that's over, basically, a more or less two-year period because 3.11 is pretty imminent, right?

00:37:18.000 --> 00:37:18.340
Yeah.

00:37:18.340 --> 00:37:18.620
October.

00:37:18.620 --> 00:37:19.580
October.

00:37:19.820 --> 00:37:24.020
So, 3.13 would be October 2024.

00:37:24.020 --> 00:37:24.640
Yeah.

00:37:24.640 --> 00:37:26.100
Sounds far off now.

00:37:26.100 --> 00:37:27.580
I'm sure it's not in practice.

00:37:27.580 --> 00:37:28.900
Yeah.

00:37:28.900 --> 00:37:37.140
And to be clear, if, for some reason, the community really spoke up very vocally across a large swath of people, we might consider postponing.

00:37:37.140 --> 00:37:39.480
I don't think there's anything here we would not yank.

00:37:39.480 --> 00:37:43.380
But if people need, for some reason, more time to move, we might consider holding off.

00:37:43.380 --> 00:37:46.700
But we're fairly confident that most of these aren't.

00:37:46.700 --> 00:37:50.820
And already, honestly, the ones that people really care about are already getting copied and put onto PyPI.

00:37:50.820 --> 00:37:54.300
So, people can totally still get the original code.

00:37:54.300 --> 00:38:02.240
And to be very clear, you're already using code from Python, which means you're already using the Python license, the PSF license for this code.

00:38:02.240 --> 00:38:05.980
So, copying and pasting this code is totally fine.

00:38:05.980 --> 00:38:08.060
And we encourage it if you need this code, right?

00:38:08.060 --> 00:38:11.220
Because it's deprecated, it's not going to be changing.

00:38:11.220 --> 00:38:18.700
Unless it flat out breaks because of some change in Python that requires an update, this code is more or less after this deprecation lands.

00:38:18.700 --> 00:38:20.020
That code is not getting in touch.

00:38:20.020 --> 00:38:25.220
Which means you could totally copy what's in there just prior to the deprecation or what's in 3.10, honestly.

00:38:25.220 --> 00:38:28.060
Because, once again, these modules aren't really being updated.

00:38:28.060 --> 00:38:31.260
These are the ones that are being basically ignored and just dragging along anyway.

00:38:31.260 --> 00:38:31.720
Exactly.

00:38:31.720 --> 00:38:37.560
So, you could totally go in, copy the code over into your own code base, paste it in.

00:38:37.880 --> 00:38:41.400
Save it under the exact same name and it should more or less keep working the same way.

00:38:41.400 --> 00:38:42.960
You'll have to maintain it.

00:38:42.960 --> 00:38:43.680
Yeah.

00:38:43.680 --> 00:38:50.360
So, there's kind of two paths forward for people who are like, no, I really need AIFC audio file parsing or whatever that is.

00:38:50.620 --> 00:39:00.300
One, somebody might decide it's really important and they want the CPython version as a pip installable thing that you can then add back into Python with a dependency.

00:39:00.300 --> 00:39:00.960
Right?

00:39:00.960 --> 00:39:01.920
That could be a possibility.

00:39:01.920 --> 00:39:02.220
Yeah.

00:39:02.280 --> 00:39:10.120
Or, as you just described, you could vendor it, which means just copy the file and you just have a copy of the source code internally and it's just part of your app now.

00:39:10.120 --> 00:39:10.360
Yep.

00:39:10.360 --> 00:39:10.680
Exactly.

00:39:10.680 --> 00:39:13.420
Oh, and IFC has an interesting backstory.

00:39:13.420 --> 00:39:22.480
So, when I posted my first draft of the pap, I got contacted by a lead technical director from DreamWorks Animation Studios.

00:39:22.480 --> 00:39:26.140
They wanted to keep the model in CPython.

00:39:26.140 --> 00:39:32.440
So, Python is heavily used in the movie industry.

00:39:32.440 --> 00:39:38.140
So, if you see any blockbuster, it's probably powered by Python internally.

00:39:38.140 --> 00:39:47.100
Even so far that Python just won a special prize for the animation awards, the annies, what they're called.

00:39:47.100 --> 00:39:47.800
That's right.

00:39:47.800 --> 00:39:49.400
And Guido got that award, right?

00:39:49.400 --> 00:39:49.560
Yeah.

00:39:49.560 --> 00:39:50.480
Basically, the...

00:39:50.480 --> 00:39:55.680
Guido got the physical award and some core devs, including Christian, got requested certificates.

00:39:55.680 --> 00:39:56.420
Yeah.

00:39:56.420 --> 00:39:58.700
And I believe, yeah, Christian's getting his.

00:39:58.700 --> 00:39:59.400
Oh, that's fantastic.

00:39:59.400 --> 00:40:05.480
The UIworks Award, that's the second guy who invented Mickey Mouse, for example.

00:40:05.480 --> 00:40:10.600
So, UIworks and Walt Disney invented Mickey Mouse together.

00:40:10.600 --> 00:40:11.120
Fantastic.

00:40:11.120 --> 00:40:12.420
That's a cool honor.

00:40:12.420 --> 00:40:14.960
And probably an unexpected one from working on Python.

00:40:14.960 --> 00:40:18.540
Christian and I have been doing this long enough that I think I've mentioned this on the podcast.

00:40:18.540 --> 00:40:23.880
When I first got involved as a core dev of Python, I still had to explain to people what Python even was, right?

00:40:23.880 --> 00:40:28.040
Or if I was lucky enough that they knew what it was, they just would go, is that the language where white space matters?

00:40:28.040 --> 00:40:28.400
Right?

00:40:28.680 --> 00:40:29.080
Yeah.

00:40:29.080 --> 00:40:29.240
Yeah.

00:40:29.240 --> 00:40:30.480
Is that the one that's weird?

00:40:30.480 --> 00:40:30.980
Yeah.

00:40:30.980 --> 00:40:33.020
So, it was a totally different time.

00:40:33.020 --> 00:40:50.200
And now we're being used to help power helicopters, help plan flight paths for helicopters on Mars and hunting the video of the lander that made that helicopter take off and processing images of black holes and gravitational waves.

00:40:50.200 --> 00:40:52.120
I just had an interview.

00:40:52.120 --> 00:40:55.060
Your JWST episode that I haven't listened to.

00:40:55.160 --> 00:40:55.300
Yeah.

00:40:55.300 --> 00:40:55.320
Yeah.

00:40:55.320 --> 00:40:55.340
Yeah.

00:40:55.340 --> 00:40:56.280
It's nuts.

00:40:56.280 --> 00:40:57.400
So, no.

00:40:57.400 --> 00:40:59.100
I never thought any of this would ever happen.

00:40:59.560 --> 00:41:00.000
So, yeah.

00:41:00.000 --> 00:41:10.260
Having blockbuster movies have their entire management pipeline for their assets written in Python, it's always mind-boggling where Python is and what it's powering.

00:41:10.260 --> 00:41:10.680
I mean.

00:41:10.680 --> 00:41:11.140
That's cool.

00:41:11.360 --> 00:41:16.980
It's not just all your cat videos and photos on Instagram anymore or videos on YouTube.

00:41:16.980 --> 00:41:17.420
Yeah.

00:41:17.420 --> 00:41:19.740
It's both amazing and par for the course.

00:41:19.740 --> 00:41:20.460
Yeah.

00:41:20.460 --> 00:41:23.400
And I can't believe I just said it's not just Instagram and YouTube anymore.

00:41:23.760 --> 00:41:27.860
We've also been there long enough that people have realized we power huge websites.

00:41:27.860 --> 00:41:28.240
Yeah.

00:41:28.240 --> 00:41:28.840
Absolutely.

00:41:28.840 --> 00:41:29.740
Lots of stuff in the world.

00:41:29.740 --> 00:41:30.180
Yeah.

00:41:30.180 --> 00:41:31.640
No, it still blows my mind constantly.

00:41:31.640 --> 00:41:32.000
Yeah.

00:41:32.000 --> 00:41:33.520
YouTube was originally written in Python.

00:41:33.520 --> 00:41:37.380
I think it's still lots of parts of YouTube are powered by Python.

00:41:37.380 --> 00:41:41.080
Last time I spoke with someone there, it was.

00:41:41.080 --> 00:41:41.260
Yeah.

00:41:41.260 --> 00:41:43.600
Sydney out in the audience has an interesting question.

00:41:43.600 --> 00:41:45.700
Like, so there's a list of things that are deprecated here.

00:41:45.700 --> 00:41:48.080
Some that were threatened but kept.

00:41:48.440 --> 00:41:50.960
You know, they were on the list and then they're just like, ah, maybe not.

00:41:50.960 --> 00:41:54.780
Sydney asked, might there be further removals in the future?

00:41:54.780 --> 00:41:55.620
Maybe.

00:41:55.620 --> 00:41:56.280
Yeah.

00:41:56.280 --> 00:41:56.900
So here's the deal.

00:41:56.900 --> 00:42:03.560
This PEP was done because Christian, I personally think rightfully so, thought we needed to do

00:42:03.560 --> 00:42:06.780
a bit of house cleaning and get rid some stuff that was just kind of just sitting there rotting

00:42:06.780 --> 00:42:08.120
in the corner and not being loved.

00:42:08.120 --> 00:42:14.280
Some things got kept because to keep the controversy low, Christian was very conservative with the list.

00:42:14.280 --> 00:42:16.620
And basically, if anyone stepped forward and said, no, no, please don't take that out.

00:42:16.620 --> 00:42:17.300
That was a core dev.

00:42:17.300 --> 00:42:18.380
It more or less just got left.

00:42:18.740 --> 00:42:22.580
Very few things are on this list that people still pushed back and said, we're removing

00:42:22.580 --> 00:42:23.920
even if core dev wanted to keep it.

00:42:23.920 --> 00:42:28.020
That being said, as I said earlier in this podcast, right?

00:42:28.020 --> 00:42:33.940
Like Brett's crazy grand plan here is, was to help Christian get this PEP done, get initial

00:42:33.940 --> 00:42:34.520
clean done.

00:42:34.520 --> 00:42:39.980
I've started a conversation over on Python committers about how to maintain the standard library,

00:42:39.980 --> 00:42:40.240
right?

00:42:40.240 --> 00:42:42.840
Like what does it take to add a module and to remove a module?

00:42:42.840 --> 00:42:45.420
Because that's actually not very clearly stated either.

00:42:45.420 --> 00:42:47.880
It's been very just kind of open.

00:42:48.120 --> 00:42:54.440
My perspective from the outside of what defines the standard module is just, it's write only,

00:42:54.440 --> 00:42:59.200
like stuff only gets added and it's defined to be what's in the shipping version of Python,

00:42:59.200 --> 00:42:59.480
right?

00:42:59.480 --> 00:43:01.100
I mean, that's kind of an implicit definition.

00:43:01.100 --> 00:43:01.700
Right.

00:43:01.800 --> 00:43:03.120
But how do you get something in there?

00:43:03.120 --> 00:43:03.900
Right.

00:43:03.900 --> 00:43:09.140
Like, did you know that GraphFlip was added by a couple of core devs just because they thought

00:43:09.140 --> 00:43:10.080
it was a good idea?

00:43:10.080 --> 00:43:10.340
Yeah.

00:43:10.340 --> 00:43:12.880
It wasn't, no one asked like the chain counts or anything.

00:43:12.880 --> 00:43:15.060
That's how it's been historically maintained.

00:43:15.300 --> 00:43:17.180
It's very much just an open thing.

00:43:17.180 --> 00:43:22.300
And there's a proposal to kind of make it a bit more structured and you could argue more

00:43:22.300 --> 00:43:24.740
rigid depending on your view of this whole process.

00:43:24.740 --> 00:43:26.340
More modern.

00:43:26.340 --> 00:43:26.920
Maybe.

00:43:26.920 --> 00:43:27.320
Maybe.

00:43:27.480 --> 00:43:32.460
By suggesting that you need a PEP to add something because it's a shared cost to all the core

00:43:32.460 --> 00:43:33.500
devs that we have to maintain it.

00:43:33.500 --> 00:43:37.100
You'll notice I have a slight theme here of maintenance costs.

00:43:37.100 --> 00:43:38.180
Or...

00:43:38.180 --> 00:43:39.180
I have a puppy for you.

00:43:39.180 --> 00:43:43.560
One that's fluffy or one that I'm going to have to pay vet bills for?

00:43:43.560 --> 00:43:45.540
Clean up the poop.

00:43:45.540 --> 00:43:47.080
Might ruin your carpet, but it's also cute.

00:43:47.080 --> 00:43:47.500
So you'll...

00:43:47.500 --> 00:43:47.780
Yeah.

00:43:47.780 --> 00:43:48.820
I've got a cat.

00:43:48.820 --> 00:43:49.160
I'm good.

00:43:49.160 --> 00:43:50.140
I don't know if it's not the joke.

00:43:50.140 --> 00:43:54.960
So I've just watched Brad's keynote from PyCon like three or four years ago.

00:43:54.960 --> 00:43:56.120
I think it was...

00:43:56.120 --> 00:43:56.540
Maybe.

00:43:56.540 --> 00:44:00.800
It was the first one in Cleveland, whichever one that one is.

00:44:00.800 --> 00:44:01.920
I can't remember.

00:44:01.920 --> 00:44:02.740
2018, I think.

00:44:02.740 --> 00:44:03.380
I think it was 18.

00:44:03.380 --> 00:44:03.720
Yeah.

00:44:03.780 --> 00:44:09.420
Once that's settled, my hope is, once again, come up with a policy of what that means for

00:44:09.420 --> 00:44:10.060
the standard library.

00:44:10.060 --> 00:44:14.020
Once we have that policy, there will probably be a discussion about what does that mean for

00:44:14.020 --> 00:44:14.940
the current standard library?

00:44:14.940 --> 00:44:16.200
Do we leave it as is?

00:44:16.200 --> 00:44:18.520
Do we maybe slowly transition over or not?

00:44:18.520 --> 00:44:19.440
I don't know.

00:44:19.440 --> 00:44:23.620
Some people like Lukash, for instance, have advocated never removing anything from the standard

00:44:23.620 --> 00:44:24.440
library ever again.

00:44:24.440 --> 00:44:27.340
And literally just saying, this is deprecated.

00:44:27.340 --> 00:44:28.800
We will never touch it or update it.

00:44:28.800 --> 00:44:31.580
It's dead, but it's sitting here so we don't break code.

00:44:32.160 --> 00:44:35.620
Other people are way more, let's strip it to its bones.

00:44:35.620 --> 00:44:40.780
And if you need this stuff, we'll make it as a separate package or something.

00:44:40.780 --> 00:44:44.280
Some people have talked about keeping it as is, but separating the development process.

00:44:44.280 --> 00:44:49.020
So it's actually an externally maintained thing and it has its own release process and schedule

00:44:49.020 --> 00:44:49.680
and all that.

00:44:49.680 --> 00:44:54.120
The answer is, I don't know, but this is not the first time I've deprecated modules and

00:44:54.120 --> 00:44:54.640
had them removed.

00:44:54.640 --> 00:44:59.600
I was also in a competition with Fred Drake back in the two to three transition to see who could

00:44:59.600 --> 00:45:02.080
remove the most number of lines of code in Python.

00:45:02.080 --> 00:45:04.260
And I won thanks to removing the compiler package.

00:45:04.260 --> 00:45:11.480
So I have been around long enough to say, probably, I just don't know when, just because I will

00:45:11.480 --> 00:45:14.720
never say never when it comes to a project that's 32 years old.

00:45:14.720 --> 00:45:19.500
But there are no specific plans right now outside of this PEP of deprecating and removing anything

00:45:19.500 --> 00:45:20.480
else from the standard library.

00:45:20.900 --> 00:45:23.620
So if that's the question concretely, no plans.

00:45:23.620 --> 00:45:26.920
But philosophically, I am not willing to say anything.

00:45:26.920 --> 00:45:28.020
I never say never.

00:45:28.020 --> 00:45:28.260
Yeah.

00:45:28.260 --> 00:45:28.640
Yeah.

00:45:28.640 --> 00:45:32.540
So one of the things that stands out, let's talk about the modules real quick.

00:45:32.540 --> 00:45:36.220
Then I want to, I want to kind of talk a broader thing because I think it's going to lead us

00:45:36.220 --> 00:45:37.100
down a path.

00:45:37.380 --> 00:45:43.220
So maybe just give us a quick overview of the highlights, let's say, of things being removed.

00:45:43.220 --> 00:45:45.040
I talked about this table here.

00:45:45.040 --> 00:45:47.600
It's under the deprecated modules heading on the PEP.

00:45:47.600 --> 00:45:51.520
And it has a module name, when it's deprecated.

00:45:51.520 --> 00:45:57.460
Some of them are like deprecated in 3.6, when it's to be removed, when it was added, whether as a

00:45:57.460 --> 00:45:57.960
maintainer.

00:45:57.960 --> 00:46:01.120
And interestingly, I thought this was cool.

00:46:01.720 --> 00:46:07.420
There's an alternative that's new or better and maintained that you could just use, right?

00:46:07.420 --> 00:46:07.840
Yes.

00:46:07.840 --> 00:46:11.540
If you look at the table, you'll know some of the stuff's actually been somewhat documented

00:46:11.540 --> 00:46:15.920
as deprecated all the way back to Python 2.0 or 3, right?

00:46:15.920 --> 00:46:19.780
Like you also have to understand some of the stuff got documented as don't use anymore.

00:46:19.780 --> 00:46:21.960
A long time ago, we just didn't take the code out.

00:46:21.960 --> 00:46:25.520
And this is more of a push to actually finally remove the code and the documentation.

00:46:25.520 --> 00:46:26.000
I see.

00:46:26.000 --> 00:46:30.860
But yeah, so we have AIFC, which I believe is the audio format.

00:46:30.860 --> 00:46:31.160
Correct.

00:46:31.160 --> 00:46:38.220
We have async chat and async core, which were very early async server things in the standard

00:46:38.220 --> 00:46:41.480
library that you shouldn't use, obviously, because it's on this list.

00:46:41.480 --> 00:46:41.880
Yeah.

00:46:41.880 --> 00:46:45.040
An alternative is asyncio, which was added in 3.4.

00:46:45.040 --> 00:46:46.520
Yeah, it's actually asynchronous.

00:46:46.520 --> 00:46:51.420
I think the async check, async core were added for Zope back in the days.

00:46:51.420 --> 00:46:55.600
I know that the Zope server used to use async core async check a lot.

00:46:55.600 --> 00:46:57.440
I don't even remember what the hell audio app is.

00:46:57.440 --> 00:47:00.500
Audio app is low level, like conversion.

00:47:00.600 --> 00:47:05.640
And math operations used by IFC, WAVE, and some of the other sound models.

00:47:05.640 --> 00:47:08.800
So this just provides math primitives in C.

00:47:08.800 --> 00:47:10.580
CGI is literally what it sounds like.

00:47:10.580 --> 00:47:12.560
It's helpers to write CGI scripts.

00:47:12.800 --> 00:47:16.640
That sounded like one of the bigger, harder to work with ones.

00:47:16.640 --> 00:47:18.220
Like there's no maintainer.

00:47:18.220 --> 00:47:20.000
It was designed at a different time.

00:47:20.000 --> 00:47:20.440
Yeah.

00:47:20.440 --> 00:47:26.320
And the funny thing, though, is a lot of packages still use bits of it because there's weird

00:47:26.320 --> 00:47:27.220
little helpers in there.

00:47:27.220 --> 00:47:32.380
But if you also go look at what the helpers are doing, most of them are either a one liner

00:47:32.380 --> 00:47:35.980
or they delegate to something else somewhere else in the standard library at this point.

00:47:35.980 --> 00:47:40.780
And they have horrible APIs now because they very much expect it to be CGI.

00:47:40.780 --> 00:47:40.920
All right.

00:47:40.920 --> 00:47:45.380
So they're reading from like environment variables and files to get the things to process versus

00:47:45.380 --> 00:47:46.780
passing them as an argument.

00:47:46.780 --> 00:47:48.600
From STD in and STD out.

00:47:48.600 --> 00:47:51.960
So pretty much hot code STD in and STD out.

00:47:52.320 --> 00:47:52.500
Yeah.

00:47:52.500 --> 00:47:54.060
So there's actual pushback on CGI.

00:47:54.060 --> 00:47:58.720
But I think when we pointed out like this just delegates to here or this is literally a

00:47:58.720 --> 00:48:02.980
one liner that I can paste in when you're in the discussion of what it does, like just

00:48:02.980 --> 00:48:07.380
copy and paste this reject literally and or just whatever.

00:48:07.380 --> 00:48:09.160
Most people, I think, were OK with it.

00:48:09.160 --> 00:48:12.840
This is actually, I think, one of the first modules to get put up on PyPI like a couple

00:48:12.840 --> 00:48:13.320
of weeks ago.

00:48:13.320 --> 00:48:17.300
CGI TV is tracebacks, pretty tracebacks in your CGI code.

00:48:17.300 --> 00:48:20.000
I mean, once again, if you don't have CGI code, you don't need the tracebacks.

00:48:20.000 --> 00:48:21.400
One goes, the other comes with it.

00:48:21.480 --> 00:48:21.620
Yeah.

00:48:21.620 --> 00:48:23.700
Chunk, I think, is literally just chunking data.

00:48:23.700 --> 00:48:25.600
It's literally just breaking up into chunks.

00:48:25.600 --> 00:48:27.200
Not a little bit like editor tools.

00:48:27.200 --> 00:48:27.880
Yeah, I think so.

00:48:27.880 --> 00:48:28.540
If I remember correctly.

00:48:28.540 --> 00:48:35.520
Well, it's a format to distribute files used by mailboxes or so.

00:48:35.520 --> 00:48:36.680
If I remember correctly.

00:48:36.680 --> 00:48:37.300
Yeah.

00:48:37.300 --> 00:48:39.520
I will let Christian talk about crypt.

00:48:39.520 --> 00:48:39.900
Yeah.

00:48:39.900 --> 00:48:42.940
Crypt is a binding to the ellipsis.

00:48:42.940 --> 00:48:47.540
Crypt function is used to password hashing.

00:48:47.540 --> 00:48:48.540
No way around.

00:48:49.140 --> 00:48:53.720
The problem with that is that the only guaranteed algorithm that's available is horrible.

00:48:53.720 --> 00:48:58.760
And if you need some of the better ones, they're probably not available in your libc.

00:48:58.760 --> 00:49:02.140
So there's like optional algorithms for password hashing.

00:49:02.140 --> 00:49:04.400
And even there are problematic.

00:49:04.400 --> 00:49:06.520
So I've used one of these replacement ones.

00:49:06.520 --> 00:49:08.280
So they're much better.

00:49:08.480 --> 00:49:12.040
Like Bcrypt or passlib or anything else that's doing it right.

00:49:12.040 --> 00:49:12.380
Yeah.

00:49:12.380 --> 00:49:12.740
That's great.

00:49:12.740 --> 00:49:13.100
Yeah.

00:49:13.100 --> 00:49:20.980
And image shader is just a very limited approach to detect if you have a PNG, GIF, JPEG, whatever,

00:49:20.980 --> 00:49:23.780
based on the first couple of bytes of a file.

00:49:24.400 --> 00:49:27.220
Just the same with audio headers or sound headers.

00:49:27.220 --> 00:49:29.360
They just detect file formats.

00:49:29.360 --> 00:49:32.760
But they only support a very limited setup file formats.

00:49:32.760 --> 00:49:38.900
And there are better libraries that are more efficient and support much more different file formats.

00:49:38.900 --> 00:49:39.260
Yeah.

00:49:39.400 --> 00:49:44.060
So after image headers, MSI lib, which helps with Windows MSI installers.

00:49:44.060 --> 00:49:44.820
Okay.

00:49:44.820 --> 00:49:47.260
Why do we have this in the standard library kind of question?

00:49:47.260 --> 00:49:50.820
I think we used it originally to help write the installer for Windows.

00:49:50.820 --> 00:49:52.440
And I think we don't use it anymore.

00:49:52.440 --> 00:49:53.160
So it's no big deal.

00:49:53.160 --> 00:49:56.140
We already talked about NNTP lib.

00:49:56.140 --> 00:49:57.220
NIS.

00:49:57.220 --> 00:49:58.940
Who still uses NIS?

00:49:58.940 --> 00:50:00.220
It's on yellow pages.

00:50:00.220 --> 00:50:00.880
Yeah.

00:50:00.880 --> 00:50:01.580
Exactly.

00:50:01.580 --> 00:50:04.380
Do people even know what sun is anymore?

00:50:04.380 --> 00:50:04.680
Right.

00:50:04.680 --> 00:50:06.620
We're getting to that point in our lives.

00:50:06.620 --> 00:50:08.120
I think it's a synonym for Oracle.

00:50:08.120 --> 00:50:08.480
Yeah.

00:50:08.480 --> 00:50:09.120
Exactly.

00:50:09.440 --> 00:50:12.240
OSS audio dev is just a wrapper on an audio library.

00:50:12.240 --> 00:50:15.700
Once again, does that really belong in the standard library?

00:50:15.700 --> 00:50:16.060
Yeah.

00:50:16.060 --> 00:50:21.940
It was used by Linux before they had alt sub, before they had pulse audio and pipe wire.

00:50:21.940 --> 00:50:25.020
So this is like from the old 2000s.

00:50:25.020 --> 00:50:25.300
No.

00:50:25.300 --> 00:50:28.340
Pipes library more or less got replaced by subprocess.

00:50:28.340 --> 00:50:30.000
So it's literally just Unix pipes.

00:50:30.000 --> 00:50:31.440
SMTPD.

00:50:31.440 --> 00:50:34.660
I don't think we need to be able to run a server to send email in Python.

00:50:34.660 --> 00:50:35.520
Standard library.

00:50:35.520 --> 00:50:36.860
So that's why that's there.

00:50:36.860 --> 00:50:37.120
Yeah.

00:50:37.220 --> 00:50:39.600
And there's a IPI alternative.

00:50:39.600 --> 00:50:40.100
Yeah.

00:50:40.100 --> 00:50:41.080
Send header.

00:50:41.080 --> 00:50:42.220
Coach, you already talked about.

00:50:42.220 --> 00:50:43.560
SPWD.

00:50:43.560 --> 00:50:47.000
It's the binding to the Etsy shadow file.

00:50:47.000 --> 00:50:51.600
So that's the place where Linux actually keeps the passwords for users.

00:50:51.600 --> 00:50:54.280
But that's the wrong approach.

00:50:54.400 --> 00:50:57.180
So if you want to log in a user, you don't check the password.

00:50:57.180 --> 00:51:02.120
You ask the PAM stack if the user's allowed to log into a service set.

00:51:02.120 --> 00:51:02.780
Sun.

00:51:02.780 --> 00:51:06.140
Are you is another audio format from Sun?

00:51:06.140 --> 00:51:08.340
So Telnet lib.

00:51:08.340 --> 00:51:08.620
Yeah.

00:51:08.620 --> 00:51:09.460
Telnet.

00:51:09.460 --> 00:51:10.260
Server.

00:51:10.460 --> 00:51:13.220
This was specifically to be a server, not a client of Telnet.

00:51:13.220 --> 00:51:14.520
It's not a client library.

00:51:14.520 --> 00:51:15.400
Sorry.

00:51:15.400 --> 00:51:16.280
The client library.

00:51:16.280 --> 00:51:17.640
So I don't think you have a server.

00:51:17.640 --> 00:51:20.340
But actually, I would have to open the code and read the code.

00:51:20.340 --> 00:51:21.180
UU.

00:51:21.180 --> 00:51:23.300
That was used by UUCP.

00:51:23.300 --> 00:51:24.900
So Unix to Unix copy.

00:51:25.080 --> 00:51:29.420
It's a chunking format to transfer binary data.

00:51:29.420 --> 00:51:37.280
And XDR lab, another Sun library that is the binary format used by NFS.

00:51:37.280 --> 00:51:39.320
And remote procedure calls.

00:51:39.320 --> 00:51:44.860
If you have like Sun remote procedure calls for network fault servers.

00:51:44.860 --> 00:51:45.820
From 1992.

00:51:45.820 --> 00:51:46.620
Indeed.

00:51:46.620 --> 00:51:51.440
There's an interesting high frequency of Sun being mentioned here.

00:51:51.440 --> 00:51:51.720
Yeah.

00:51:51.720 --> 00:51:54.700
I mean, Python used to run cleanly on Solaris right out of the box.

00:51:54.700 --> 00:51:55.040
Yeah.

00:51:55.200 --> 00:51:59.260
And Sun developed lots of internet standards we still use these days.

00:51:59.260 --> 00:51:59.560
Sure.

00:51:59.560 --> 00:52:00.400
For sure.

00:52:00.400 --> 00:52:04.120
So hopefully all the listeners were shocked and had no clue any of these modules existed.

00:52:04.120 --> 00:52:05.480
And hence why we're getting rid of them.

00:52:05.480 --> 00:52:08.040
Where's the threatened list?

00:52:08.040 --> 00:52:09.280
It's down here somewhere.

00:52:09.280 --> 00:52:10.720
The modules to keep.

00:52:10.720 --> 00:52:11.960
Yes.

00:52:11.960 --> 00:52:16.620
So we got ColorSys, FileInput, GitOpt, OptPars, and Wave.

00:52:16.620 --> 00:52:19.580
Those are the ones that avoided being cut.

00:52:19.580 --> 00:52:20.580
Mm-hmm.

00:52:20.580 --> 00:52:24.860
ColorSys, to be frank, is just basic math.

00:52:25.060 --> 00:52:26.040
It's nothing special.

00:52:26.040 --> 00:52:27.900
But CoreDev said, I use it.

00:52:27.900 --> 00:52:28.720
I'll keep it around.

00:52:28.720 --> 00:52:29.700
I'll maintain it.

00:52:29.700 --> 00:52:30.180
Okay.

00:52:30.180 --> 00:52:32.200
Like parsing RGB color.

00:52:32.200 --> 00:52:32.860
Yeah.

00:52:32.860 --> 00:52:33.560
FileInput.

00:52:33.560 --> 00:52:35.280
I don't remember about FileInput.

00:52:35.280 --> 00:52:36.660
I think someone just said, I use it.

00:52:36.660 --> 00:52:38.080
GetOpt and OptParse.

00:52:38.080 --> 00:52:41.660
Where once again, is it worth getting rid of versus AugParse?

00:52:42.460 --> 00:52:44.660
And is it widely used enough?

00:52:44.660 --> 00:52:46.560
And it was just one of these.

00:52:46.560 --> 00:52:50.100
There's just too much code out there right now to warrant working it out.

00:52:50.100 --> 00:52:51.520
So we just said it's easier to keep.

00:52:51.520 --> 00:52:55.640
And Wave plays WAV sound files.

00:52:55.640 --> 00:52:59.320
And basically, it's used by education.

00:52:59.320 --> 00:53:04.300
It's a quick and cheap tool to show kids computers can do fancy stuff like make noise.

00:53:04.300 --> 00:53:04.800
Oh, yeah.

00:53:05.000 --> 00:53:08.080
That's actually really nice if you've got your turtle moving along.

00:53:08.080 --> 00:53:11.280
It could laugh when it gets to the end of its little thing or whatever, right?

00:53:11.280 --> 00:53:11.660
Yeah.

00:53:11.660 --> 00:53:13.700
But I mean, that's another good point, Michael.

00:53:13.700 --> 00:53:14.320
Like, oh, turtle.

00:53:14.320 --> 00:53:19.220
Well, that requires us shipping TK Enter, which requires us shipping Tickle TK.

00:53:19.220 --> 00:53:21.620
And it's just like, where do you draw the line?

00:53:21.620 --> 00:53:21.960
Yeah.

00:53:22.060 --> 00:53:23.760
But it's turtles all the way down.

00:53:23.760 --> 00:53:24.280
You know that.

00:53:24.280 --> 00:53:31.220
Hey, and as someone who learned turtle back on an Apple IIe with a good old green and black screen,

00:53:31.220 --> 00:53:32.420
like, I totally get it.

00:53:32.420 --> 00:53:35.140
But I mean, these are the questions we're starting to ask ourselves, right?

00:53:35.140 --> 00:53:36.300
Like, where's the line?

00:53:36.300 --> 00:53:37.340
Yeah, indeed.

00:53:37.340 --> 00:53:38.040
All right.

00:53:38.040 --> 00:53:43.240
Before we run out of time, let's have a broader philosophical conversation about this stuff.

00:53:43.240 --> 00:53:45.300
You said you have a big plan.

00:53:45.300 --> 00:53:51.260
You know, one of the things that I think is interesting about Python is where it runs in all these different

00:53:51.260 --> 00:53:51.620
places.

00:53:51.780 --> 00:53:56.080
I mean, you've got Mac, Windows, Linux, but you also got Raspberry Pis.

00:53:56.080 --> 00:53:57.560
You've got helicopters.

00:53:57.560 --> 00:53:58.640
You've got robots.

00:53:58.640 --> 00:54:04.100
And then you even have, you know, CircuitPython and MicroPython, where it's like really, really

00:54:04.100 --> 00:54:04.540
small.

00:54:04.540 --> 00:54:12.120
And I do think it would be interesting to say, here is a subset, a portion of Python and a

00:54:12.120 --> 00:54:17.140
portion of maybe even the language syntax that if you program to this, you're guaranteed

00:54:17.140 --> 00:54:19.840
to be able to run it everywhere, right?

00:54:19.840 --> 00:54:20.760
Is there a way to agree?

00:54:21.000 --> 00:54:24.240
Maybe that compiles to WebAssembly and runs in the front end on a browser.

00:54:24.240 --> 00:54:25.300
Who knows?

00:54:25.780 --> 00:54:30.440
So for any of you who read my blog, you'll know I've been doing a long running blog post

00:54:30.440 --> 00:54:32.240
series on the syntactic sugar of Python.

00:54:32.240 --> 00:54:38.980
And part of the reason I've been doing that is I've been trying to figure out what I've been doing

00:54:38.980 --> 00:54:40.440
and I've been doing that.

00:54:40.440 --> 00:54:41.300
I've been doing that.

00:54:41.300 --> 00:54:41.840
what I've been doing that.

00:54:41.840 --> 00:54:42.720
What I've been doing that.

00:54:42.720 --> 00:54:43.960
What I've been doing that.

00:54:43.960 --> 00:54:51.020
What is the core set of Python constructs that must exist to basically reconstitute all the other

00:54:51.020 --> 00:54:52.640
parts of Python and its syntax.

00:54:52.640 --> 00:54:57.780
And kind of if we were to start from scratch almost, what would that look like?

00:54:57.780 --> 00:55:02.960
Now that's interesting from a language level, but from a standard library level that comes

00:55:02.960 --> 00:55:04.800
into play only in terms of support, right?

00:55:04.800 --> 00:55:07.240
Like we dropped this feature, would that break things, right?

00:55:07.240 --> 00:55:08.960
Like name tuple.

00:55:08.960 --> 00:55:09.400
Right.

00:55:09.400 --> 00:55:14.240
Well, for example, does TK intern need to be in the WebAssembly front end version?

00:55:14.240 --> 00:55:15.540
Probably not, right?

00:55:15.540 --> 00:55:16.280
No idea.

00:55:16.280 --> 00:55:17.940
I guess not, but you know, maybe.

00:55:17.940 --> 00:55:18.680
Probably not.

00:55:18.680 --> 00:55:18.980
Yeah.

00:55:18.980 --> 00:55:20.420
I mean, that's the tricky question, right?

00:55:20.420 --> 00:55:23.900
It's always one of these things of who are you optimizing for?

00:55:23.900 --> 00:55:25.200
Who's the target audience?

00:55:25.200 --> 00:55:26.700
How do you define that?

00:55:26.700 --> 00:55:27.000
Right.

00:55:27.000 --> 00:55:32.620
Like other than stuff that we have to have just to make CPython run, nothing technically has

00:55:32.620 --> 00:55:33.160
to be in there.

00:55:33.160 --> 00:55:33.780
Right.

00:55:33.780 --> 00:55:37.160
Some have said, oh, we should have enough to at least bootstrap in pip.

00:55:37.560 --> 00:55:44.220
So if you can at least get pip or some installer in, you can then at least get yourself going

00:55:44.220 --> 00:55:46.200
and start installing dependencies.

00:55:46.200 --> 00:55:46.920
Yeah.

00:55:46.920 --> 00:55:50.300
But as you mentioned earlier, like it's nice to be able to also write that little automation

00:55:50.300 --> 00:55:53.720
script that helps maintain your system and not have to pull anything and have to create

00:55:53.720 --> 00:55:55.500
a virtual environment for every little script you ever write.

00:55:55.500 --> 00:55:57.200
But where's the line on that?

00:55:57.200 --> 00:55:57.520
Yeah.

00:55:57.520 --> 00:56:05.620
When I saw Python on Linux on just like a bare server, I can apt install Python three, but maybe

00:56:05.620 --> 00:56:06.200
that's not enough.

00:56:06.200 --> 00:56:12.720
Maybe I need to also install sometimes Python three dash VE and V or, you know, it's like

00:56:12.720 --> 00:56:14.160
broken up into bits, right?

00:56:14.160 --> 00:56:17.660
The Debian question is a very hot topic with Christian in the room.

00:56:17.660 --> 00:56:25.860
But I personally argue against Debian's policy on that and say VEMV would be considered a core

00:56:25.860 --> 00:56:26.440
part, right?

00:56:26.440 --> 00:56:27.500
I think it's core as well.

00:56:27.580 --> 00:56:31.940
And I wasn't so much picking on VEMV as just like there are environments where it comes

00:56:31.940 --> 00:56:35.300
with in pieces to some degree.

00:56:35.300 --> 00:56:35.600
Okay.

00:56:35.600 --> 00:56:40.300
I need to find the right words to not get into trouble again or to get into.

00:56:41.160 --> 00:56:44.440
Last time I burst a bit uncareful.

00:56:44.440 --> 00:56:48.400
Somebody accused me to wage a crusade against Debian.

00:56:49.120 --> 00:56:50.460
It's a philosophical disagreement.

00:56:50.460 --> 00:56:50.840
Yeah.

00:56:50.840 --> 00:56:58.000
So Debian has the policies to split packages in a smaller part so they can have a minimal

00:56:58.000 --> 00:56:58.660
installation.

00:56:59.580 --> 00:57:06.260
And they also don't like the way how we have like virtual AMP and short pip provided because

00:57:06.260 --> 00:57:08.100
it's actually duplicating code.

00:57:08.100 --> 00:57:15.760
We have like a zip file of binary wheels with compressed setup tools and pip, which contains

00:57:15.760 --> 00:57:16.480
vendor packages.

00:57:16.820 --> 00:57:21.300
Debian wants to use their distribution provided version of pip.

00:57:21.300 --> 00:57:23.100
So this is a conflict.

00:57:23.100 --> 00:57:31.000
Like we from the parts of the core developers, we think that the usability is more important

00:57:31.000 --> 00:57:31.420
here.

00:57:31.420 --> 00:57:39.520
So we want users to be able to use standard documentation instructions to use Python install

00:57:39.520 --> 00:57:40.100
extensions.

00:57:40.100 --> 00:57:41.640
This is more important for us.

00:57:41.780 --> 00:57:49.140
And this is a debate which had like multiple session between Debian engineers and the steering

00:57:49.140 --> 00:57:49.700
council.

00:57:49.700 --> 00:57:52.040
There was several heated discussions.

00:57:52.040 --> 00:57:56.600
And yeah, there are just different philosophical like interactions.

00:57:56.600 --> 00:57:57.160
Got it.

00:57:57.160 --> 00:58:03.520
So, I mean, the key point is, is there are a lot of questions about like, if you start to

00:58:03.520 --> 00:58:08.440
slice and dice the standard library into parts that you can install in groupings, for instance,

00:58:08.440 --> 00:58:10.280
is that truly part of the standard library?

00:58:10.280 --> 00:58:14.400
Or is that just an optional install on PyPI that the core dev team just happens to maintain,

00:58:14.400 --> 00:58:14.640
right?

00:58:14.640 --> 00:58:16.000
Because you can no longer rely on it.

00:58:16.000 --> 00:58:16.340
Yeah.

00:58:16.340 --> 00:58:20.580
I mean, if you went down that path, it would almost be a little bit like the anaconda story,

00:58:20.580 --> 00:58:20.960
right?

00:58:20.960 --> 00:58:22.720
Like here's the essence of what I got.

00:58:22.720 --> 00:58:24.800
But if I install what I normally install, I get more.

00:58:24.800 --> 00:58:31.860
There'd be like a minimum install and like a fuller install, which I think, I don't know

00:58:31.860 --> 00:58:32.720
how I feel about that.

00:58:32.720 --> 00:58:35.340
Well, if it gets me Python on the front end, I'd have to write JavaScript.

00:58:35.340 --> 00:58:36.440
I feel pretty good about it.

00:58:36.440 --> 00:58:37.540
I'm starting to think, I don't know.

00:58:38.140 --> 00:58:40.440
At least for some part, it makes kind of sense.

00:58:40.440 --> 00:58:42.060
So let's go back to Tickinter.

00:58:42.060 --> 00:58:49.060
So Tickinter depends on TK, Tickle TK, which depends on your graphical user interface.

00:58:49.060 --> 00:58:50.380
So X11.

00:58:50.380 --> 00:58:57.300
And if Python would always require Tickle TK, then you would have to install, I guess, like

00:58:57.300 --> 00:59:03.760
100 megabytes of libraries on every container image that has Python because the whole X11

00:59:03.760 --> 00:59:05.720
stack is very big.

00:59:05.720 --> 00:59:12.080
So you get your whole like graphical user interface libraries down to the actual graphical server

00:59:12.080 --> 00:59:15.180
that renders all the output.

00:59:15.520 --> 00:59:21.620
It makes sense that most distros split up to Tickinter and ship that optional package.

00:59:21.620 --> 00:59:29.960
But some distros go a bit further and split off packages that we consider to be core, core packages.

00:59:29.960 --> 00:59:34.980
So the inner core that should be always available and working.

00:59:34.980 --> 00:59:37.980
Like date, time and tuples and stuff like that.

00:59:37.980 --> 00:59:38.440
Yeah.

00:59:38.440 --> 00:59:40.880
Stuff that has no third party dependencies, basically.

00:59:40.880 --> 00:59:41.360
Yeah.

00:59:41.700 --> 00:59:41.980
Okay.

00:59:41.980 --> 00:59:42.900
Interesting.

00:59:42.900 --> 00:59:44.300
What about WebAssembly?

00:59:44.300 --> 00:59:46.800
You guys started actually building for WebAssembly, didn't you?

00:59:46.800 --> 00:59:47.200
Yes.

00:59:47.200 --> 00:59:51.980
Steve Dower pointed out that I don't remember the way to look it up.

00:59:51.980 --> 00:59:52.800
Super easy.

00:59:52.800 --> 00:59:59.560
But that there's sort of a proper core dev version of WebAssembly CPython now.

00:59:59.560 --> 01:00:02.120
It's REPL EASNHS.

01:00:02.120 --> 01:00:05.900
I just posted in the chat with the chip one day.

01:00:05.900 --> 01:00:06.300
Yeah.

01:00:06.300 --> 01:00:09.440
I mean, basically what happened was that the core dev sprints back in October,

01:00:10.340 --> 01:00:14.120
I started to look at seeing what it would take to compile CPython to WebAssembly.

01:00:14.120 --> 01:00:20.500
And I was lamenting in our build channel on our core dev discord server that, all right,

01:00:20.500 --> 01:00:27.200
the build setup was kind of old and creaky and I needed some help to figure out what to do.

01:00:27.200 --> 01:00:32.540
And then Christian working for Linux distribution knows how all this stuff works.

01:00:32.940 --> 01:00:36.540
And so he started to answer my questions and I did some initial cleanup.

01:00:36.540 --> 01:00:43.780
And then Christian really got into it and just totally really started to clean up our entire build process in terms of modules and such.

01:00:43.780 --> 01:00:50.700
Because there's a setup file in the repo where you can specify what modules you do or don't want built in to Python,

01:00:50.700 --> 01:00:58.300
both compiled it all into like a .so or DLL, compiled into statically into the binary or just completely left out.

01:00:58.300 --> 01:01:04.140
And Christian went through with some help with Erland, I think, actually, and cleaned up, you know,

01:01:04.140 --> 01:01:11.040
cleaned up a bunch of the whole structure so that we were using more of PKG config and just made it just a bit more modern.

01:01:11.560 --> 01:01:15.780
And while he was doing that, Christian would bring up stuff about like cross compilation,

01:01:15.780 --> 01:01:18.080
because that's another thing we do is you do a cross build, right?

01:01:18.080 --> 01:01:25.560
You can build, I mean, you can totally build on your Mac right now, Michael, 4x86 64 bit, even though you're running an M1.

01:01:25.560 --> 01:01:26.160
Oh, interesting.

01:01:26.160 --> 01:01:26.540
Right.

01:01:26.540 --> 01:01:27.620
So it's just flags.

01:01:27.620 --> 01:01:28.460
That's pretty wild.

01:01:28.460 --> 01:01:28.660
Yeah.

01:01:28.660 --> 01:01:35.080
But the way you get WebAssembly building that way is you just specify typically in script in the as a C compiler,

01:01:35.080 --> 01:01:38.080
which basically is clang and you just specify.

01:01:38.080 --> 01:01:44.500
And basically under the hood, it's more or less just specifying the right flags and everything to just make clang build for a different CPU target.

01:01:44.500 --> 01:01:48.700
And then Christian was starting to talk about like, oh, well, for cross builds, can we do this and that?

01:01:48.700 --> 01:01:52.620
And I kept saying, no, it won't work for WebAssembly because of this and won't work for WebAssembly because of that.

01:01:52.620 --> 01:01:55.480
And then Christian just looked into it and was like, oh, I'll use this as a motivator.

01:01:55.480 --> 01:01:56.800
And then Christian just ran with it.

01:01:56.800 --> 01:01:59.960
And Christian figured out all the problems and just got really into it.

01:01:59.960 --> 01:02:06.620
And it's been patching CPython's main over and over to the point that as of, I don't know, less than a month ago.

01:02:06.620 --> 01:02:10.900
So for two weeks now, we can run the entire test suite without any failures.

01:02:10.900 --> 01:02:11.160
Yeah.

01:02:11.160 --> 01:02:11.920
On WebAssembly.

01:02:11.920 --> 01:02:12.360
Yep.

01:02:12.360 --> 01:02:12.980
Cleanly.

01:02:12.980 --> 01:02:14.440
Inside Node.js.

01:02:15.020 --> 01:02:20.700
So you compile the, so these are a bit earlier.

01:02:20.700 --> 01:02:28.820
So when you build Python for WebAssembly, you have to not only tag WebAssembly, but also like the runtime.

01:02:28.820 --> 01:02:32.360
So these things are called triplets, so platform triplets.

01:02:32.360 --> 01:02:40.940
So you have like which CPU you target, which vendor and operating system and additional flags like GDBC.

01:02:42.260 --> 01:02:46.440
And default target is a WebM32 mScripten.

01:02:46.440 --> 01:02:51.700
So you do compile to WebAssembly with CPU instruction for 32 bits.

01:02:51.700 --> 01:02:54.300
And mScripten is the runtime platform.

01:02:54.300 --> 01:02:59.000
And mScripten can target multiple like different platforms.

01:02:59.000 --> 01:03:07.800
So this is mScripten for the browser, but you can also compile it that it uses Node.js backends and Node.js like file system access.

01:03:07.800 --> 01:03:08.800
So we can actually.

01:03:08.800 --> 01:03:11.000
Oh, you probably have more permissions and more capabilities.

01:03:11.880 --> 01:03:14.740
You can run threads, you can run sockets in a limited way.

01:03:14.740 --> 01:03:15.220
That's fantastic.

01:03:15.220 --> 01:03:17.100
And you can access the file system.

01:03:17.100 --> 01:03:22.240
And so it was a process of running the test suite, figuring out why it's crashing.

01:03:22.240 --> 01:03:26.760
So we had in the beginning like this completely like really crashing the runtime.

01:03:26.760 --> 01:03:38.400
Not just itself, but there's like a virtual kernel layer written in JavaScript that provides syscalls written in JavaScript to the WebAssembly model.

01:03:38.400 --> 01:03:39.800
It's a bit weird.

01:03:40.160 --> 01:03:47.000
So I was writing kernel-like code in JavaScript and the unit test code for that in C.

01:03:47.000 --> 01:03:48.660
So that's mScripten.

01:03:48.660 --> 01:03:49.140
Very cool.

01:03:49.140 --> 01:03:49.420
Yeah.

01:03:49.420 --> 01:03:58.800
So this REPL.EthanHS.me, which I'll put in the show notes, it's got my mScripten version of Python 3.11.

01:03:58.800 --> 01:04:03.180
And I can do fstring stuff and the thing that's right here in the browser.

01:04:03.180 --> 01:04:04.380
Hasn't been updated in a while.

01:04:04.380 --> 01:04:05.460
It's a bit old.

01:04:05.460 --> 01:04:06.460
Need to talk to Ethan.

01:04:06.580 --> 01:04:08.380
It's like six weeks old.

01:04:08.380 --> 01:04:09.880
That's old for the web, I guess.

01:04:09.880 --> 01:04:17.880
Well, I mean, we have a cron job running on Ethan's GitHub repo for this that runs nightly against Python.

01:04:17.880 --> 01:04:20.600
Cpython itself to make sure it continues to compile.

01:04:20.600 --> 01:04:22.200
We need to get a build bot going.

01:04:22.200 --> 01:04:25.660
I've got Microsoft's degree to fund one via Azure.

01:04:26.620 --> 01:04:32.700
And just we have to get it to, I haven't talked to Christian about it yet, but we'll figure out getting a build bot going.

01:04:32.700 --> 01:04:44.480
And then we're, I, part of one of Brett's crazy grand plans around Python WebAssembly is we're defining an official platform support for Cpython right now for in PEP 11.

01:04:44.480 --> 01:04:52.080
And my hope is we're going to get it so that Christian and I are listed as the maintainers of the WebAssembly support in Cpython.

01:04:52.080 --> 01:05:00.560
And we'll get it listed as an official tier two, what we're calling tier two supported platform, which basically means it's backed by two core devs, at least, and a build bot.

01:05:00.560 --> 01:05:06.120
But the idea of tier one is something the entire core team supports and is based on continuous integration.

01:05:06.120 --> 01:05:06.960
That's really exciting.

01:05:06.960 --> 01:05:16.340
Yeah, well, one of the actually nice things about WebAssembly is we could theoretically even get that to a tier one because WebAssembly is an abstracted assembly language, but it's not CPU dependent.

01:05:16.340 --> 01:05:25.460
So we could actually compile it on GitHub actions and test on that just as equally as Mac, Windows, or Linux and have it still be fully tested and work on CI.

01:05:25.460 --> 01:05:28.380
And I mean, you can take this idea really far, right?

01:05:28.380 --> 01:05:34.700
Like suddenly we could start having executable code examples in the documentation for Python because we've got a runtime now.

01:05:34.700 --> 01:05:35.940
We can literally make that work.

01:05:35.940 --> 01:05:40.940
Yeah, because yeah, you don't have to worry about security or compute costs because it's in your browser.

01:05:40.940 --> 01:05:43.100
You hack yourself and it's your compute.

01:05:43.100 --> 01:05:43.360
Right.

01:05:43.360 --> 01:05:51.340
Selfishly for me at work, when this works, I can start talking about shipping the node version of this with the Python extension for VS Code or as its own extension.

01:05:51.340 --> 01:05:52.680
So like you don't have Python installed?

01:05:52.680 --> 01:05:57.660
Install this other extension that's going to come with Python compiled to WebAssembly and you'll just have it.

01:05:57.660 --> 01:06:00.860
Or VS Code.dev browser version.

01:06:00.860 --> 01:06:06.340
We could potentially start shipping that with VS Code.dev and have the Python extension pull that in.

01:06:06.340 --> 01:06:11.420
And now you'll even have a runtime in the browser that ties into what I think is a nice editor.

01:06:11.420 --> 01:06:15.780
So there's a lot of possibilities here that we really want to get going with.

01:06:16.200 --> 01:06:20.000
And then when you start talking about WASI, right, then you start to get to edge compute.

01:06:20.000 --> 01:06:24.400
Christian just got that working like literally, I think, last week.

01:06:24.400 --> 01:06:25.860
I don't know where it stands yet.

01:06:25.860 --> 01:06:26.820
Working again.

01:06:26.820 --> 01:06:31.480
So the first version was like hacking and patching lots of things out.

01:06:31.600 --> 01:06:32.000
Oh, yeah.

01:06:32.000 --> 01:06:32.920
All the P thread work.

01:06:32.920 --> 01:06:33.320
Yeah.

01:06:33.320 --> 01:06:41.660
And the new version like a week ago was using a library from a company that's also working on Python support.

01:06:41.660 --> 01:06:43.800
They're like stubs and hacks.

01:06:43.800 --> 01:06:44.980
Single store labs, right?

01:06:44.980 --> 01:06:45.180
Yeah.

01:06:45.180 --> 01:06:45.840
Single store labs.

01:06:45.840 --> 01:06:46.020
Yeah.

01:06:46.020 --> 01:06:50.880
So WASI is even more restricted and limited compared to what was in MScript then.

01:06:51.080 --> 01:06:58.980
So you don't have any support like for threading, but you can't compile Python without at least the threading library headers.

01:06:58.980 --> 01:07:02.400
And they just had like book arounds for that too.

01:07:02.400 --> 01:07:03.860
So you can't spawn a spread.

01:07:03.860 --> 01:07:12.640
So if you try to start a thread who just failed, at least you have enough like of the CIPA available to compile Python for bits and bits.

01:07:12.640 --> 01:07:14.040
That's super exciting.

01:07:14.040 --> 01:07:17.400
Just to be clear on that, it's not a completely new effort.

01:07:17.620 --> 01:07:23.440
There's actually a productive version of Python for Rep Assembly in the browser called Pyodide.

01:07:23.440 --> 01:07:24.280
Yeah.

01:07:24.280 --> 01:07:28.380
And which is also now used by JupyterLite.

01:07:28.380 --> 01:07:33.280
So JupyterLite is Jupyter Notebooks on top of Pyodide.

01:07:33.280 --> 01:07:33.940
Yeah.

01:07:33.940 --> 01:07:35.420
JupyterLite's looking really interesting.

01:07:35.420 --> 01:07:35.720
Yeah.

01:07:35.720 --> 01:07:36.260
Yeah.

01:07:36.260 --> 01:07:44.000
And we actually met with the Pyodide team and more or less what we came to an agreement seems a little weird to phrase it this way.

01:07:44.080 --> 01:07:51.900
But basically an agreement where we will keep trying to make it so that the main branch in CPython can compile cleanly to WebAssembly.

01:07:51.900 --> 01:08:03.160
And that frees them to focus on JavaScript API to tie into it and on getting the scientific stack compiled over to WebAssembly because you have to do some hacky bits.

01:08:03.160 --> 01:08:03.440
Right.

01:08:03.440 --> 01:08:07.060
Because you got to compile like matplotlib and stuff because it's got C in it.

01:08:07.060 --> 01:08:08.200
So you got to compile it over there.

01:08:08.200 --> 01:08:08.920
Or I don't know.

01:08:08.920 --> 01:08:10.300
Some of those like NumPy definitely.

01:08:10.480 --> 01:08:10.800
Exactly.

01:08:10.800 --> 01:08:15.760
Because traditionally they had to do all the patches and all the work every Python release to get it working.

01:08:15.760 --> 01:08:18.540
And Christian and I are just in a better position to be able to keep that up and going.

01:08:18.540 --> 01:08:20.840
So we just said, let us handle that part.

01:08:20.840 --> 01:08:22.080
You don't have to worry about patching anymore.

01:08:22.080 --> 01:08:27.960
You can focus on the stuff that's more unique to WebAssembly and what you're able to be good at over there.

01:08:27.960 --> 01:08:31.840
So that's kind of where we're divvying up the workload here is we're just going to keep main working.

01:08:32.020 --> 01:08:35.680
And then they get to stop worrying about that once they start worrying about Python 3.11.

01:08:35.680 --> 01:08:45.200
So one of the first things that Ethan and I did just we took the patch that's that were developed by pilot developers and adjusted them and made them compatible.

01:08:45.200 --> 01:08:48.400
So we can actually merge them and have them in the upstream code.

01:08:48.520 --> 01:08:56.780
So a lot of their patches was just replacing things, but not in a way that would work if you would build the same source code for Standard Python.

01:08:56.780 --> 01:09:01.860
So they're just hacking around and getting things working, which is totally okay for their approach.

01:09:01.860 --> 01:09:06.180
But you couldn't just take their pull requests and their patches.

01:09:06.180 --> 01:09:12.600
So we had to make them in a way that this would work for Standard Python and WebAssembly Python.

01:09:12.600 --> 01:09:13.780
Yeah, fantastic.

01:09:13.780 --> 01:09:16.980
Well, two things spring to mind for me when I hear this.

01:09:16.980 --> 01:09:27.000
One is, does this mean I could write Electron apps and just have the slightest shim that then just lets me run like a backend in Python?

01:09:27.000 --> 01:09:32.380
You know, the sort of Node.js side of that in Python, which would be awesome.

01:09:32.380 --> 01:09:35.180
It should because Electron ships with Node.

01:09:35.180 --> 01:09:37.280
So as long as you have access to the Node runtime.

01:09:37.280 --> 01:09:38.940
Yeah, and you just get it on top of there.

01:09:38.940 --> 01:09:42.540
And then instead of writing all your sort of core logic of your app.

01:09:42.540 --> 01:09:47.940
You'll have to shim out back to JavaScript appropriately and have those APIs, which you might want Pyodide for potentially.

01:09:47.940 --> 01:09:51.100
But yeah, basically, yes, that door is open.

01:09:51.100 --> 01:09:52.000
Yeah, that's cool.

01:09:52.000 --> 01:09:56.160
I don't know Electron.js well enough to say, oh, I could totally just go do that.

01:09:56.160 --> 01:09:58.660
But I see that as a possibility that would be awesome.

01:09:58.660 --> 01:10:04.580
Yeah, so what we don't have probably won't add in the near future is any kind of bindings to JavaScript.

01:10:04.580 --> 01:10:12.940
So you can run like Python in your browser as like an isolated process or work web worker.

01:10:12.940 --> 01:10:21.780
But communication back and forth between like the outside world in the Node.js or browser world and Python, that's provided by Pyodide.

01:10:21.780 --> 01:10:22.900
But we don't have that.

01:10:22.900 --> 01:10:23.540
Right, right, right.

01:10:23.540 --> 01:10:27.200
So there's a very fun and great talk by Katie Bell.

01:10:27.200 --> 01:10:31.260
She also helped us to kickstart the port.

01:10:31.260 --> 01:10:36.600
She gave a talk at PyCon AU a couple months ago.

01:10:36.600 --> 01:10:39.020
It was like 10 minutes introduction.

01:10:39.020 --> 01:10:46.640
Two minutes compiling Python to WebAssembly and 28 minutes get STD in working.

01:10:47.280 --> 01:10:56.000
So just STD in, STD out working took like half an hour of her talk because that's surprisingly, surprisingly hard with WebAssembly.

01:10:56.000 --> 01:10:56.300
Yeah.

01:10:56.440 --> 01:11:06.660
We kind of made the decision that at least for now, we are not interested in trying to develop that FFI back and forth with JavaScript and having that opinionated API.

01:11:06.660 --> 01:11:12.000
And that's, as I said, kind of the agreement we've come up with Pyodide right now is they already have an API.

01:11:12.000 --> 01:11:16.120
We're going to lean on them to provide that for now at least and probably will continuously.

01:11:16.120 --> 01:11:17.720
I don't really necessarily see us changing this.

01:11:17.720 --> 01:11:21.660
And we'll just provide the lower level functionality of just the runtime.

01:11:21.960 --> 01:11:22.080
Right.

01:11:22.080 --> 01:11:22.340
Yeah.

01:11:22.340 --> 01:11:25.740
But if you all build that, it's a great foundation for other people to run with.

01:11:25.740 --> 01:11:26.100
Exactly.

01:11:26.100 --> 01:11:26.480
Yeah.

01:11:26.480 --> 01:11:31.180
And then the other one, but first of all, is this the talk that you're talking about?

01:11:31.180 --> 01:11:31.480
Yes.

01:11:31.480 --> 01:11:32.120
That's the one.

01:11:32.120 --> 01:11:32.940
That's Katie.

01:11:32.940 --> 01:11:33.140
Okay.

01:11:33.140 --> 01:11:34.880
I'll put, yeah, that's Katie's talk.

01:11:34.880 --> 01:11:35.040
Great.

01:11:35.040 --> 01:11:36.000
I'll put that in the show notes.

01:11:36.000 --> 01:11:39.320
The other one is, is that the right URL?

01:11:39.320 --> 01:11:40.160
Danger.

01:11:40.160 --> 01:11:41.600
Yes.

01:11:41.600 --> 01:11:44.720
Is this a Blazor project from the C# .NET team?

01:11:44.720 --> 01:11:44.980
Yep.

01:11:45.040 --> 01:11:52.160
This is .NET, the .NET runtime as a front end framework running in the browser, which is pretty awesome.

01:11:52.160 --> 01:12:00.180
And it seems like there's just so many parallels that could be brought to the Python world that like you don't have to do Angular.

01:12:00.180 --> 01:12:02.340
You can just do PyBlazor.

01:12:02.340 --> 01:12:04.580
I mean, that's not the name, but you know what I'm saying?

01:12:04.580 --> 01:12:07.040
Like it's closer to possible.

01:12:07.040 --> 01:12:10.320
And I think this is actually something that would be really neat.

01:12:10.320 --> 01:12:10.840
Yes.

01:12:10.840 --> 01:12:21.480
The trick here, and I think Blazor does the same thing right now as well, is from my understanding, Blazor has a WebAssembly compiled .NET runtime that gets loaded into the client.

01:12:21.480 --> 01:12:21.740
Yeah.

01:12:21.740 --> 01:12:23.040
And then that's how it does the execution.

01:12:23.040 --> 01:12:25.580
If I understand how Blazor works correctly.

01:12:25.580 --> 01:12:29.360
And so you could do a theoretical same thing with Python.

01:12:29.360 --> 01:12:33.480
Now, obviously there is size issues to consider here, right?

01:12:33.480 --> 01:12:38.120
Like this is not something you necessarily on a really slow connection somewhere would want to actually pull down.

01:12:38.120 --> 01:12:41.660
Because I think the one time, is it 5 megs now, Christian?

01:12:41.660 --> 01:12:42.540
Or is it 3?

01:12:42.540 --> 01:12:46.580
So the uncompressed Wasm is like 6 megabytes.

01:12:46.580 --> 01:12:48.320
It gets down to like 4.

01:12:48.320 --> 01:12:54.680
And then you have the big bundle of the data file that contains the Python compiled files.

01:12:54.680 --> 01:12:56.540
It's another 5 or 6 MB.

01:12:56.540 --> 01:12:57.960
It's big.

01:12:58.220 --> 01:12:59.460
But actually it's smaller.

01:12:59.460 --> 01:12:59.740
Okay.

01:12:59.740 --> 01:13:00.820
3 MB.

01:13:00.820 --> 01:13:03.020
Can you scroll up a bit?

01:13:03.020 --> 01:13:04.080
The .data file.

01:13:04.080 --> 01:13:05.500
It's the standard library.

01:13:05.500 --> 01:13:07.420
Did I?

01:13:07.420 --> 01:13:08.380
Did I care a lot?

01:13:08.380 --> 01:13:08.440
Yeah.

01:13:08.440 --> 01:13:08.580
Yeah.

01:13:08.580 --> 01:13:08.980
Group tab.

01:13:08.980 --> 01:13:10.480
Python data and Python web.

01:13:10.480 --> 01:13:10.900
Yeah.

01:13:10.900 --> 01:13:16.040
So it's 3 megs for the standard library, 212 kilobytes for the wrapper.

01:13:16.820 --> 01:13:18.620
And you've already cached the Wasm.

01:13:18.620 --> 01:13:20.700
So it's probably 6 MB.

01:13:20.700 --> 01:13:22.840
But so we can probably make it a bit smaller.

01:13:22.840 --> 01:13:30.480
So currently that comes like with elementary and decimal model and all the hashing libraries

01:13:30.480 --> 01:13:31.620
compiled in.

01:13:31.620 --> 01:13:34.900
So we currently create one gigantic binary.

01:13:34.900 --> 01:13:39.200
There are ways to have side models like shared libraries with Wasm.

01:13:39.360 --> 01:13:41.760
It's a bit more complicated to get that right.

01:13:41.760 --> 01:13:47.000
And also it increases the size of the main binary, the main model a bit.

01:13:47.000 --> 01:13:49.900
I didn't go into that yet.

01:13:49.900 --> 01:13:53.040
It's something I look into maybe in the future.

01:13:53.040 --> 01:13:57.140
But as you were talking about earlier, Michael, about like slicing and dicing the standard library,

01:13:57.140 --> 01:14:01.800
if you're shipping the runtime, you can also shrink that down by just dropping all the parts

01:14:01.800 --> 01:14:02.720
of the standard library you don't need.

01:14:02.720 --> 01:14:03.340
Right?

01:14:03.340 --> 01:14:06.920
So if you run like module finder or some other script that's going to go through the standard

01:14:06.920 --> 01:14:10.100
library to figure out what you do and don't need, you could actually just compile your

01:14:10.100 --> 01:14:14.920
own version of Python, CPython for WebAssembly only with the standard library that you want.

01:14:14.920 --> 01:14:15.360
Interesting.

01:14:15.360 --> 01:14:16.540
You get it really small, right?

01:14:16.540 --> 01:14:22.460
So which of these three, Python.js, Python data, and Python.wasm is the, has cEval.c in it?

01:14:22.460 --> 01:14:23.500
The Wasm file.

01:14:23.500 --> 01:14:24.100
The Wasm one.

01:14:24.100 --> 01:14:24.320
Okay.

01:14:24.320 --> 01:14:27.240
So that's two megs and then plus the standard library bits, right?

01:14:27.240 --> 01:14:27.500
Yeah.

01:14:27.500 --> 01:14:31.620
So it's a little over five megs in total for everything, which isn't huge.

01:14:31.620 --> 01:14:35.520
Like an internet project that you might need?

01:14:36.020 --> 01:14:37.940
Totally fine for Electron apps, as you said.

01:14:37.940 --> 01:14:40.740
It would be totally fine for a single page app.

01:14:40.740 --> 01:14:41.720
It'd be fine for Gmail.

01:14:41.720 --> 01:14:42.040
Yeah.

01:14:42.040 --> 01:14:44.580
It's something you're going to leave up and running constantly and not change.

01:14:44.580 --> 01:14:44.800
Yeah.

01:14:44.800 --> 01:14:49.560
It's within the realm of probably what Facebook's already downloading onto your machine right

01:14:49.560 --> 01:14:50.040
now anyway.

01:14:50.040 --> 01:14:50.420
Yeah.

01:14:50.420 --> 01:14:50.580
Yeah.

01:14:50.580 --> 01:14:52.280
Just run an ad blocker and it'll do less.

01:14:52.280 --> 01:14:54.980
All right.

01:14:54.980 --> 01:14:59.520
I think we are well over time, but you guys, it's, it's always great to talk to you.

01:14:59.520 --> 01:15:00.120
Yeah.

01:15:00.120 --> 01:15:00.940
Good work.

01:15:00.940 --> 01:15:03.280
I dream of Pi Blazer happening.

01:15:03.280 --> 01:15:07.080
And I also saw a nice, interesting comment that triggered a thought.

01:15:07.080 --> 01:15:11.660
It's progressive web apps are not really a thing we can do in Python very well because

01:15:11.660 --> 01:15:16.560
for a progressive web app, it's really got to be all offline in some meaningful way.

01:15:16.560 --> 01:15:22.700
But, but if you could bring Python.wasm down, maybe use local DB, there might be some really

01:15:22.700 --> 01:15:27.460
interesting ways that progressive web apps become way more interesting to us as Python

01:15:27.460 --> 01:15:28.360
web developers.

01:15:28.360 --> 01:15:28.640
Okay.

01:15:28.640 --> 01:15:31.720
Now I have to confess, I have no clue what the progressive web app is.

01:15:31.720 --> 01:15:34.040
I don't know anything about lecture web development.

01:15:34.040 --> 01:15:38.040
I got Python working on the browser, but I don't know how browsers work.

01:15:38.040 --> 01:15:38.700
Awesome.

01:15:38.700 --> 01:15:40.700
I will give one last tease though, Michael.

01:15:40.700 --> 01:15:43.580
I had two motivations for getting into this whole WebAssembly thing.

01:15:43.580 --> 01:15:45.600
Browser, mobile.

01:15:45.600 --> 01:15:49.240
Because every phone has a WebAssembly runtime.

01:15:49.240 --> 01:15:50.760
Thanks to all of them shipping out the browser.

01:15:50.760 --> 01:15:51.180
Yeah.

01:15:51.180 --> 01:15:51.440
Yeah.

01:15:51.440 --> 01:15:51.600
Yeah.

01:15:51.600 --> 01:15:51.700
Yeah.

01:15:51.700 --> 01:15:51.880
Yeah.

01:15:52.460 --> 01:15:52.760
Okay.

01:15:52.760 --> 01:15:54.220
Now I'm also very interested.

01:15:54.220 --> 01:15:59.120
I would rather have a mobile option than a offline than a front end web option.

01:15:59.120 --> 01:16:00.380
So there we have it.

01:16:00.380 --> 01:16:02.200
Although these may well go together, honestly.

01:16:02.200 --> 01:16:03.200
Yeah.

01:16:03.200 --> 01:16:03.780
All right.

01:16:03.780 --> 01:16:06.180
Well, thank you both for your hard work on this PEP.

01:16:06.180 --> 01:16:11.440
And then it's super interesting to see how it kind of ties back into this, like more focused

01:16:11.440 --> 01:16:12.620
runtime than more places.

01:16:12.620 --> 01:16:13.340
Yeah.

01:16:13.340 --> 01:16:13.960
All right.

01:16:13.960 --> 01:16:16.280
Before you get out of here really quick, last question I'm going to ask you.

01:16:16.280 --> 01:16:19.140
Just keep to one since I kind of know the answers for the other.

01:16:19.140 --> 01:16:19.640
I'm pretty sure.

01:16:19.880 --> 01:16:23.680
Anyway, notable PyPI package you want to give a shout out to before we dip.

01:16:23.680 --> 01:16:24.340
Oh, man.

01:16:24.340 --> 01:16:30.440
There's one that runs WebAssembly, like something you can have, like Python that'll basically

01:16:30.440 --> 01:16:32.560
interoperate with any WebAssembly one.

01:16:32.560 --> 01:16:34.340
I can't remember quite what that was called, though.

01:16:34.340 --> 01:16:36.480
I think WasmTime has one.

01:16:36.480 --> 01:16:36.780
Yeah.

01:16:36.780 --> 01:16:37.080
Yeah.

01:16:37.080 --> 01:16:37.800
There's a couple.

01:16:37.800 --> 01:16:41.880
There's a couple of people who've posted stuff to PyPI that let you load a WebAssembly

01:16:41.880 --> 01:16:42.880
code and actually run them.

01:16:42.880 --> 01:16:45.140
And I think WasmTime might be one of them.

01:16:45.140 --> 01:16:49.600
WasmTime is a WebAssembly runtime run by the Bycode Alliance.

01:16:49.600 --> 01:16:52.460
And it's usually the most cutting edge of all of them.

01:16:52.460 --> 01:16:56.540
So if anyone wants to play with this and looking for a runtime, WasmTime is probably a good one.

01:16:56.540 --> 01:16:58.280
Python embedding of WasmTime.

01:16:58.280 --> 01:16:58.720
Python plugin.

01:16:58.720 --> 01:16:58.960
Perfect.

01:16:58.960 --> 01:17:01.060
And you can ask Christian what his favorite editor is.

01:17:01.060 --> 01:17:01.660
Yeah.

01:17:01.660 --> 01:17:02.340
The right one.

01:17:02.340 --> 01:17:03.060
The good one.

01:17:03.060 --> 01:17:04.180
I use a couple.

01:17:04.180 --> 01:17:06.480
So I use PyCharm.

01:17:06.480 --> 01:17:07.340
I use VS Code.

01:17:07.340 --> 01:17:07.980
I use Vim.

01:17:07.980 --> 01:17:09.400
So depending on my needs.

01:17:09.400 --> 01:17:09.880
You use them all?

01:17:09.880 --> 01:17:10.420
Yeah.

01:17:10.560 --> 01:17:12.300
You've got a whole survey, the whole spectrum.

01:17:12.300 --> 01:17:12.540
Yeah.

01:17:12.540 --> 01:17:12.920
That's awesome.

01:17:12.920 --> 01:17:13.720
Cool.

01:17:13.720 --> 01:17:17.120
And then a notable package you want to give a quick shout out to before we get out here?

01:17:17.120 --> 01:17:17.920
It's very late.

01:17:17.920 --> 01:17:18.420
I don't know.

01:17:18.420 --> 01:17:19.640
The Python standard library.

01:17:19.640 --> 01:17:20.060
Yeah.

01:17:20.060 --> 01:17:23.220
The lack of certain things in the standard library.

01:17:23.220 --> 01:17:25.960
It's like an anti-module.

01:17:25.960 --> 01:17:27.200
The fact that you guys are taking it out.

01:17:27.200 --> 01:17:28.980
Oh, the anti-gravity model is also fun.

01:17:28.980 --> 01:17:29.340
Oh, yeah.

01:17:29.340 --> 01:17:29.500
Sure.

01:17:29.500 --> 01:17:29.800
All right.

01:17:29.800 --> 01:17:30.580
Anti-gravity.

01:17:30.580 --> 01:17:31.920
PIP install anti-gravity.

01:17:31.920 --> 01:17:32.180
Now.

01:17:32.180 --> 01:17:33.480
Maybe it's in the standard library.

01:17:33.480 --> 01:17:36.880
I'm going to give you all up here on the WebAssembly one.

01:17:37.080 --> 01:17:38.320
That would not work.

01:17:38.320 --> 01:17:40.080
I removed that.

01:17:40.080 --> 01:17:40.920
Oh.

01:17:40.920 --> 01:17:44.780
Because that requires the browser model, which requires the sub-process.

01:17:44.780 --> 01:17:44.940
I'm in a browser.

01:17:44.940 --> 01:17:46.800
So you can't run any processes.

01:17:46.800 --> 01:17:47.700
So it's.

01:17:47.700 --> 01:17:48.080
Yeah.

01:17:48.080 --> 01:17:48.480
I know.

01:17:48.480 --> 01:17:48.920
I'm just kidding.

01:17:48.920 --> 01:17:50.120
I tried.

01:17:50.120 --> 01:17:50.780
For people to see.

01:17:50.780 --> 01:17:53.620
I tried to import anti-gravity inside the WASM REPL.

01:17:53.620 --> 01:17:54.620
It didn't do it.

01:17:54.620 --> 01:17:55.040
Not yet.

01:17:55.040 --> 01:17:55.500
Not yet.

01:17:55.500 --> 01:17:56.640
I wonder if I can do it.

01:17:56.640 --> 01:17:56.820
Yeah.

01:17:56.820 --> 01:17:57.220
I don't know.

01:17:57.220 --> 01:17:57.820
It may be.

01:17:57.820 --> 01:17:58.460
Maybe it can.

01:17:58.460 --> 01:17:58.980
It should.

01:17:58.980 --> 01:17:59.700
They all should.

01:17:59.700 --> 01:18:00.460
All right, you guys.

01:18:00.460 --> 01:18:01.520
Thank you so much for being here.

01:18:01.520 --> 01:18:03.540
I'm excited to see this progressing.

01:18:03.540 --> 01:18:05.020
I see it leading to good places.

01:18:05.020 --> 01:18:05.740
Thanks for having us, Michael.

01:18:05.740 --> 01:18:06.020
Bye.

01:18:06.120 --> 01:18:06.420
Bye-bye.

01:18:06.420 --> 01:18:06.900
See ya.

01:18:08.160 --> 01:18:10.720
This has been another episode of Talk Python To Me.

01:18:10.720 --> 01:18:12.540
Thank you to our sponsors.

01:18:12.540 --> 01:18:14.140
Be sure to check out what they're offering.

01:18:14.140 --> 01:18:15.560
It really helps support the show.

01:18:15.560 --> 01:18:17.720
Starting a business is hard.

01:18:17.720 --> 01:18:23.820
Microsoft for Startups, Founders Hub, provides all founders at any stage with free resources

01:18:23.820 --> 01:18:26.320
and connections to solve startup challenges.

01:18:26.320 --> 01:18:30.860
Apply for free today at talkpython.fm/founders hub.

01:18:31.700 --> 01:18:36.080
Fusion auth is your authentication and authorization platform built for devs.

01:18:36.080 --> 01:18:43.940
If you have a side project that needs custom login and registration, multi-factor authentication, social logins, or user management,

01:18:43.940 --> 01:18:47.200
then download Fusion Auth Community Edition for free.

01:18:47.840 --> 01:18:51.520
Check them out at talkpython.fm/fusion auth.

01:18:51.520 --> 01:18:53.220
Want to level up your Python?

01:18:53.220 --> 01:18:57.280
We have one of the largest catalogs of Python video courses over at Talk Python.

01:18:57.280 --> 01:19:02.460
Our content ranges from true beginners to deeply advanced topics like memory and async.

01:19:02.860 --> 01:19:05.120
And best of all, there's not a subscription in sight.

01:19:05.120 --> 01:19:08.020
Check it out for yourself at training.talkpython.fm.

01:19:08.020 --> 01:19:12.700
Be sure to subscribe to the show, open your favorite podcast app, and search for Python.

01:19:12.700 --> 01:19:14.000
We should be right at the top.

01:19:14.000 --> 01:19:19.160
You can also find the iTunes feed at /itunes, the Google Play feed at /play,

01:19:19.160 --> 01:19:23.380
and the direct RSS feed at /rss on talkpython.fm.

01:19:23.380 --> 01:19:26.800
We're live streaming most of our recordings these days.

01:19:26.800 --> 01:19:30.220
If you want to be part of the show and have your comments featured on the air,

01:19:30.220 --> 01:19:34.640
be sure to subscribe to our YouTube channel at talkpython.fm/youtube.

01:19:34.640 --> 01:19:36.480
This is your host, Michael Kennedy.

01:19:36.480 --> 01:19:37.780
Thanks so much for listening.

01:19:37.780 --> 01:19:38.940
I really appreciate it.

01:19:38.940 --> 01:19:40.860
Now get out there and write some Python code.

01:19:40.860 --> 01:20:01.480
I'll see you next time.

01:20:01.480 --> 01:20:31.460
Thank you.