|
52 | 52 |
|
53 | 53 | 00:02:19 projects around Flask and tools and variations like Court and so on. You give a really nice talk
|
54 | 54 |
|
55 |
| -00:02:26 at Embedded FlaskCon, talk a bit about that in a second, about the state of Palettes. I thought, |
| 55 | +00:02:26 at Embedded Flask Con, talk a bit about that in a second, about the state of Palettes. I thought, |
56 | 56 |
|
57 | 57 | 00:02:32 "You know what? Let's just take that idea and share it with everyone." Looking forward to
|
58 | 58 |
|
|
104 | 104 |
|
105 | 105 | 00:04:28 issue tracker saying, "Oh, you broke something." And ultimately, I had to tell them, "You need to
|
106 | 106 |
|
107 |
| -00:04:34 be using a tool. There's quite a few tools out now, although we don't have a lockfile standard |
| 107 | +00:04:34 be using a tool. There's quite a few tools out now, although we don't have a lock file standard |
108 | 108 |
|
109 |
| -00:04:38 yet, but there's pip compile, there's PDM, there's Rai. You need to use a tool and pin your |
| 109 | +00:04:38 yet, but there's pip compile, there's PDM, there's Rye. You need to use a tool and pin your |
110 | 110 |
|
111 | 111 | 00:04:44 dependency tree, because then you can see when there's updates, and you can update them deliberately
|
112 | 112 |
|
|
122 | 122 |
|
123 | 123 | 00:05:21 only addressed the primary dependencies, not the transitive dependency. They might pin Flask,
|
124 | 124 |
|
125 |
| -00:05:27 but did they pin Vexoid? I don't know. They may have, probably they didn't, unless they use pip |
| 125 | +00:05:27 but did they pin Werkzeug? I don't know. They may have, probably they didn't, unless they use pip |
126 | 126 |
|
127 | 127 | 00:05:32 freeze, but then you gather a bunch of garbage that isn't actually about your project that got
|
128 | 128 |
|
129 | 129 | 00:05:37 sucked in from some other thing. It was really sort of funky before. I don't know, you mentioned
|
130 | 130 |
|
131 | 131 | 00:05:44 pip tools and pip compile. I am loving that workflow these days.
|
132 | 132 |
|
133 |
| -00:05:48 Yeah, that's what I've switched all the projects themselves to. If you go look at Flask or Vexoid |
| 133 | +00:05:48 Yeah, that's what I've switched all the projects themselves to. If you go look at Flask or Werkzeug |
134 | 134 |
|
135 | 135 | 00:05:53 or any of those, we have a requirements folder with different environment files that say, "Here
|
136 | 136 |
|
|
158 | 158 |
|
159 | 159 | 00:06:56 to a pin dependencies, and I just do the upgrade when I feel like, "Oh, let's go get some new
|
160 | 160 |
|
161 |
| -00:07:02 dependencies and see how that goes." Yeah, yeah, very nice. Okay, well, let's start with Flaskon. |
| 161 | +00:07:02 dependencies and see how that goes." Yeah, yeah, very nice. Okay, well, let's start with Flask Con. |
162 | 162 |
|
163 |
| -00:07:06 I called it an embedded conference, and this is different than it has been before. I think Flaskon |
| 163 | +00:07:06 I called it an embedded conference, and this is different than it has been before. I think Flask Con |
164 | 164 |
|
165 | 165 | 00:07:12 at one point was a purely online one, or maybe that was just COVID, and we just didn't have
|
166 | 166 |
|
|
260 | 260 |
|
261 | 261 | 00:11:28 Nick Kentar at North Bay Python a few times now, and I've told him, "We should try to bring that
|
262 | 262 |
|
263 |
| -00:11:33 back." I think there's a few other people who are interested as well. It doesn't have to be Flaskon |
| 263 | +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 |
264 | 264 |
|
265 | 265 | 00:11:38 specifically, but if I could run some sort of local conference and I could do some Flask stuff
|
266 | 266 |
|
|
274 | 274 |
|
275 | 275 | 00:12:02 and get notified about whatever this other thing is. Because it'll be in the same basic neighborhood.
|
276 | 276 |
|
277 |
| -00:12:06 Yeah. So Jazzy out in the audience asked, "Can we attend Flaskon online?" |
| 277 | +00:12:06 Yeah. So Jazzy out in the audience asked, "Can we attend Flask Con online?" |
278 | 278 |
|
279 | 279 | 00:12:13 This year, or this in-person one in 2024, we weren't able to do that. But all the talks are
|
280 | 280 |
|
281 |
| -00:12:20 available now on our YouTube channel. If you just search Flaskon 2024, you'll find it. Or |
| 281 | +00:12:20 available now on our YouTube channel. If you just search Flask Con 2024, you'll find it. Or |
282 | 282 |
|
283 | 283 | 00:12:27 pyvideo.org has all of them listed. The first three we ran were purely online. So you could
|
284 | 284 |
|
|
302 | 302 |
|
303 | 303 | 00:13:10 Yeah.
|
304 | 304 |
|
305 |
| -00:13:10 Yeah. That's really cool. So yeah, I'll link to the playlist of Flaskon 2024 for folks in the |
| 305 | +00:13:10 Yeah. That's really cool. So yeah, I'll link to the playlist of Flask Con 2024 for folks in the |
306 | 306 |
|
307 | 307 | 00:13:16 show notes. They can check that out. Awesome. Well, we'll see what 2025 brings. Hopefully,
|
308 | 308 |
|
|
384 | 384 |
|
385 | 385 | 00:16:39 and that sort of thing. So Flask is like the most popular library that everybody heard of,
|
386 | 386 |
|
387 |
| -00:16:45 followed by Jinja and Click. But then we also have VericSoig, which is the lower level stuff |
| 387 | +00:16:45 followed by Jinja and Click. But then we also have WerkZeug, which is the lower level stuff |
388 | 388 |
|
389 | 389 | 00:16:50 below Flask, and then MarkupSafe and It's Dangerous are two little helper libraries
|
390 | 390 |
|
|
396 | 396 |
|
397 | 397 | 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
|
398 | 398 |
|
399 |
| -00:17:22 as possible. So behind the scenes, they're sharing a lot more code now. Quart, like VericSoig, |
| 399 | +00:17:22 as possible. So behind the scenes, they're sharing a lot more code now. Quart, like Werkzeug, |
400 | 400 |
|
401 | 401 | 00:17:28 is all like the low level request response handling for the Flask users. And Quart wasn't
|
402 | 402 |
|
403 | 403 | 00:17:33 using that at first because it needed like much more async things. But we've managed to
|
404 | 404 |
|
405 |
| -00:17:38 develop a lot more things called, the term is called SansIO, like without input/output, |
| 405 | +00:17:38 develop a lot more things called, the term is called SyncIO, like without input/output, |
406 | 406 |
|
407 | 407 | 00:17:44 where we have all like the behavior that's common to both. It doesn't require asyncIO versus
|
408 | 408 |
|
|
626 | 626 |
|
627 | 627 | 00:26:19 been but a couple of months. It's around 75 million downloads a month. That's a hefty chunk of user
|
628 | 628 |
|
629 |
| -00:26:25 base there. Yeah. I occasionally look at pypistats.org or pepi.tech are the two websites that |
| 629 | +00:26:25 base there. Yeah. I occasionally look at pypistats.org or pypi.tech are the two websites that |
630 | 630 |
|
631 | 631 | 00:26:33 track these numbers. So I can look at the current one. Flask is downloads in the last day, 3.15
|
632 | 632 |
|
|
680 | 680 |
|
681 | 681 | 00:28:55 Oh, man, that's rough. Are you getting some support from the other people at the org and
|
682 | 682 |
|
683 |
| -00:28:59 potentially from the outside? Yeah, I I there is there are other people on the team. So it's not |
| 683 | +00:28:59 potentially from the outside? Yeah, I there is there are other people on the team. So it's not |
684 | 684 |
|
685 | 685 | 00:29:04 like we're a bus factor of one in the sense of like if I was not here for some reason,
|
686 | 686 |
|
687 | 687 | 00:29:09 other people would have access to these things and could keep them going. But the reality is
|
688 | 688 |
|
689 |
| -00:29:15 not to downplay all the work that they do in the community and when they they are working on code. |
| 689 | +00:29:15 not to downplay all the work that they do in the community and when they are working on code. |
690 | 690 |
|
691 | 691 | 00:29:21 But like I do probably 90 percent of the code and like the decision making and all that sort of
|
692 | 692 |
|
|
744 | 744 |
|
745 | 745 | 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.
|
746 | 746 |
|
747 |
| -00:32:02 Have we got a requirement? We've got a project dot Tomo. Oh yeah. It's Flask. |
| 747 | +00:32:02 Have we got a requirement? We've got a project.toml. Oh yeah. It's Flask. |
748 | 748 |
|
749 | 749 | 00:32:08 There you have it. I love that. There we go. Beautiful. It's very rewarding every time I find
|
750 | 750 |
|
|
768 | 768 |
|
769 | 769 | 00:33:08 we can go wherever you want. So maybe that a good foundation? Yeah, we did like Flask and
|
770 | 770 |
|
771 |
| -00:33:12 Vericsoig are pretty tied because most of the stuff that people report to Flask is actually |
| 771 | +00:33:12 Werkzeug are pretty tied because most of the stuff that people report to Flask is actually |
772 | 772 |
|
773 |
| -00:33:18 an issue with one of the other libraries that Flask is using. And most often that's with Vericsoig. |
| 773 | +00:33:18 an issue with one of the other libraries that Flask is using. And most often that's with Werkzeug. |
774 | 774 |
|
775 | 775 | 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,
|
776 | 776 |
|
777 |
| -00:33:28 maybe like I asked you to explain palettes like Vericsoig, you know, that's probably not how |
| 777 | +00:33:28 maybe like I asked you to explain palettes like Werkzeug, you know, that's probably not how |
778 | 778 |
|
779 | 779 | 00:33:33 English speaking folks would say that. Werkzeug or Werkzug or something. Right. But Armen,
|
780 | 780 |
|
|
872 | 872 |
|
873 | 873 | 00:37:28 for like my string or bytes. Even if most of the time, especially nowadays, people aren't
|
874 | 874 |
|
875 |
| -00:37:33 using Verixoic directly and all these tools. They're using Flask, which just does the right |
| 875 | +00:37:33 using Werkzeug directly and all these tools. They're using Flask, which just does the right |
876 | 876 |
|
877 | 877 | 00:37:37 thing from the get-go, which means all those intermediate checks on the way are totally
|
878 | 878 |
|
|
884 | 884 |
|
885 | 885 | 00:37:45 Testing 10 times for the same thing down the process.
|
886 | 886 |
|
887 |
| -00:37:48 Right. And this was just pervasive throughout. Verixoic was just everywhere with all these |
| 887 | +00:37:48 Right. And this was just pervasive throughout. Werkzeug was just everywhere with all these |
888 | 888 |
|
889 | 889 | 00:37:53 unnecessary checks. And it made the code more complex to maintain, reason about,
|
890 | 890 |
|
|
902 | 902 |
|
903 | 903 | 00:38:32 Yeah.
|
904 | 904 |
|
905 |
| -00:38:33 And so like Verixoic was doing all these things about letting you pass encodings all over the |
| 905 | +00:38:33 And so like Werkzeug was doing all these things about letting you pass encodings all over the |
906 | 906 |
|
907 | 907 | 00:38:38 place and switch between things. And that was also complexity. So I finally decided, okay,
|
908 | 908 |
|
909 | 909 | 00:38:45 I had heard some anecdotes as well from people who had switched from using Python 2 to Python 3,
|
910 | 910 |
|
911 |
| -00:38:50 or had stuck with Python 2 and old versions of Verixoic because they had noticed a significant |
| 911 | +00:38:50 or had stuck with Python 2 and old versions of Werkzeug because they had noticed a significant |
912 | 912 |
|
913 |
| -00:38:56 performance difference in the first versions of Verixoic that added that 2 and 3 compatibility. |
| 913 | +00:38:56 performance difference in the first versions of Werkzeug that added that 2 and 3 compatibility. |
914 | 914 |
|
915 | 915 | 00:39:00 And so I figured, okay, I'm going to get a similar speed up if I remove that now,
|
916 | 916 |
|
|
920 | 920 |
|
921 | 921 | 00:39:16 pick another function to keep working on and just slowly, slowly pull it all apart.
|
922 | 922 |
|
923 |
| -00:39:20 But I did end up with, so now Verixoic just supports strings everywhere, except in the |
| 923 | +00:39:20 But I did end up with, so now Werkzeug just supports strings everywhere, except in the |
924 | 924 |
|
925 | 925 | 00:39:27 very few places where it works directly with the request and response data where it handles bytes.
|
926 | 926 |
|
|
984 | 984 |
|
985 | 985 | 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
|
986 | 986 |
|
987 |
| -00:42:23 and Ferg, so again, Jinja and you clone all the repos, all the repos look exactly the same. They |
| 987 | +00:42:23 and Quart, so again, Jinja and you clone all the repos, all the repos look exactly the same. They |
988 | 988 |
|
989 | 989 | 00:42:28 all have the same files, the same directory layout, same tool configurations, et cetera.
|
990 | 990 |
|
991 | 991 | 00:42:33 Because just like it should be easy for every contributor to get the same environment,
|
992 | 992 |
|
993 |
| -00:42:38 it should be easy for anybody who's used to contributing to Flask to go over to VeriXoic |
| 993 | +00:42:38 it should be easy for anybody who's used to contributing to Flask to go over to Werkzeug |
994 | 994 |
|
995 | 995 | 00:42:41 and be just as comfortable in that project. It's the Flask way and it all goes the same, right?
|
996 | 996 |
|
|
1000 | 1000 |
|
1001 | 1001 | 00:43:00 and it's evolved over the years too, because we were on Travis before and then we needed to make
|
1002 | 1002 |
|
1003 |
| -00:43:06 like Windows builds for Markup Safe, which has wheels. So we were on AppVeyor also. |
| 1003 | +00:43:06 like Windows builds for Markup Safe, which has wheels. So we were on AppViewer also. |
1004 | 1004 |
|
1005 | 1005 | 00:43:12 Then Travis went away and stuff and GitHub Actions became more. But that was all for tests.
|
1006 | 1006 |
|
|
1064 | 1064 |
|
1065 | 1065 | 00:45:58 GitHub actions, right? Yeah. And GitHub added their own. So the SLSA out of station that
|
1066 | 1066 |
|
1067 |
| -00:46:04 I was talking about, if you scroll down on this screen, you can see that multiple.intodo.jsonl. |
| 1067 | +00:46:04 I was talking about, if you scroll down on this screen, you can see that multiple.intodo.json. |
1068 | 1068 |
|
1069 | 1069 | 00:46:11 If you click on it, it's just a big blob of text, but that's basically describing here are these
|
1070 | 1070 |
|
|
1102 | 1102 |
|
1103 | 1103 | 00:47:36 is done for them. Yeah. Yeah. That's awesome. All right. So the two takeaways that I got from
|
1104 | 1104 |
|
1105 |
| -00:47:41 Veric'soic's update was this dropping of the two to three juggling made it 50% faster for request |
| 1105 | +00:47:41 Werkzeug update was this dropping of the two to three juggling made it 50% faster for request |
1106 | 1106 |
|
1107 | 1107 | 00:47:48 response and URL lib is no longer URL lib-ish. Yeah. Yeah. So that was the other part of it.
|
1108 | 1108 |
|
1109 |
| -00:47:55 If we're going back to Vericoic, so we removed the string bytes, testing all over the place. |
| 1109 | +00:47:55 If we're going back to Werkzeug, so we removed the string bytes, testing all over the place. |
1110 | 1110 |
|
1111 |
| -00:48:02 And Vericoic, this was again, historically because of like Python two versus Python three |
| 1111 | +00:48:02 And Werkzeug, this was again, historically because of like Python two versus Python three |
1112 | 1112 |
|
1113 | 1113 | 00:48:08 differences and then compatibility and stuff. But another of the changes in Python three was
|
1114 | 1114 |
|
|
1118 | 1118 |
|
1119 | 1119 | 00:48:25 packages instead. So it kind of changed the interfaces and where everything was. So at the
|
1120 | 1120 |
|
1121 |
| -00:48:31 time it made sense for Vericoic to just copy that code into our own code base and then make |
| 1121 | +00:48:31 time it made sense for Werkzeug to just copy that code into our own code base and then make |
1122 | 1122 |
|
1123 | 1123 | 00:48:37 our own tweaks to it to be compatible with everything. But what that ended up meaning
|
1124 | 1124 |
|
|
1130 | 1130 |
|
1131 | 1131 | 00:49:02 performance improvements and that sort of stuff. And we're not getting any of those benefits
|
1132 | 1132 |
|
1133 |
| -00:49:05 because we now have like this vendored copy that we've changed ourselves. We couldn't even bring |
| 1133 | +00:49:05 because we now have like this vendor copy that we've changed ourselves. We couldn't even bring |
1134 | 1134 |
|
1135 | 1135 | 00:49:08 in the changes. And just like the string bytes everywhere, having that our own copy of that
|
1136 | 1136 |
|
1137 | 1137 | 00:49:14 really complex low level code made it harder to reason about the code and maintain it. And all
|
1138 | 1138 |
|
1139 |
| -00:49:20 this stuff is kind of like, it's not the essential parts of Vericoic. Vericoic is like trying to be |
| 1139 | +00:49:20 this stuff is kind of like, it's not the essential parts of Werkzeug. Werkzeug is like trying to be |
1140 | 1140 |
|
1141 | 1141 | 00:49:25 the WSGI utilities and stuff. It's not trying to be like every single possible, like it's not
|
1142 | 1142 |
|
1143 |
| -00:49:29 trying to, we don't need to make our own URL lib utility and everything to be Vericoic. So that |
| 1143 | +00:49:29 trying to, we don't need to make our own URL lib utility and everything to be Werkzeug. So that |
1144 | 1144 |
|
1145 | 1145 | 00:49:34 was another big one where I identified like, okay, this is just a lot of complexity. I didn't
|
1146 | 1146 |
|
|
1212 | 1212 |
|
1213 | 1213 | 00:52:50 like is an expert in typing and like type annotations and static type tools, all the
|
1214 | 1214 |
|
1215 |
| -00:52:56 libraries do pass mypy strict tests and export. Like we do do some testing against pywrite to |
| 1215 | +00:52:56 libraries do pass mypy strict tests and export. Like we do some testing against pyright to |
1216 | 1216 |
|
1217 | 1217 | 00:53:05 some degree, but I'm just typing just, it's very hard for me to understand. Like it's a very
|
1218 | 1218 |
|
|
1403 | 1403 | 01:01:02 at talkpython.fm/youtube. This is your host, Michael Kennedy. Thanks so much for listening.
|
1404 | 1404 |
|
1405 | 1405 | 01:01:08 I really appreciate it. Now get out there and write some Python code.
|
1406 |
| - |
0 commit comments