Skip to content

Update 472-state-of-flask-and-pallets-in-2024.txt #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 39 additions & 40 deletions transcripts/472-state-of-flask-and-pallets-in-2024.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

00:02:19 projects around Flask and tools and variations like Court and so on. You give a really nice talk

00:02:26 at Embedded FlaskCon, talk a bit about that in a second, about the state of Palettes. I thought,
00:02:26 at Embedded Flask Con, talk a bit about that in a second, about the state of Palettes. I thought,

00:02:32 "You know what? Let's just take that idea and share it with everyone." Looking forward to

Expand Down Expand Up @@ -104,9 +104,9 @@

00:04:28 issue tracker saying, "Oh, you broke something." And ultimately, I had to tell them, "You need to

00:04:34 be using a tool. There's quite a few tools out now, although we don't have a lockfile standard
00:04:34 be using a tool. There's quite a few tools out now, although we don't have a lock file standard

00:04:38 yet, but there's pip compile, there's PDM, there's Rai. You need to use a tool and pin your
00:04:38 yet, but there's pip compile, there's PDM, there's Rye. You need to use a tool and pin your

00:04:44 dependency tree, because then you can see when there's updates, and you can update them deliberately

Expand All @@ -122,15 +122,15 @@

00:05:21 only addressed the primary dependencies, not the transitive dependency. They might pin Flask,

00:05:27 but did they pin Vexoid? I don't know. They may have, probably they didn't, unless they use pip
00:05:27 but did they pin Werkzeug? I don't know. They may have, probably they didn't, unless they use pip

00:05:32 freeze, but then you gather a bunch of garbage that isn't actually about your project that got

00:05:37 sucked in from some other thing. It was really sort of funky before. I don't know, you mentioned

00:05:44 pip tools and pip compile. I am loving that workflow these days.

00:05:48 Yeah, that's what I've switched all the projects themselves to. If you go look at Flask or Vexoid
00:05:48 Yeah, that's what I've switched all the projects themselves to. If you go look at Flask or Werkzeug

00:05:53 or any of those, we have a requirements folder with different environment files that say, "Here

Expand Down Expand Up @@ -158,9 +158,9 @@

00:06:56 to a pin dependencies, and I just do the upgrade when I feel like, "Oh, let's go get some new

00:07:02 dependencies and see how that goes." Yeah, yeah, very nice. Okay, well, let's start with Flaskon.
00:07:02 dependencies and see how that goes." Yeah, yeah, very nice. Okay, well, let's start with Flask Con.

00:07:06 I called it an embedded conference, and this is different than it has been before. I think Flaskon
00:07:06 I called it an embedded conference, and this is different than it has been before. I think Flask Con

00:07:12 at one point was a purely online one, or maybe that was just COVID, and we just didn't have

Expand Down Expand Up @@ -260,7 +260,7 @@

00:11:28 Nick Kentar at North Bay Python a few times now, and I've told him, "We should try to bring that

00:11:33 back." I think there's a few other people who are interested as well. It doesn't have to be Flaskon
00:11:33 back." I think there's a few other people who are interested as well. It doesn't have to be Flask Con

00:11:38 specifically, but if I could run some sort of local conference and I could do some Flask stuff

Expand All @@ -274,11 +274,11 @@

00:12:02 and get notified about whatever this other thing is. Because it'll be in the same basic neighborhood.

00:12:06 Yeah. So Jazzy out in the audience asked, "Can we attend Flaskon online?"
00:12:06 Yeah. So Jazzy out in the audience asked, "Can we attend Flask Con online?"

00:12:13 This year, or this in-person one in 2024, we weren't able to do that. But all the talks are

00:12:20 available now on our YouTube channel. If you just search Flaskon 2024, you'll find it. Or
00:12:20 available now on our YouTube channel. If you just search Flask Con 2024, you'll find it. Or

00:12:27 pyvideo.org has all of them listed. The first three we ran were purely online. So you could

Expand All @@ -302,7 +302,7 @@

00:13:10 Yeah.

00:13:10 Yeah. That's really cool. So yeah, I'll link to the playlist of Flaskon 2024 for folks in the
00:13:10 Yeah. That's really cool. So yeah, I'll link to the playlist of Flask Con 2024 for folks in the

00:13:16 show notes. They can check that out. Awesome. Well, we'll see what 2025 brings. Hopefully,

Expand Down Expand Up @@ -384,7 +384,7 @@

00:16:39 and that sort of thing. So Flask is like the most popular library that everybody heard of,

00:16:45 followed by Jinja and Click. But then we also have VericSoig, which is the lower level stuff
00:16:45 followed by Jinja and Click. But then we also have WerkZeug, which is the lower level stuff

00:16:50 below Flask, and then MarkupSafe and It's Dangerous are two little helper libraries

Expand All @@ -396,13 +396,13 @@

00:17:14 Yeah. And like we're doing a lot of work on that to kind of try to unify Flask and Quart as much

00:17:22 as possible. So behind the scenes, they're sharing a lot more code now. Quart, like VericSoig,
00:17:22 as possible. So behind the scenes, they're sharing a lot more code now. Quart, like Werkzeug,

00:17:28 is all like the low level request response handling for the Flask users. And Quart wasn't

00:17:33 using that at first because it needed like much more async things. But we've managed to

00:17:38 develop a lot more things called, the term is called SansIO, like without input/output,
00:17:38 develop a lot more things called, the term is called SyncIO, like without input/output,

00:17:44 where we have all like the behavior that's common to both. It doesn't require asyncIO versus

Expand Down Expand Up @@ -626,7 +626,7 @@

00:26:19 been but a couple of months. It's around 75 million downloads a month. That's a hefty chunk of user

00:26:25 base there. Yeah. I occasionally look at pypistats.org or pepi.tech are the two websites that
00:26:25 base there. Yeah. I occasionally look at pypistats.org or pypi.tech are the two websites that

00:26:33 track these numbers. So I can look at the current one. Flask is downloads in the last day, 3.15

Expand Down Expand Up @@ -680,13 +680,13 @@

00:28:55 Oh, man, that's rough. Are you getting some support from the other people at the org and

00:28:59 potentially from the outside? Yeah, I I there is there are other people on the team. So it's not
00:28:59 potentially from the outside? Yeah, I there is there are other people on the team. So it's not

00:29:04 like we're a bus factor of one in the sense of like if I was not here for some reason,

00:29:09 other people would have access to these things and could keep them going. But the reality is

00:29:15 not to downplay all the work that they do in the community and when they they are working on code.
00:29:15 not to downplay all the work that they do in the community and when they are working on code.

00:29:21 But like I do probably 90 percent of the code and like the decision making and all that sort of

Expand Down Expand Up @@ -744,7 +744,7 @@

00:31:56 yeah. I can't find it. Yeah. We don't know. It is open source. Oh, here we go. Here we go.

00:32:02 Have we got a requirement? We've got a project dot Tomo. Oh yeah. It's Flask.
00:32:02 Have we got a requirement? We've got a project.toml. Oh yeah. It's Flask.

00:32:08 There you have it. I love that. There we go. Beautiful. It's very rewarding every time I find

Expand All @@ -768,13 +768,13 @@

00:33:08 we can go wherever you want. So maybe that a good foundation? Yeah, we did like Flask and

00:33:12 Vericsoig are pretty tied because most of the stuff that people report to Flask is actually
00:33:12 Werkzeug are pretty tied because most of the stuff that people report to Flask is actually

00:33:18 an issue with one of the other libraries that Flask is using. And most often that's with Vericsoig.
00:33:18 an issue with one of the other libraries that Flask is using. And most often that's with Werkzeug.

00:33:24 So you can see we're not at inbox zero, we're at inbox nine right now. That's incredible. You know,

00:33:28 maybe like I asked you to explain palettes like Vericsoig, you know, that's probably not how
00:33:28 maybe like I asked you to explain palettes like Werkzeug, you know, that's probably not how

00:33:33 English speaking folks would say that. Werkzeug or Werkzug or something. Right. But Armen,

Expand Down Expand Up @@ -872,7 +872,7 @@

00:37:28 for like my string or bytes. Even if most of the time, especially nowadays, people aren't

00:37:33 using Verixoic directly and all these tools. They're using Flask, which just does the right
00:37:33 using Werkzeug directly and all these tools. They're using Flask, which just does the right

00:37:37 thing from the get-go, which means all those intermediate checks on the way are totally

Expand All @@ -884,7 +884,7 @@

00:37:45 Testing 10 times for the same thing down the process.

00:37:48 Right. And this was just pervasive throughout. Verixoic was just everywhere with all these
00:37:48 Right. And this was just pervasive throughout. Werkzeug was just everywhere with all these

00:37:53 unnecessary checks. And it made the code more complex to maintain, reason about,

Expand All @@ -902,15 +902,15 @@

00:38:32 Yeah.

00:38:33 And so like Verixoic was doing all these things about letting you pass encodings all over the
00:38:33 And so like Werkzeug was doing all these things about letting you pass encodings all over the

00:38:38 place and switch between things. And that was also complexity. So I finally decided, okay,

00:38:45 I had heard some anecdotes as well from people who had switched from using Python 2 to Python 3,

00:38:50 or had stuck with Python 2 and old versions of Verixoic because they had noticed a significant
00:38:50 or had stuck with Python 2 and old versions of Werkzeug because they had noticed a significant

00:38:56 performance difference in the first versions of Verixoic that added that 2 and 3 compatibility.
00:38:56 performance difference in the first versions of Werkzeug that added that 2 and 3 compatibility.

00:39:00 And so I figured, okay, I'm going to get a similar speed up if I remove that now,

Expand All @@ -920,7 +920,7 @@

00:39:16 pick another function to keep working on and just slowly, slowly pull it all apart.

00:39:20 But I did end up with, so now Verixoic just supports strings everywhere, except in the
00:39:20 But I did end up with, so now Werkzeug just supports strings everywhere, except in the

00:39:27 very few places where it works directly with the request and response data where it handles bytes.

Expand Down Expand Up @@ -984,13 +984,13 @@

00:42:17 And so I've been doing work on like a meta level. So every project now, if you go look at Flask

00:42:23 and Ferg, so again, Jinja and you clone all the repos, all the repos look exactly the same. They
00:42:23 and Quart, so again, Jinja and you clone all the repos, all the repos look exactly the same. They

00:42:28 all have the same files, the same directory layout, same tool configurations, et cetera.

00:42:33 Because just like it should be easy for every contributor to get the same environment,

00:42:38 it should be easy for anybody who's used to contributing to Flask to go over to VeriXoic
00:42:38 it should be easy for anybody who's used to contributing to Flask to go over to Werkzeug

00:42:41 and be just as comfortable in that project. It's the Flask way and it all goes the same, right?

Expand All @@ -1000,7 +1000,7 @@

00:43:00 and it's evolved over the years too, because we were on Travis before and then we needed to make

00:43:06 like Windows builds for Markup Safe, which has wheels. So we were on AppVeyor also.
00:43:06 like Windows builds for Markup Safe, which has wheels. So we were on AppViewer also.

00:43:12 Then Travis went away and stuff and GitHub Actions became more. But that was all for tests.

Expand Down Expand Up @@ -1064,7 +1064,7 @@

00:45:58 GitHub actions, right? Yeah. And GitHub added their own. So the SLSA out of station that

00:46:04 I was talking about, if you scroll down on this screen, you can see that multiple.intodo.jsonl.
00:46:04 I was talking about, if you scroll down on this screen, you can see that multiple.intodo.json.

00:46:11 If you click on it, it's just a big blob of text, but that's basically describing here are these

Expand Down Expand Up @@ -1102,13 +1102,13 @@

00:47:36 is done for them. Yeah. Yeah. That's awesome. All right. So the two takeaways that I got from

00:47:41 Veric'soic's update was this dropping of the two to three juggling made it 50% faster for request
00:47:41 Werkzeug update was this dropping of the two to three juggling made it 50% faster for request

00:47:48 response and URL lib is no longer URL lib-ish. Yeah. Yeah. So that was the other part of it.

00:47:55 If we're going back to Vericoic, so we removed the string bytes, testing all over the place.
00:47:55 If we're going back to Werkzeug, so we removed the string bytes, testing all over the place.

00:48:02 And Vericoic, this was again, historically because of like Python two versus Python three
00:48:02 And Werkzeug, this was again, historically because of like Python two versus Python three

00:48:08 differences and then compatibility and stuff. But another of the changes in Python three was

Expand All @@ -1118,7 +1118,7 @@

00:48:25 packages instead. So it kind of changed the interfaces and where everything was. So at the

00:48:31 time it made sense for Vericoic to just copy that code into our own code base and then make
00:48:31 time it made sense for Werkzeug to just copy that code into our own code base and then make

00:48:37 our own tweaks to it to be compatible with everything. But what that ended up meaning

Expand All @@ -1130,17 +1130,17 @@

00:49:02 performance improvements and that sort of stuff. And we're not getting any of those benefits

00:49:05 because we now have like this vendored copy that we've changed ourselves. We couldn't even bring
00:49:05 because we now have like this vendor copy that we've changed ourselves. We couldn't even bring

00:49:08 in the changes. And just like the string bytes everywhere, having that our own copy of that

00:49:14 really complex low level code made it harder to reason about the code and maintain it. And all

00:49:20 this stuff is kind of like, it's not the essential parts of Vericoic. Vericoic is like trying to be
00:49:20 this stuff is kind of like, it's not the essential parts of Werkzeug. Werkzeug is like trying to be

00:49:25 the WSGI utilities and stuff. It's not trying to be like every single possible, like it's not

00:49:29 trying to, we don't need to make our own URL lib utility and everything to be Vericoic. So that
00:49:29 trying to, we don't need to make our own URL lib utility and everything to be Werkzeug. So that

00:49:34 was another big one where I identified like, okay, this is just a lot of complexity. I didn't

Expand Down Expand Up @@ -1212,7 +1212,7 @@

00:52:50 like is an expert in typing and like type annotations and static type tools, all the

00:52:56 libraries do pass mypy strict tests and export. Like we do do some testing against pywrite to
00:52:56 libraries do pass mypy strict tests and export. Like we do some testing against pyright to

00:53:05 some degree, but I'm just typing just, it's very hard for me to understand. Like it's a very

Expand Down Expand Up @@ -1403,4 +1403,3 @@
01:01:02 at talkpython.fm/youtube. This is your host, Michael Kennedy. Thanks so much for listening.

01:01:08 I really appreciate it. Now get out there and write some Python code.