Latest / Talk Python To Me / #561: TonIO, a Multi-threaded Async Runtime for Python
Transcript
- 0:00Michael Kennedy: How many cores does your machine have?
- 0:02Michael Kennedy: 10?
- 0:02Michael Kennedy: 18?
- 0:03Michael Kennedy: Well, your async Python code uses just one of them.
- 0:07Michael Kennedy: That isn't a bug in asyncio.
- 0:09Michael Kennedy: That's the design.
- 0:10Michael Kennedy: And things like optimizing the event loops to be faster by maybe 20% with uv doesn't fundamentally
- 0:17Michael Kennedy: change that.
- 0:17Michael Kennedy: That's why Giovanni Bariliari started over.
- 0:21Michael Kennedy: Joe is the creator of Granian, the Rust-based server that powers Talk Python and all the
- 0:26Michael Kennedy: other things we run here.
- 0:28Michael Kennedy: His new project is Tone.io, an async runtime written from scratch specifically for free-threaded Python.
- 0:34Michael Kennedy: Real threads, a handful of primitives instead of async.io's pile of them,
- 0:38Michael Kennedy: and it flat out refuses to even start if the GIL is present.
- 0:43Michael Kennedy: This is Talk Python To Me, episode 561, recorded September 1st, 2026.
- 1:10Michael Kennedy: Welcome to Talk Python To Me, the number one Python podcast for developers and data scientists.
- 1:15Michael Kennedy: This is your host, Michael Kennedy.
- 1:17Michael Kennedy: I'm a PSF fellow who's been coding for over 25 years.
- 1:21Michael Kennedy: Let's connect on social media.
- 1:22Michael Kennedy: You'll find me and Talk Python on Mastodon, BlueSky, and X.
- 1:26Michael Kennedy: The social links are all in your show notes.
- 1:28Michael Kennedy: You can find over 10 years of past episodes at talkpython.fm.
- 1:32Michael Kennedy: And if you want to be part of the show, you can join our recording live streams.
- 1:36Michael Kennedy: That's right.
- 1:36Michael Kennedy: We live stream the raw uncut version of each episode on YouTube.
- 1:40Michael Kennedy: Just visit talkpython.fm/youtube to see the schedule of upcoming events.
- 1:45Michael Kennedy: Be sure to subscribe there and press the bell so you'll get notified anytime we're recording.
- 1:49Michael Kennedy: This episode is sponsored by Sentry's Seer.
- 1:52Michael Kennedy: If you're tired of debugging in the dark, give Seer a try.
- 1:55Michael Kennedy: There are plenty of AI tools that help you write code, but Sentry's Seer is built to
- 1:59Michael Kennedy: help you fix it when it breaks.
- 2:01Michael Kennedy: Visit talkpython.fm/sentry and use the code Talk Python26, all one word, no spaces,
- 2:07Michael Kennedy: for $100 in Sentry credits.
- 2:09Michael Kennedy: And it's brought to you by us.
- 2:12Michael Kennedy: Talk Python and Python Bytes both now have MCP servers.
- 2:16Michael Kennedy: Point your AI at 10 plus years of Python episodes, transcripts, and show notes.
- 2:20Michael Kennedy: Free. Click MCP in the nav at talkpython.fm and at Python Bytes.
- 2:25Michael Kennedy: Hello, hello. Welcome back to Talk Python and me.
- 2:29Michael Kennedy: Great to have you here, Joe.
- 2:30Michael Kennedy: Hey, thanks for having me. It's nice to get back to the show.
- 2:33Michael Kennedy: It's been a while.
- 2:35Michael Kennedy: It has been a while.
- 2:36Michael Kennedy: And we talked about Granian last time, the Rust-based web application server for Python.
- 2:42Michael Kennedy: And I got to just take a moment and say thank you.
- 2:44Michael Kennedy: We'll come back to this.
- 2:45Michael Kennedy: But thanks for powering Talk Python and all the different things.
- 2:49Michael Kennedy: I think across our web apps, I don't know, like 10 million requests a month.
- 2:52Michael Kennedy: And it's been flawless.
- 2:54Michael Kennedy: So thanks.
- 2:55Michael Kennedy: I appreciate you serving up all the stuff for everyone.
- 2:58Giovanni Barallari: Oh, yeah.
- 2:59Giovanni Barallari: Thanks.
- 3:00Giovanni Barallari: It's been a pleasure.
- 3:00Giovanni Barallari: Like, it's nice to see, you know, when something just works.
- 3:04Giovanni Barallari: like when you do something and like at the end of the day it just works and people start using it
- 3:09Giovanni Barallari: like of course like they they ask for a bunch of features you know um but it's nice to see yeah it
- 3:16Michael Kennedy: is really nice to see and i think it's i think it's good now it's been a while since you've been on the
- 3:21Michael Kennedy: show a couple years i don't i didn't check the exact date when i look back maybe people are new
- 3:26Michael Kennedy: to the show or haven't heard your prior episode or just don't remember like give us a quick
- 3:30Giovanni Barallari: introduction who you are yeah sure so i'm giovanni but everybody can call me joe i'm italian but i
- 3:37Giovanni Barallari: live in vienna i am working as a programmer in century but i'm a physicist so i think like
- 3:44Giovanni Barallari: that's pretty peculiar i've been like in the open source ecosystem uh mainly in python um probably
- 3:53Giovanni Barallari: for the last oh god I think like it's almost 20 years now um and fun fact like I actually started
- 4:00Giovanni Barallari: like um doing open source or or um contributing to open source projects even before actually
- 4:07Giovanni Barallari: working as a programmer so um yeah that's me I maintain like too many packages nowadays for like
- 4:16Giovanni Barallari: the energy I have.
- 4:20Giovanni Barallari: But yeah, that's pretty much.
- 4:22Giovanni Barallari: Excellent.
- 4:22Michael Kennedy: Yeah, I know how that goes with the packages.
- 4:25Michael Kennedy: It's like, oh, here's a cool idea.
- 4:26Michael Kennedy: I want to put it out there.
- 4:27Michael Kennedy: If it gains no traction, you can shut it down.
- 4:30Michael Kennedy: If it gains a ton of traction, you're excited.
- 4:32Michael Kennedy: If it gains a little traction,
- 4:33Michael Kennedy: but enough, then you got to keep working on it.
- 4:35Michael Kennedy: That's kind of not ideal, right?
- 4:37Giovanni Barallari: Yeah.
- 4:37Giovanni Barallari: And especially like nowadays with AI,
- 4:39Giovanni Barallari: like the amount of things you,
- 4:41Giovanni Barallari: oh, I have an idea.
- 4:43Giovanni Barallari: Like the chances like to just throw a bunch of agents into that and see what happens.
- 4:49Giovanni Barallari: It's very dangerous.
- 4:50Giovanni Barallari: It's very dangerous.
- 4:51Michael Kennedy: I have an idea.
- 4:52Michael Kennedy: It'll probably take me an hour.
- 4:52Michael Kennedy: Let me see if I can validate it.
- 4:54Michael Kennedy: Thursday afternoon, you're still like, oh, I'm still almost there.
- 4:57Michael Kennedy: It's like, where did my week go?
- 4:59Michael Kennedy: What happened?
- 5:00Michael Kennedy: It's fun though, isn't it?
- 5:01Michael Kennedy: It's a wild time.
- 5:02Giovanni Barallari: Yeah, it's weird, right?
- 5:05Giovanni Barallari: Because in a way, we have this very powerful, not super constant tool.
- 5:14Giovanni Barallari: but it's very powerful and and sometimes just amazing like sometimes like what do you what
- 5:19Giovanni Barallari: you get back is just amazing and you say like oh okay that's nice that's unexpected sometimes is
- 5:27Giovanni Barallari: the dumbest thing possible you can you you can get but i guess like the point the main point is that
- 5:35Giovanni Barallari: i think it it shows up how as humans we have like a complicated relationship with tools
- 5:43Giovanni Barallari: it can exploit a bunch of weird human behavior sometimes so yeah yeah if you like building things
- 5:52Michael Kennedy: you know create you've got ideas and you want to see them come to life it's an unprecedented time
- 5:56Michael Kennedy: if if you really your main joy was to be in the code working on the little bits of nuance i can
- 6:03Michael Kennedy: see that it's frustrating and uh there's there's a whole there's a whole thing that we go into there
- 6:07Michael Kennedy: but that's probably not.
- 6:08Michael Kennedy: But wow, what a crazy time, right?
- 6:09Michael Kennedy: Yeah, absolutely.
- 6:11Michael Kennedy: Yeah, so let's jump into the topics here.
- 6:14Michael Kennedy: I think the first thing I want to do is let's just do a little dive into Granian.
- 6:19Michael Kennedy: That's why I reached out to you to have you on the show the first time.
- 6:21Michael Kennedy: Like I said, it's powering.
- 6:23Michael Kennedy: I have on the Talk Python server,
- 6:25Michael Kennedy: there's 33 different containers running a bunch of different things,
- 6:29Michael Kennedy: and probably about 15 of them are running Granian.
- 6:33Michael Kennedy: Nice.
- 6:33Michael Kennedy: Yeah.
- 6:34Michael Kennedy: So like I said, it's been really, really cool.
- 6:37Michael Kennedy: just tell people what is Granian because I think not only is it interesting as a thing that you've
- 6:41Michael Kennedy: done previously and been on the show before it's also an interesting lead-in to where we're going
- 6:45Giovanni Barallari: with Tonio so what's great yeah sure uh so Granian is an application server for Python so in Python
- 6:53Giovanni Barallari: for historical reasons um we separated like the application layer from the HTTP layer so when we
- 7:02Giovanni Barallari: want to serve a web application in Python compared to other languages
- 7:07Giovanni Barallari: in which the server part is actually a part of the application.
- 7:12Giovanni Barallari: In Python, we tend to have a separated package, which is a server,
- 7:19Giovanni Barallari: and that server's import your actual application.
- 7:22Giovanni Barallari: And then we have application protocols
- 7:26Giovanni Barallari: to make the server talk with your application and back.
- 7:31Giovanni Barallari: The two main protocols in Python are VUSGI or WSGI.
- 7:35Giovanni Barallari: I never really understood how to say that,
- 7:39Giovanni Barallari: which is like the original PET333, if I'm not mistaken.
- 7:45Giovanni Barallari: So it's quite ancient in the Python history.
- 7:49Giovanni Barallari: And once we had like AsyncIO, a new protocol emerged.
- 7:54Giovanni Barallari: That's called ASGI or ASGI because, of course,
- 7:57Giovanni Barallari: it's the asynchronous server gateway.
- 8:00Giovanni Barallari: So, Granian is, again, an application server,
- 8:06Giovanni Barallari: so you can consider it as an alternative to MicroVoosgi,
- 8:13Giovanni Barallari: Uvicorn, Hypercorn, and a bunch of other servers
- 8:17Giovanni Barallari: that happened during the years.
- 8:20Giovanni Barallari: And, yeah, the peculiar fact is it's made with Rust.
- 8:26Giovanni Barallari: So, compared to all the other servers you might use in Python,
- 8:29Giovanni Barallari: all the HTTP part or the network layer
- 8:35Giovanni Barallari: is running completely out of the interpreter,
- 8:40Giovanni Barallari: which kind of alleviates the load on the interpreter,
- 8:46Giovanni Barallari: like on the Python side.
- 8:48Giovanni Barallari: And depending on the context,
- 8:50Giovanni Barallari: it might be more performant
- 8:53Giovanni Barallari: or it might stabilize your latency more.
- 8:58Michael Kennedy: You know, I think thinking back now, I'm pretty sure that that was the reason I chose Granian.
- 9:03Michael Kennedy: Not that it was a ton faster, but the P95 bad side of things.
- 9:09Michael Kennedy: Like how much might it slow down under certain weird circumstances?
- 9:13Michael Kennedy: It was way more stable than a lot of the other servers, right?
- 9:17Michael Kennedy: And that's kind of what you're referring to.
- 9:19Giovanni Barallari: Yeah, because again, like a normal server which runs everything into Python,
- 9:23Giovanni Barallari: Like it has this kind of side effects that when your application is starting becoming slow, it kind of becomes like an infinite loop in which like the server adds additional load to the interpreter, which is already like highly loaded from your application.
- 9:39Giovanni Barallari: And so like Graniac kind of avoids all of that because like even if your application is fully loaded, like all the web and network layer is out of the interpreter.
- 9:50Giovanni Barallari: It doesn't disturb, let's say the interpreter with that.
- 9:53Michael Kennedy: Yeah.
- 9:53Michael Kennedy: I do want to just give a little bit of a hat tip to WSGI or WSGI.
- 9:58Michael Kennedy: Because, yeah, you pointed out it is old, but it's really, really nice that if somebody is out there running on GUnicorn or they're running on some other server, MicroWSGI, which you should stop running MicroWSGI because it's not supported anymore.
- 10:14Michael Kennedy: You don't have to change your code at all.
- 10:16Michael Kennedy: You just take your flask or your Jenga or whatever, and you just say, now run here.
- 10:20Michael Kennedy: And they just, Grandin talks WizGey or Asggy to that thing, and it's transparent.
- 10:25Michael Kennedy: It's beautiful.
- 10:26Michael Kennedy: Yeah.
- 10:26Michael Kennedy: Yeah.
- 10:26Giovanni Barallari: I mean, there are like still some, you know, sometimes weird things like, like, Vertzoic
- 10:34Giovanni Barallari: has some subtleties, sometimes some nuances.
- 10:37Giovanni Barallari: So I had to like add some environment key just for Verzoic because under some circumstances, if that key is not there, things don't work exactly good.
- 10:51Giovanni Barallari: So yes, I agree that like having like the two protocols separated and coded like in a specific way gives you this ability to switch the server.
- 11:02Giovanni Barallari: On the other hand, sometimes, you know, you can be a pain in some time.
- 11:08Giovanni Barallari: Yeah, for sure.
- 11:09Michael Kennedy: Yeah, for sure.
- 11:11Giovanni Barallari: But yeah, I'd say like we like recently it's getting more popular.
- 11:18Giovanni Barallari: So I'd say if I'm not mistaken, like a few weeks ago, I think I surpassed like HyperCorn in terms of downloads.
- 11:28Giovanni Barallari: Awesome.
- 11:29Giovanni Barallari: And yeah, it's used like in a bunch of different big companies, Microsoft, Google, for sure.
- 11:38Giovanni Barallari: We use it at Sentry, of course.
- 11:41Giovanni Barallari: And I think like Sentry is the only company in which we use like all the three supported
- 11:46Giovanni Barallari: protocols of Granian because Granian also supports like its own protocol, which is named
- 11:51Giovanni Barallari: like RSGI, I don't know, like RSGI, which is a redesign.
- 11:56Giovanni Barallari: Risky.
- 11:57Giovanni Barallari: Yeah.
- 12:00Giovanni Barallari: um so yeah i'd say it's going pretty good um i think like the last let's say this year was mostly
- 12:07Giovanni Barallari: into um not not not not mostly about features i think features but mostly about you know making
- 12:16Giovanni Barallari: the thing more stable and covering like some edge cases um especially again we're using it the
- 12:22Giovanni Barallari: Sentry. So now like if something is wrong with Grinia, like I have people knocking on my door.
- 12:28Michael Kennedy: I bet you do. Well, I mean, with Sentry, Sentry gets an insane amount of like an unimaginable
- 12:35Michael Kennedy: amount of traffic. I'm sure with the error reporting side of things and probably a little
- 12:39Michael Kennedy: more so these days on the MCP and API side as well with all the agents. I know that I use the MCP
- 12:46Michael Kennedy: and absolutely love it. It's been incredible. It's really, really good. I could just say on my
- 12:50Michael Kennedy: project hey there's a century error i got what's up like literally that's all i gotta say in clause
- 12:54Michael Kennedy: like hold on we're on it and it's like yeah you know five minutes later it's like here's what's
- 12:57Michael Kennedy: going on let's work on it you know yeah really good stuff uh i do want to give a quick shout out as
- 13:02Michael Kennedy: well uh on this regard to gradient like people are like oh it's it's not as popular as server x or
- 13:08Michael Kennedy: whatever right although i think that's starting to fade it's it's got 5 000 stars and a ton of
- 13:12Michael Kennedy: people using it and so on yeah but it's also based on hyper from rust which itself has uh where where's
- 13:19Michael Kennedy: my numbers, 410,000 projects using it. So it's really tested, right? And obviously the stuff at
- 13:25Giovanni Barallari: Sentry as well. Yeah. Yeah. Like the only thing I'm sure about Granian is that like the HTTP stack,
- 13:32Giovanni Barallari: that's super safe. Like that's like, I could bet like everything I have on that. So if something
- 13:38Giovanni Barallari: is wrong in Granian, like that's on me, not on Hyper, like to be clear. This portion of Talk
- 13:44Michael Kennedy: Python to me is brought to you by Sentry and Sear AI. There are plenty of AI tools that help you
- 13:50Michael Kennedy: write code, but Sentry Sear is built to help you fix it when it breaks. The difference is context.
- 13:55Michael Kennedy: Sear isn't just guessing based on syntax. It's analyzing your actual Sentry data,
- 14:00Michael Kennedy: your stack traces, logs, and failure patterns. Because it has the full context, it can
- 14:05Michael Kennedy: A, spot buggy code in review and help prevent issues before they happen,
- 14:10Michael Kennedy: and B, identify the root cause of production errors.
- 14:13Michael Kennedy: It can even draft a fix and hand the work off to an agent-like cursor to open a PR for you.
- 14:19Michael Kennedy: Seer turns Sentry into a complete loop.
- 14:21Michael Kennedy: You have your traces, errors, logs, and replays to see the problem,
- 14:24Michael Kennedy: and now AI to help solve it.
- 14:26Michael Kennedy: Join millions of devs at companies like Claude, Disney+, and even Talk Python,
- 14:31Michael Kennedy: who use Sentry to move faster.
- 14:33Michael Kennedy: Check them out at talkpython.fm/sentry and use code talkpython26,
- 14:38Michael Kennedy: all one word, for $100 in Sentry credits.
- 14:42Michael Kennedy: Thank you to Sentry for supporting Talk Python.
- 14:45Michael Kennedy: I recently did a post over on my personal blog
- 14:49Michael Kennedy: calling cutting Python web app memory by 31%.
- 14:52Michael Kennedy: And I did a ton of analysis and stuff
- 14:56Michael Kennedy: on how I was running Granian and different things,
- 14:59Michael Kennedy: just how I was running Python.
- 15:00Michael Kennedy: And I think this is going to be a good lead-in
- 15:02Michael Kennedy: to where we're going as well.
- 15:03Michael Kennedy: I got it to where I was using 1.3 gigs, let's say, for Talk Python training the courses specifically.
- 15:13Michael Kennedy: And people are like, oh, it's just a little courses thing.
- 15:15Michael Kennedy: Like, well, it has 178,000 lines of Python, so it's not a totally small project.
- 15:20Michael Kennedy: But down by the end, I did a bunch of stuff on it.
- 15:24Michael Kennedy: Lazy imports.
- 15:25Michael Kennedy: I switched to async, which is why I brought this up.
- 15:28Michael Kennedy: But somewhere down here, I don't know what the final number is.
- 15:31Michael Kennedy: Here we go.
- 15:31Michael Kennedy: In the end, I got it down to 450 megs from 0.28 gigs.
- 15:37Michael Kennedy: One of the main reasons I did that as a way I want to kind of want to lead into like this,
- 15:41Michael Kennedy: where we're going is I said, well, the way grading works is for each,
- 15:46Michael Kennedy: either you can make multi-processes that are single threaded or it could do multiple threads
- 15:49Michael Kennedy: and then it'll create a separate interpreter for each one.
- 15:51Michael Kennedy: Either way, it kind of like replicates out the running.
- 15:55Michael Kennedy: It'll create copies in one way or another of your code.
- 15:59Michael Kennedy: And that, if you could run one of them, that would be great.
- 16:01Michael Kennedy: But why do we have so many?
- 16:03Michael Kennedy: We have so many because of the GIL.
- 16:05Michael Kennedy: We have poor concurrency.
- 16:06Michael Kennedy: It's really hard to handle a lot of load and like actually access, you know, my servers,
- 16:10Michael Kennedy: eight cores.
- 16:11Michael Kennedy: Like I could only access one core like normally, right?
- 16:14Michael Kennedy: And so we do all these things to like explode them out.
- 16:17Michael Kennedy: But what is the most expensive?
- 16:19Michael Kennedy: Like five years ago, this was true on servers, but really is true now.
- 16:22Michael Kennedy: What is most expensive?
- 16:23Michael Kennedy: Memory, not compute, right?
- 16:25Michael Kennedy: Yeah.
- 16:25Michael Kennedy: Yeah.
- 16:26Michael Kennedy: Thanks AI.
- 16:27Michael Kennedy: Thanks AI.
- 16:27Michael Kennedy: Thanks Altman.
- 16:28Michael Kennedy: We really appreciate that.
- 16:32Michael Kennedy: But we've free-threaded Python now.
- 16:34Michael Kennedy: That's a thing.
- 16:35Michael Kennedy: And so we're kind of moving into this world where we can take better advantage of the hardware and we don't have to multiply out.
- 16:44Michael Kennedy: I know your process takes 500 megs of RAM, but we need four of them.
- 16:47Michael Kennedy: So now you need two gigs just to run your code.
- 16:50Michael Kennedy: We don't necessarily need that anymore.
- 16:52Michael Kennedy: And grading would be a really good foundation for that.
- 16:54Michael Kennedy: But let's just think broadly about free-threading and async as it is and stuff.
- 16:59Michael Kennedy: I know you've thought a lot about this because of this project that you built.
- 17:03Michael Kennedy: Well, what do you think?
- 17:05Giovanni Barallari: First thing, can I say free threading to me?
- 17:09Giovanni Barallari: It's super exciting.
- 17:11Giovanni Barallari: And I don't know why people are not as much excited as me on this.
- 17:16Giovanni Barallari: Because this is, I'd say, the biggest thing that ever happened into Python since the beginning of Python.
- 17:25Giovanni Barallari: In the last 30 years.
- 17:27Giovanni Barallari: do you remember like Python 2 to Python 3 and all like,
- 17:32Giovanni Barallari: oh, now strings are not bytes anymore and everything is Unicode?
- 17:36Michael Kennedy: Yeah.
- 17:37Giovanni Barallari: That's nothing compared to, hey, the gil is not there anymore.
- 17:41Giovanni Barallari: Like we talk about like every Python room everywhere in the world,
- 17:46Giovanni Barallari: like at some point talked about the gil and why we have to do to have the gil, right?
- 17:53Giovanni Barallari: Right.
- 17:54Michael Kennedy: The Gilectomy that Larry Hastings had, it seemed to perpetually be working on and never
- 17:59Michael Kennedy: kind of went anywhere.
- 18:00Michael Kennedy: Yeah.
- 18:00Michael Kennedy: It took like 15 years of people talking about this and it finally landed.
- 18:05Giovanni Barallari: Like last year, yes, of course, last year it was beta because like in Python 3.13, it
- 18:12Giovanni Barallari: was like, this is an experiment still.
- 18:14Giovanni Barallari: That was the asterisk on top.
- 18:18Giovanni Barallari: But since Python 3.14, that's considered stable.
- 18:22Giovanni Barallari: It's exactly as the normal GIL-included interpreter.
- 18:30Giovanni Barallari: And at the end of the day, the biggest part of all of this
- 18:33Giovanni Barallari: was using reference counting instead of singleton.
- 18:39Giovanni Barallari: So I guess I'm excited about free-threaded Python
- 18:44Giovanni Barallari: because finally I have the language I love the most.
- 18:49Giovanni Barallari: not because of the structure, not because of types or how it's designed,
- 18:53Giovanni Barallari: but because of this awesome community that only Python language has,
- 18:58Giovanni Barallari: at least in my experience.
- 19:00Giovanni Barallari: And so finally, I can use this language with actual threads.
- 19:04Giovanni Barallari: So I'm not obliged anymore to think, oh, wait, we are in Python,
- 19:08Giovanni Barallari: so I need to use a C library or something to take advantage of my CPU,
- 19:14Giovanni Barallari: Especially given, I don't know, we are in the era of, hey, even if you buy a $200 CPU that probably has 12 cores or something.
- 19:26Giovanni Barallari: So yeah, I'm very excited.
- 19:29Giovanni Barallari: I'm confused about the lack of adoption.
- 19:33Giovanni Barallari: I would love to see more adoption in this.
- 19:35Giovanni Barallari: And of course, like there are reasons, like every native C compiled extension has to be fixed to be thread safe.
- 19:47Giovanni Barallari: And probably like on a bunch of ancient extensions, that's not simple or easy.
- 19:55Giovanni Barallari: Yeah, I don't know, man.
- 19:56Giovanni Barallari: Like I'm just too excited.
- 19:58Giovanni Barallari: Like I want people to use free thread.
- 20:00Michael Kennedy: I know.
- 20:02Giovanni Barallari: And getting it is so much easier as well.
- 20:04Michael Kennedy: it's just uv Python install, you know, that 3.14 T and you got it, right?
- 20:10Michael Kennedy: Yeah.
- 20:11Giovanni Barallari: Yeah.
- 20:12Giovanni Barallari: And like, I don't know, I'm so pissed at the maintainer of the Docker images
- 20:16Giovanni Barallari: because we don't have like an official 3.14 free threaded image.
- 20:20Giovanni Barallari: Like why?
- 20:21Michael Kennedy: Why?
- 20:21Michael Kennedy: Oh yeah, that is actually a good point.
- 20:23Michael Kennedy: Like it has been a year and a half and it just requires putting the T on the uv installed bit.
- 20:29Giovanni Barallari: Yeah.
- 20:29Giovanni Barallari: Yeah.
- 20:30Giovanni Barallari: Yeah.
- 20:30Giovanni Barallari: Yeah, but again, to my perspective, free-threaded Python opens the window to do a bunch of...
- 20:36Giovanni Barallari: First, to solve a bunch of the issues you mentioned, which is, for example, in Centri,
- 20:42Giovanni Barallari: the number one issue is...
- 20:44Giovanni Barallari: I mean, Centri at the end of the day is this 18-years-old Django monolith.
- 20:51Giovanni Barallari: And so, yes, we deploy in several multiple different deployments, activating just some parts.
- 20:59Giovanni Barallari: But even so, like, yeah, we have the same problem, which is, hey, like, in order to use like one C view out of like a VM that GCP gives us, like, yeah, we need to spawn like four different processes and require like, I don't know, four, five, six gigabytes of memory for like a single pod.
- 21:20Michael Kennedy: And not only do you have to do that, you also have to, anytime there's some sort of in-memory cache, like an LRU cache or something, every one of those has to be spun up for all four, not just for one, right? There's a lot of powerful sharing.
- 21:31Michael Kennedy: Do we want to start talking about observability?
- 21:34Giovanni Barallari: Because you cannot just use like
- 21:36Giovanni Barallari: the Prometheus SDK or anything like that.
- 21:40Giovanni Barallari: Because again, like then those became like
- 21:42Giovanni Barallari: four different instances.
- 21:43Giovanni Barallari: So you cannot even track like the same metrics
- 21:46Giovanni Barallari: unless you do like some weird tricks.
- 21:48Giovanni Barallari: Like, yeah, relying on the multiprocessing library.
- 21:54Giovanni Barallari: It's messy, man.
- 21:54Giovanni Barallari: So like, yeah, I think like
- 21:57Giovanni Barallari: FreeThreader like solves a bunch of problems,
- 22:00Giovanni Barallari: Especially in web development in Python.
- 22:05Giovanni Barallari: Because everybody says like, oh yeah, they did this just because of AI, you know,
- 22:09Giovanni Barallari: because they can like make things parallel, whatever.
- 22:12Giovanni Barallari: I don't get that.
- 22:14Giovanni Barallari: Like, like we have like this amazing feature and it solves a bunch of problem
- 22:18Giovanni Barallari: on web development and also like it opens up the a bunch of new opportunities.
- 22:23Giovanni Barallari: Because again, like one of the most annoying parts in Granian, which is also
- 22:27Giovanni Barallari: Like one of the things that people opens like the most, the vast majority of issues about
- 22:33Giovanni Barallari: is because nobody understands like how socket sharing works across different processes.
- 22:39Giovanni Barallari: And again, like with FreeThreader, like that's just go away if we have something different
- 22:45Giovanni Barallari: from a Synco.
- 22:46Giovanni Barallari: And I guess that's the, that's when we get on the point here.
- 22:52Giovanni Barallari: Because for example, like in Grainium, so Grainium supports FreeThreader Python scenes
- 22:57Giovanni Barallari: 2.0, if I'm not mistaken.
- 22:59Giovanni Barallari: And so when you use
- 23:01Giovanni Barallari: Granian on a free-threaded interpreter,
- 23:03Giovanni Barallari: workers become
- 23:07Giovanni Barallari: threads.
- 23:08Giovanni Barallari: They're no longer processes.
- 23:10Giovanni Barallari: And I can skip all the dance
- 23:11Giovanni Barallari: of, yeah, open the socket,
- 23:14Giovanni Barallari: but just bind
- 23:15Giovanni Barallari: on that, but not on listen, because then
- 23:17Giovanni Barallari: it gets to be shared across processes
- 23:19Giovanni Barallari: and so each worker can have his own
- 23:21Giovanni Barallari: backlog. It's a mess, man.
- 23:23Giovanni Barallari: So on the free-threaded variant,
- 23:26Giovanni Barallari: Like, Grenian already, like, used threads.
- 23:29Giovanni Barallari: The subtlety is that each thread has its own event loop.
- 23:35Giovanni Barallari: So what Grenian cannot do today is sharing things between those threads.
- 23:41Giovanni Barallari: At the end of the day, yes, the application is shared, but, like, every request, like, if a repus comes to a worker, that's it.
- 23:49Giovanni Barallari: Like, there's no...
- 23:50Giovanni Barallari: You cannot cross boundaries, right?
- 23:52Giovanni Barallari: when you await for something,
- 23:54Giovanni Barallari: when you suspend for something,
- 23:56Giovanni Barallari: that's the loop,
- 23:57Giovanni Barallari: the event loop you're running into.
- 23:59Michael Kennedy: Which is a big limitation for servers.
- 24:02Michael Kennedy: Yeah, and one is calling await
- 24:03Michael Kennedy: and another is calling await
- 24:04Michael Kennedy: or maybe doing some work,
- 24:06Michael Kennedy: but if they were the same event loop,
- 24:08Michael Kennedy: one thing could run
- 24:09Michael Kennedy: because the other is awaiting,
- 24:10Michael Kennedy: but they're actually separate altogether, right?
- 24:12Giovanni Barallari: Yeah, and also you can still end up
- 24:15Giovanni Barallari: in these weird conditions
- 24:16Giovanni Barallari: in which maybe, I don't know,
- 24:19Giovanni Barallari: 50% of your connection
- 24:21Giovanni Barallari: we're bound to a specific event loop.
- 24:25Giovanni Barallari: And so you also have like unbalancement
- 24:28Giovanni Barallari: between like the different threads.
- 24:29Giovanni Barallari: So you have like one thread
- 24:30Giovanni Barallari: that receives the vast majority of things,
- 24:33Giovanni Barallari: the other thread doing nothing.
- 24:35Giovanni Barallari: Yeah.
- 24:35Giovanni Barallari: Yeah.
- 24:36Giovanni Barallari: Let's say like we have new opportunities.
- 24:39Giovanni Barallari: We kind of lack some libraries,
- 24:41Giovanni Barallari: like some libraries behavior
- 24:43Giovanni Barallari: that can actually give us like
- 24:45Giovanni Barallari: all the actual meat here.
- 24:48Michael Kennedy: Agreed.
- 24:49Michael Kennedy: I want to talk about one area before we dive in, the Tone.io,
- 24:53Michael Kennedy: and that's just asyncio event loops.
- 24:56Michael Kennedy: And I know during your presentation,
- 24:57Michael Kennedy: so you gave a talk on this at EuroPython this year,
- 25:00Michael Kennedy: and I'll link to the topic right here in the moment.
- 25:05Michael Kennedy: But there are people like, oh, well, we have uvloops,
- 25:07Michael Kennedy: so doesn't that kind of solve it?
- 25:08Michael Kennedy: And I think that's a really interesting thought
- 25:11Michael Kennedy: because without calling out anybody, I didn't intend to call out anybody.
- 25:14Michael Kennedy: I think it just highlights in the Python space,
- 25:18Michael Kennedy: There's just not a lot of thinking about what concurrency means,
- 25:22Michael Kennedy: why it matters, how you program for it.
- 25:25Michael Kennedy: And that's going to be a challenge.
- 25:27Michael Kennedy: I think that's part of the challenge of what you're talking about
- 25:28Michael Kennedy: with the adoption of free-threaded Python.
- 25:30Michael Kennedy: But I think also it is a challenge in the sense that
- 25:34Michael Kennedy: thinking about making the event loop faster by, I don't know,
- 25:37Michael Kennedy: 20% or whatever uvloop actually does, which is great,
- 25:40Michael Kennedy: it doesn't really address the fact that you're still only on one thread.
- 25:43Michael Kennedy: Your event loop can access, like, I just, against probably better judgment,
- 25:47Michael Kennedy: I just bought a Mac Studio Max, which has 18 cores.
- 25:51Michael Kennedy: If I write one thread, that's about like 5% of the capacity of that machine.
- 25:56Michael Kennedy: So what does it matter if it's 4.9% or 5.1% depending on which loop?
- 26:01Michael Kennedy: I don't care.
- 26:02Michael Kennedy: That is broken either way.
- 26:04Michael Kennedy: I want 95% capacity.
- 26:06Michael Kennedy: Yes.
- 26:07Michael Kennedy: Right?
- 26:07Michael Kennedy: And that's, I don't know.
- 26:08Michael Kennedy: I thought it would be worthwhile to kind of like talk about uvloop a little bit.
- 26:12Michael Kennedy: And you built our loop.
- 26:13Michael Kennedy: And those things are great in their building blocks.
- 26:14Michael Kennedy: Yeah.
- 26:15Michael Kennedy: They're not the panacea.
- 26:16Michael Kennedy: They're not the fix.
- 26:17Giovanni Barallari: Yeah, and we also now have Marcelo Trzesitsky, the maintainer of UVCore and Starlet.
- 26:27Giovanni Barallari: It has recently published Zoovloop, which is another event loop for Python relying on libUV, but it's written in Zig.
- 26:40Giovanni Barallari: But yeah, as you said, all of these event loops,
- 26:46Giovanni Barallari: yes, they can optimize some of the hot part of the cycle.
- 26:53Giovanni Barallari: But basically, that's it.
- 26:55Giovanni Barallari: Nothing really changed the shape of how things work.
- 27:02Giovanni Barallari: And so, yes, for sure, you should actually install
- 27:08Giovanni Barallari: uvloop or r loop or zoo v loop or whatever to to speed up like because that's performance you're
- 27:13Giovanni Barallari: leaving on the table regardless right like so uh it's good to have this project because they also
- 27:19Giovanni Barallari: like can light uh some of the inefficiencies of a sink io in my opinion um so i think it's still
- 27:26Giovanni Barallari: good to have these projects and you should use them um but yeah they want like the best you can
- 27:31Giovanni Barallari: GAT is probably like in the order of like 20% in, and we're talking about like row throughput
- 27:39Giovanni Barallari: if you're just doing TCP and nothing else, which is nobody does like, like nothing does
- 27:46Giovanni Barallari: nothing out there.
- 27:47Giovanni Barallari: Right?
- 27:47Giovanni Barallari: Like we do a bunch of stuff.
- 27:49Giovanni Barallari: Yeah.
- 27:49Michael Kennedy: If you construct an example where basically all you're doing is waiting very efficiently,
- 27:53Michael Kennedy: then you start to see those, those deviate.
- 27:55Michael Kennedy: And also if you've got, like, I've got 10 tasks that run over two seconds.
- 27:59Michael Kennedy: It does zero.
- 28:00Michael Kennedy: It doesn't matter.
- 28:01Michael Kennedy: This only matters when you're doing very, very fine-grained work and tons of it,
- 28:05Michael Kennedy: and there's lots of switching and that sort of thing, right?
- 28:08Giovanni Barallari: Yes, yes.
- 28:11Giovanni Barallari: And so, yes, I guess this was one of my realizations.
- 28:16Giovanni Barallari: Because, again, I worked on ArtLoop mainly last year.
- 28:21Giovanni Barallari: And working on ArtLoop made me realize two things.
- 28:25Giovanni Barallari: The first thing is that asimkayo, it's overcomplicated sometimes.
- 28:31Giovanni Barallari: It's so fun fact at the presentation I did about that loop in Python Italy 25.
- 28:40Giovanni Barallari: I had a slide asking to the audience, what's the difference between a protocol and a transport in Async.io.
- 28:52Giovanni Barallari: Because if you check the official documentation of Python and you get to that chapter, you will find out that they have like to try to explain you that difference.
- 29:01Giovanni Barallari: they try to do that like in three different ways,
- 29:06Giovanni Barallari: which to my experience,
- 29:07Giovanni Barallari: like if you need three different ways
- 29:10Giovanni Barallari: to explain the same thing,
- 29:12Giovanni Barallari: something is deeply wrong.
- 29:14Michael Kennedy: Definitely violates an Einstein core philosophy.
- 29:18Giovanni Barallari: Yes.
- 29:19Giovanni Barallari: Also because like, again,
- 29:20Giovanni Barallari: if we think about the Zen of Python,
- 29:23Giovanni Barallari: like simple is better than complex, right?
- 29:27Giovanni Barallari: So that was my first realization, right?
- 29:30Giovanni Barallari: Because, again, like you have a bunch of primitives, like you have events, futures.
- 29:37Giovanni Barallari: Oh, by the way, every time they get spawned into the event loop, they get wrapped into a task.
- 29:44Giovanni Barallari: What is a task? Nobody knows.
- 29:46Giovanni Barallari: Oh, and by the way, when they actually run inside the event loop, they became handles.
- 29:52Giovanni Barallari: So we have a bunch of this weird thing that they're not really exposed to you if you just write async code.
- 30:00Giovanni Barallari: But if you need to debug something when something is wrong, then you need all of that to understand what's going on, right?
- 30:06Giovanni Barallari: And the other realization, again, was, okay, I reached a point in which there's no other possible optimization in our book.
- 30:14Giovanni Barallari: Because the vast majority of CPU time spent here is around AsyncIO primitives.
- 30:21Giovanni Barallari: And I have one single thread.
- 30:22Giovanni Barallari: And so, like, the only, when I came to realize this, I just said, okay, wait a second.
- 30:29Giovanni Barallari: Is that, is really that hard to start like scratch whiteboard?
- 30:35Giovanni Barallari: Like from the beginning, like let's just assume for a second, like asyncio never existed.
- 30:40Giovanni Barallari: And I want to do like async stuff in Python.
- 30:43Giovanni Barallari: What that look like?
- 30:43Giovanni Barallari: Like what, what does it mean to make like an asynchronous runtime in Python?
- 30:47Giovanni Barallari: Is that hard?
- 30:48Giovanni Barallari: And I don't know, like, I guess three or four weeks after this, I just got like an asynchronous
- 30:55Giovanni Barallari: runtime, a complete alternative
- 30:57Giovanni Barallari: asynchronous runtime running on Python with
- 30:59Giovanni Barallari: multiple threads.
- 31:01Michael Kennedy: To be clear on free-threaded Python, right?
- 31:03Giovanni Barallari: Yes, free-threaded Python only because
- 31:05Giovanni Barallari: again, to have like real threads
- 31:07Giovanni Barallari: I mean, the design is to have
- 31:09Giovanni Barallari: real threads, so the moment you have
- 31:11Giovanni Barallari: the gill, I say, no, no, no,
- 31:13Giovanni Barallari: runtime error, change your
- 31:15Michael Kennedy: interpreter because this is not good,
- 31:17Michael Kennedy: right?
- 31:19Michael Kennedy: This portion of Talk Python I May is brought to you by
- 31:21Michael Kennedy: our AI tools. You know that
- 31:23Michael Kennedy: thing where you ask an AI something about
- 31:25Michael Kennedy: Python and it confidently tells you about a library version from 18 months ago? Well, we fixed that,
- 31:31Michael Kennedy: at least for our shows. Talk Python and Python Bytes both have MCP servers now. Connect Talk Python
- 31:37Michael Kennedy: and your AI can search over 550 episodes, full transcripts, every guest in the entire course
- 31:44Michael Kennedy: catalog. Connect Python Bytes and you get almost 500 episodes of Python news going back to 2026,
- 31:50Michael Kennedy: including every link we've ever put in the show notes. That means you can say things like,
- 31:55Michael Kennedy: ask Talk Python what astral joining OpenAI means for uv or what has Python bytes said about uv
- 32:02Michael Kennedy: and get real answers with real links, not hallucination. Name the show in your prompt
- 32:06Michael Kennedy: and your AI knows exactly where to look. And if you live in the terminal, Talk Python also has a CLI
- 32:12Michael Kennedy: too. One line, uv tool install talk-python-cli and then search episodes, transcripts, guests,
- 32:21Michael Kennedy: courses without ever opening a browser. It's open source and it outputs text, JSON, and Markdown,
- 32:26Michael Kennedy: so it feeds the AI tools that don't speak MCP yet. And here's the real reason I built it.
- 32:32Michael Kennedy: Both shows cover around 10 years of Python history. The people, the decisions, the packages that took
- 32:38Michael Kennedy: over, and the ones that quietly didn't. This enhanced access is free. No account, no API key,
- 32:45Michael Kennedy: nothing to buy. This history should belong to all of us. Visit talkpython.fm and Python Bytes and
- 32:52Michael Kennedy: click the MCP link in the nav bar. Connect them right now to your agents so that they'll be
- 32:57Michael Kennedy: accessible anytime you need them in the future. And so yeah, that was like kind of the landscape
- 33:02Giovanni Barallari: in which I started building Tonio or Tonio. You can pronounce it like however you want. Like I'm
- 33:09Michael Kennedy: Italian, so I say Tonio, of course. I think obviously, well, you have to do Tonio.
- 33:14Michael Kennedy: So it's really good.
- 33:16Michael Kennedy: But as it pairs to asyncio, tone IO also kind of like as a hat to that, right?
- 33:22Michael Kennedy: Yeah.
- 33:22Michael Kennedy: Yeah.
- 33:23Giovanni Barallari: But we have Trio.
- 33:24Giovanni Barallari: So that's not Trio.
- 33:28Michael Kennedy: Trio is living there a little bit as well.
- 33:30Michael Kennedy: Yeah.
- 33:30Michael Kennedy: So this is a really interesting project that you have.
- 33:33Michael Kennedy: And it basically says, what if we actually had threads?
- 33:37Michael Kennedy: One of the things that's endlessly frustrated me about Python and asyncio and consequently
- 33:44Michael Kennedy: I think the language implementation of async await is it's really good.
- 33:48Michael Kennedy: I think, you know,
- 33:49Michael Kennedy: the way it sort of turns async code into what looks like structurally
- 33:54Michael Kennedy: serializable code or serial code is really, really nice.
- 33:57Michael Kennedy: But the,
- 33:58Michael Kennedy: the fact that the developer has to juggle loops and which loop and that loop.
- 34:02Michael Kennedy: No, that's not the right loop.
- 34:04Michael Kennedy: Like so many times I've been, Oh, I want to do this request.
- 34:07Michael Kennedy: Oh, are you using court or an async web framework? You,
- 34:10Michael Kennedy: there is an async loop, but not that one.
- 34:12Michael Kennedy: you need the one created by the web framework.
- 34:14Michael Kennedy: Like, oh, did you initialize the async database connection
- 34:18Michael Kennedy: before it ran the web thing?
- 34:19Michael Kennedy: And like, nope, that's the wrong one.
- 34:21Michael Kennedy: And there's all this weird juggling that's just so janky.
- 34:25Michael Kennedy: And I'm pretty sure it's janky
- 34:27Michael Kennedy: because we didn't have true threads.
- 34:29Michael Kennedy: And the possibility, oh, what if you crisscross this?
- 34:32Michael Kennedy: Everything sort of falls apart.
- 34:33Michael Kennedy: And if you could just say, look, it's just multi-threaded.
- 34:35Michael Kennedy: And there is a thing that called the loop
- 34:37Michael Kennedy: and that's where stuff runs.
- 34:39Michael Kennedy: And I don't care who started it.
- 34:41Michael Kennedy: It's our loop.
- 34:41Michael Kennedy: When I need a loop, the runtime Python itself has a loop for me and I'll use it.
- 34:47Michael Kennedy: Right.
- 34:47Michael Kennedy: And I feel like you sort of took that philosophy a little bit.
- 34:49Michael Kennedy: Right.
- 34:50Giovanni Barallari: Yeah.
- 34:50Giovanni Barallari: I'd say like the number one inspiration for Sonio is Tokyo, which is the number one Rust
- 34:58Giovanni Barallari: asynchronous runtime.
- 35:00Giovanni Barallari: That's probably because like I spend like in Rust a bunch of time.
- 35:04Giovanni Barallari: So yeah, like, I don't know, for example, like the weird thing to me is like, we still like,
- 35:09Giovanni Barallari: if you just want to do like an asynchronous program in Python,
- 35:14Giovanni Barallari: like a program, like let's say a script or, I don't know,
- 35:18Giovanni Barallari: like a simple CLI, we still need to do like a synch.io run.
- 35:22Giovanni Barallari: Like why?
- 35:23Giovanni Barallari: Like the, yeah, the amount of things you need to know
- 35:28Giovanni Barallari: and decide and stuff there is like completely different
- 35:33Giovanni Barallari: from other languages.
- 35:34Giovanni Barallari: Yeah.
- 35:34Giovanni Barallari: Because again, like think about JavaScript.
- 35:37Giovanni Barallari: You don't decide anything.
- 35:38Giovanni Barallari: Like that's async in JavaScript.
- 35:40Michael Kennedy: That's true.
- 35:41Michael Kennedy: Well, I'll tell you a little bit why you can't just,
- 35:43Michael Kennedy: why you still got to call async run
- 35:44Michael Kennedy: because there's like a foundational layer
- 35:46Michael Kennedy: that's not present.
- 35:48Michael Kennedy: And it's your job to write the foundation
- 35:50Michael Kennedy: on which asyncio executes, right?
- 35:53Michael Kennedy: Like it's still your job to figure,
- 35:55Michael Kennedy: okay, how do I actually create a loop?
- 35:56Michael Kennedy: How do I run a loop?
- 35:57Michael Kennedy: How do I, like, it's your job.
- 35:59Michael Kennedy: You can't just create an async def method
- 36:01Michael Kennedy: and call it because there's nowhere for it to go
- 36:04Michael Kennedy: until you go create, you know what I mean?
- 36:05Michael Kennedy: There's like, there's just,
- 36:06Giovanni Barallari: But the foundation isn't quite there.
- 36:08Giovanni Barallari: But again, it's an entry point, right?
- 36:11Giovanni Barallari: So in Tonio, for example, yes, you have Tonio run.
- 36:14Giovanni Barallari: You want to instruct everything and configure the runtime and do whatever you want.
- 36:18Giovanni Barallari: Yes, you can do that.
- 36:19Giovanni Barallari: You don't want to do that.
- 36:21Giovanni Barallari: You have a single decorator, which is Tonio main.
- 36:24Giovanni Barallari: You put it on your function, your entry point in your program, and it's done.
- 36:32Michael Kennedy: Yeah. All right. Before we talk about that, before we get too much in the weeds of it,
- 36:37Michael Kennedy: why don't you just give us like, talk us through writing a program in this. There's also two ways,
- 36:43Michael Kennedy: like maybe you could, after you talk about this, you could like sort of get into the,
- 36:48Michael Kennedy: what this concept of colored functions versus not, and sometimes call async code viral code. And like,
- 36:55Michael Kennedy: let's just like talk through the differences here. Yeah. So, okay. Yes. Tonyo has two
- 37:02Giovanni Barallari: supports two different syntax modes.
- 37:08Giovanni Barallari: And that's because, again, when I designed this,
- 37:12Giovanni Barallari: given that I just throw everything away
- 37:15Giovanni Barallari: and started from scratch,
- 37:17Giovanni Barallari: I ended up having a system
- 37:19Giovanni Barallari: which didn't really require async await syntax
- 37:23Giovanni Barallari: or a notation because at the end of the day,
- 37:26Giovanni Barallari: behind async await notation,
- 37:28Giovanni Barallari: those are generated, right?
- 37:30Giovanni Barallari: And so given the effort to support like two different syntax was like minimal, writing everything from scratch, I ended up like leaving up to the final user to decide, hey, you dislike async await temptation?
- 37:46Giovanni Barallari: There's still plenty of people that like, I don't know why, but they argue like all the time about, oh, you know, like I have to put async everywhere and a wait everywhere, whatever.
- 37:56Giovanni Barallari: OK, you don't like that.
- 37:58Giovanni Barallari: Guess what?
- 37:58Giovanni Barallari: Tonya also have just a yield syntax.
- 38:01Giovanni Barallari: So instead of await, you just yield from the next coroutine you want to suspend for or wait for.
- 38:11Giovanni Barallari: And that's it.
- 38:11Giovanni Barallari: You don't need to write async def everywhere.
- 38:17Giovanni Barallari: To be here is still colored, right?
- 38:20Giovanni Barallari: Because the moment you have a generator function, then whatever it calls it before has to be a generator.
- 38:26Giovanni Barallari: as well. But I guess my point was mainly like, okay, to support the syntax doesn't really take
- 38:33Giovanni Barallari: that much of a work. And once it was settled in, I mean, it's there and people can decide by,
- 38:40Giovanni Barallari: hey, you dislike one notation? Sure, just use the other one. But yes, let's say for people
- 38:48Giovanni Barallari: familiar with AsyncIO, the syntax, like the AsyncAwait syntax is very similar to AsyncIO.
- 38:55Giovanni Barallari: So you basically have your coroutine, so your sync dev, whatever you want, and you await primitives or stuff.
- 39:08Giovanni Barallari: So the main difference is that instead of importing stuff from a sync.io, so like, I don't know, sleep or timer or whatever, you import similar primitives from Tonio.
- 39:21Giovanni Barallari: We, of course, have way less primitives because, again, like, as I said before, AsyncIO has too many primitives.
- 39:29Giovanni Barallari: And the only big difference from AsyncIO, let's say, native people is that you have, like, spawn methods.
- 39:40Giovanni Barallari: So instead of saying...
- 39:43Giovanni Barallari: So in AsyncIO, when you want to make things,
- 39:48Giovanni Barallari: like spawn several tasks
- 39:50Giovanni Barallari: and then wait for all of them to complete,
- 39:52Giovanni Barallari: you usually do...
- 39:53Giovanni Barallari: You have different ways of doing this, right?
- 39:56Giovanni Barallari: You can have a task set.
- 39:59Giovanni Barallari: You can have scopes from Trio.
- 40:04Giovanni Barallari: But I mean, you can use gather
- 40:06Giovanni Barallari: so you can create tasks and then gather.
- 40:10Giovanni Barallari: with SyncIO.
- 40:10Giovanni Barallari: So Tonio is like,
- 40:12Giovanni Barallari: to do this is,
- 40:14Giovanni Barallari: you just have like two methods.
- 40:16Giovanni Barallari: You either spawn
- 40:19Giovanni Barallari: asynchronous stuff
- 40:19Giovanni Barallari: or you spawn something
- 40:21Giovanni Barallari: that is blocking
- 40:22Giovanni Barallari: and then the primitive
- 40:24Giovanni Barallari: is spawn blocking.
- 40:26Giovanni Barallari: The other major difference
- 40:28Giovanni Barallari: from a SyncIO
- 40:29Giovanni Barallari: is that when you spawn something
- 40:31Giovanni Barallari: that gets run immediately.
- 40:34Giovanni Barallari: Whereas like in a SyncIO
- 40:35Giovanni Barallari: this is true only
- 40:37Giovanni Barallari: if you create a task.
- 40:38Giovanni Barallari: Otherwise, everything else is eager.
- 40:41Giovanni Barallari: So in order to run whatever you want to wait,
- 40:45Giovanni Barallari: you need to await.
- 40:47Giovanni Barallari: So in AsyncIO, the vast majority of operations
- 40:50Giovanni Barallari: bound together the launching the operation
- 40:54Giovanni Barallari: and waiting for the result.
- 40:55Giovanni Barallari: Unless you create a task that starts immediately
- 40:58Giovanni Barallari: and then you await later, right?
- 41:00Giovanni Barallari: In Tonya, everything is wrapped around the spawn
- 41:02Giovanni Barallari: because you can call spawn and forget about it
- 41:05Giovanni Barallari: or you can await Tonya spawn to wait for the results, right?
- 41:08Giovanni Barallari: Or you can park the result of the spawn, the join, and join later.
- 41:12Giovanni Barallari: So that's, I don't know if, like, maybe it's more confusing than,
- 41:17Giovanni Barallari: it's hard to explain it simply.
- 41:20Michael Kennedy: Maybe, but one of the challenges I've seen with standard asyncIO
- 41:24Michael Kennedy: is you want to create a bunch of work and let it run,
- 41:28Michael Kennedy: and then you want to get the answers back.
- 41:30Michael Kennedy: So a naive way would be, like, call a bunch of stuff,
- 41:34Michael Kennedy: and then when you call await,
- 41:36Michael Kennedy: It's like you've got to create them not started
- 41:39Michael Kennedy: and then start all of them
- 41:40Michael Kennedy: and then go through each one and await them.
- 41:42Michael Kennedy: Whereas this way, you get a list back
- 41:44Michael Kennedy: and you just await them in order
- 41:45Michael Kennedy: or await one after another somehow.
- 41:48Michael Kennedy: They're already started, right?
- 41:49Michael Kennedy: And so there's like the skip of this like,
- 41:51Michael Kennedy: okay, I've got all the things
- 41:52Michael Kennedy: that are going to become tasks,
- 41:53Michael Kennedy: but I got to turn them into tasks
- 41:54Michael Kennedy: so then I can await them
- 41:56Michael Kennedy: because if I regularly await them,
- 41:57Michael Kennedy: it'll still fall back to serial
- 41:59Michael Kennedy: just running on the event loop, you know?
- 42:01Giovanni Barallari: Yeah.
- 42:01Giovanni Barallari: And I mean, like in Tanya is the same.
- 42:02Giovanni Barallari: Like if you await a coroutine,
- 42:04Giovanni Barallari: it means like I want to wait
- 42:06Giovanni Barallari: that to happen, right? If you don't want to
- 42:08Giovanni Barallari: just spawn, park
- 42:10Giovanni Barallari: the result of spawn into a
- 42:12Giovanni Barallari: variable, await later. I think
- 42:14Giovanni Barallari: there's an example
- 42:16Giovanni Barallari: down below in the page
- 42:19Giovanni Barallari: about
- 42:20Giovanni Barallari: spawning something and awaiting later.
- 42:24Giovanni Barallari: Somewhere.
- 42:26Giovanni Barallari: There's a bunch of documentation.
- 42:28Giovanni Barallari: Spawning there, yeah.
- 42:30Giovanni Barallari: But yeah, the idea
- 42:32Giovanni Barallari: is, and again, I didn't invent
- 42:34Giovanni Barallari: anything because
- 42:34Giovanni Barallari: the syntax. Yes, this is the example. So in this example, we compute like numbers,
- 42:41Giovanni Barallari: like stupid example, but it is to give the point. So we start like two functions,
- 42:46Giovanni Barallari: which computes numbers. Then we await for third function. So we immediately wait for the third
- 42:53Giovanni Barallari: result. And then we wait for the first two results. So in the meantime, so when you do the first poem,
- 43:00Giovanni Barallari: those two functions start already, like immediately at that point in your code,
- 43:06Giovanni Barallari: which kind of makes sense if you think about it,
- 43:08Giovanni Barallari: because it's like syntax-based, like you're invoking those coroutines, right?
- 43:12Giovanni Barallari: In that moment, you just don't await for them.
- 43:15Giovanni Barallari: And so at the end, like you just await for the parallel, actual parallel result.
- 43:21Giovanni Barallari: Like everything here is concurrent, but the only point in which you have parallel code,
- 43:25Giovanni Barallari: the actual parallel code is when you await for parallel, right?
- 43:30Giovanni Barallari: So that's the major difference from a Synco and Tonio.
- 43:35Giovanni Barallari: When you spawn stuff, that thing happened in parallel.
- 43:39Giovanni Barallari: So by default, Tonio starts with the number of threads
- 43:44Giovanni Barallari: equal to the number of your CPUs.
- 43:47Giovanni Barallari: The blocking, Tonio also has a blocking pool for blocking stuff.
- 43:54Giovanni Barallari: But that's separate.
- 43:54Giovanni Barallari: Let's say the main work loop that runs your code,
- 44:00Giovanni Barallari: by default, you have X threads per CPU cores.
- 44:05Giovanni Barallari: So if you run this on your M3 Max, M3 Studio Max,
- 44:10Giovanni Barallari: what was it?
- 44:11Giovanni Barallari: You will end up having 18 threads running stuff.
- 44:14Giovanni Barallari: Yeah.
- 44:15Giovanni Barallari: Which is kind of what we want in general, right?
- 44:19Giovanni Barallari: Like if I write a program-
- 44:20Michael Kennedy: I'm sure you can configure it, right?
- 44:22Michael Kennedy: You could configure the thread pool to say,
- 44:24Michael Kennedy: like, look, this thing has to be a good citizen.
- 44:26Michael Kennedy: Let's just take the number of CPUs,
- 44:28Michael Kennedy: divide by two or something like that
- 44:29Michael Kennedy: so I can still do other work.
- 44:30Giovanni Barallari: Yeah, you can like, again,
- 44:34Giovanni Barallari: that Tonyo main decorator
- 44:36Giovanni Barallari: or the Tonyo run method
- 44:40Giovanni Barallari: accepts some parameters
- 44:42Giovanni Barallari: so you can configure like the size
- 44:43Giovanni Barallari: of the standard thread pool,
- 44:45Giovanni Barallari: the maximum amount of blocking threads
- 44:47Giovanni Barallari: you want to spawn
- 44:49Giovanni Barallari: because that does get spawned on demand.
- 44:52Giovanni Barallari: you can configure if you want to have support for context bars because it's not that's another thing
- 44:58Giovanni Barallari: about python right like we kind of went from thread locals to context bars uh but in thonio
- 45:07Giovanni Barallari: that's a bit more complicated right because you have async code in multiple threads yeah because
- 45:12Giovanni Barallari: they used to leverage the thread right yeah so if you want to actually use context bars
- 45:18Giovanni Barallari: you have to tell to the runtime, right?
- 45:20Giovanni Barallari: Because otherwise, like, some side effects might be weird
- 45:24Giovanni Barallari: in that condition.
- 45:26Michael Kennedy: Hold on.
- 45:28Michael Kennedy: Nomenclature definition, please, here.
- 45:30Michael Kennedy: What are context vars for people who don't know?
- 45:32Michael Kennedy: Give us examples.
- 45:32Michael Kennedy: Oh, yeah.
- 45:33Giovanni Barallari: So context vars, so the interpreter has these,
- 45:39Giovanni Barallari: every thread into the Python interpreter
- 45:43Giovanni Barallari: has what it's called a context.
- 45:47Giovanni Barallari: And so with a sync.io, so what was the problem?
- 45:51Giovanni Barallari: So we used to have thread locals, which meant like if I have two threads and I have, for example, a request,
- 46:01Giovanni Barallari: and I have to keep the request state global, like global between quotes in my code,
- 46:11Giovanni Barallari: but I want to use the correct request in the code
- 46:17Giovanni Barallari: and don't make them mix in the two different threads, states,
- 46:22Giovanni Barallari: we use thread vocals because that's basically like a dictionary,
- 46:27Giovanni Barallari: more or less, where you can store that data.
- 46:30Giovanni Barallari: And that snapshot of data is for a single thread.
- 46:35Giovanni Barallari: Context var are a similar concept, but for a same code,
- 46:39Giovanni Barallari: which means you can store global,
- 46:43Giovanni Barallari: again, between quotes,
- 46:44Giovanni Barallari: global state from an asynchronous code,
- 46:50Giovanni Barallari: suspend, and when you get back,
- 46:53Giovanni Barallari: you have the correct object back
- 46:56Giovanni Barallari: instead of mixing global state
- 46:58Giovanni Barallari: between different coroutines.
- 47:00Giovanni Barallari: Was my explanation good?
- 47:01Michael Kennedy: Yeah, that's good.
- 47:02Michael Kennedy: People are probably pretty common
- 47:04Michael Kennedy: with flask.request.
- 47:05Michael Kennedy: Yeah.
- 47:06Michael Kennedy: Because you've got a view method
- 47:07Michael Kennedy: or maybe deep down inside some lower part of your program,
- 47:10Michael Kennedy: you're like, well, I need to know what the URL was.
- 47:12Michael Kennedy: You just say Flask.request, you don't pass it around.
- 47:14Michael Kennedy: Like very handy, probably architecturally a bad choice.
- 47:17Michael Kennedy: You know, it's hard to like test it out, right?
- 47:20Michael Kennedy: And you mock it.
- 47:20Michael Kennedy: I don't know.
- 47:21Giovanni Barallari: Emmet does the same.
- 47:23Giovanni Barallari: It's the one thing I copied from Flask
- 47:26Giovanni Barallari: because I really like it.
- 47:27Giovanni Barallari: But I think we can do the same argument about database, right?
- 47:31Giovanni Barallari: Like with a synchronous database,
- 47:33Giovanni Barallari: like you have to start a context,
- 47:35Giovanni Barallari: Like, async with database, whatever, and then you need to pass that, like, all through.
- 47:41Giovanni Barallari: Like, a context bar is more handy.
- 47:43Giovanni Barallari: I don't know.
- 47:44Michael Kennedy: Yeah, yeah.
- 47:45Michael Kennedy: It certainly unlocks some really interesting things.
- 47:48Michael Kennedy: Some extensions do cool things with it.
- 47:50Michael Kennedy: So that's what you're talking about.
- 47:51Michael Kennedy: But because it's not all just tied to the thread and using asyncio context variables,
- 47:55Michael Kennedy: now it's kind of shared in potential ways.
- 47:57Michael Kennedy: It's a little bit, you got to opt into it.
- 47:59Michael Kennedy: That's right?
- 48:00Giovanni Barallari: Yeah, CSR.
- 48:01Giovanni Barallari: Again, like, it's a Boolean when you want to start the runtime.
- 48:05Giovanni Barallari: And I mean, it's an implementation detail.
- 48:09Giovanni Barallari: So it is just to be like,
- 48:11Giovanni Barallari: I think the big warning at the beginning
- 48:14Giovanni Barallari: should have been like,
- 48:15Giovanni Barallari: Tonyo is very alpha right now.
- 48:18Giovanni Barallari: So maybe that decision will change in the future
- 48:20Giovanni Barallari: because I think right now the default is false.
- 48:23Giovanni Barallari: That might become true
- 48:25Giovanni Barallari: as soon as I stabilize the API.
- 48:28Giovanni Barallari: But yeah, the idea was
- 48:29Giovanni Barallari: if you're testing Tonyo right now,
- 48:32Giovanni Barallari: if you're using Tonyo to do some tests right now,
- 48:34Giovanni Barallari: I want the developer to explicitly state, okay, I'm going to use context bars.
- 48:41Giovanni Barallari: Because again, the fact you have multiple threads and stuff happening in parallel,
- 48:49Giovanni Barallari: I just want for the developer to be sure if it's thinking model is correct
- 48:55Giovanni Barallari: before trying to do some stuff.
- 48:59Giovanni Barallari: Because again, Tony is multi-threaded.
- 49:01Giovanni Barallari: multi-threaders is usually like not it's it's i don't know i think for humans multi-threading is
- 49:08Giovanni Barallari: hard to get sometimes um so that's the trade-off right like uh yes we now have all of these
- 49:16Giovanni Barallari: capabilities on the other end we need to think about the fact that the sync io always had this
- 49:22Giovanni Barallari: uh hidden uh let's say a feature which is hey there's only one coroutine running at the time
- 49:30Giovanni Barallari: Whereas Antonio can have like whatever number.
- 49:32Michael Kennedy: Yep.
- 49:34Michael Kennedy: Now you still had to manage stuff across await calls.
- 49:37Michael Kennedy: So that was, I feel like people felt like the GIL saved them from all thread considerations,
- 49:43Michael Kennedy: like locks and semaphores and so on.
- 49:46Michael Kennedy: And I don't think it did.
- 49:47Michael Kennedy: There's not a guarantee that like a thread couldn't interrupt you.
- 49:50Michael Kennedy: It's just less likely to interrupt you, right?
- 49:53Giovanni Barallari: So like the simple thing is that it did around other primitives.
- 49:59Giovanni Barallari: So for example, in a SyncIO, it's really hard to deadlock yourself because you're using like a threading lock.
- 50:09Giovanni Barallari: Because again, like the hidden feature of a SyncIO is you have only one thread working on that shit, right?
- 50:16Michael Kennedy: Yeah, exactly.
- 50:17Michael Kennedy: Like you can do all the locks you want.
- 50:19Michael Kennedy: It's the same thread in the re-entrance.
- 50:21Michael Kennedy: Exactly.
- 50:21Michael Kennedy: It's effectively a no-op other than it costs CPU.
- 50:24Giovanni Barallari: Yes, exactly.
- 50:25Giovanni Barallari: Whereas in Tonio, like that's exactly where people usually make mistakes because now you have the Tonio locking because you have the asynchronous locks, but you also have thread locks, which are two different things.
- 50:39Giovanni Barallari: And if you, and so like you can deadlock Tonio.
- 50:43Giovanni Barallari: How?
- 50:43Giovanni Barallari: Yeah.
- 50:44Michael Kennedy: Welcome to multi-threading.
- 50:45Giovanni Barallari: Yes.
- 50:45Giovanni Barallari: Like you, you, you, you create, like you enter a threading lock and then you await a coroutine inside the threading lock.
- 50:52Giovanni Barallari: Now you're deadlocked.
- 50:53Giovanni Barallari: Yeah.
- 50:53Giovanni Barallari: Because the two things doesn't speak each other.
- 50:56Giovanni Barallari: But I guess my advice,
- 51:00Giovanni Barallari: if people want to start working in multi-threaded Python,
- 51:03Giovanni Barallari: my advice is just think about those two rules
- 51:09Giovanni Barallari: and then multi-threading is not that hard.
- 51:11Giovanni Barallari: Again, rule number one,
- 51:13Giovanni Barallari: never await inside a threading lock.
- 51:17Giovanni Barallari: That's a simple rule.
- 51:18Giovanni Barallari: Also because in Python, you use width lock.
- 51:22Giovanni Barallari: So that's super easy even to identify, right?
- 51:26Giovanni Barallari: That's rule number one.
- 51:28Giovanni Barallari: Rule number two, you have multiple threads.
- 51:30Giovanni Barallari: So if you want to write into anything,
- 51:33Giovanni Barallari: I mean, all the objects are thread safe in free thread of Python
- 51:37Giovanni Barallari: because a dictionary is thread safe, a list is thread safe, whatever.
- 51:41Giovanni Barallari: But that doesn't mean like you can screw up in using those.
- 51:46Giovanni Barallari: Because if you write state anywhere,
- 51:49Giovanni Barallari: You might have like race conditions and side effects because you expect to write something and then expect to read that value.
- 51:58Giovanni Barallari: But in the meantime, you have another thread right into the same location.
- 52:01Giovanni Barallari: So again, like my advice is rule number one, never use locks, threading locks, and then await.
- 52:08Giovanni Barallari: If you want to have an async lock, then use an async lock.
- 52:12Giovanni Barallari: So a Tonio lock for that.
- 52:14Giovanni Barallari: Rule number two, watch out.
- 52:16Giovanni Barallari: So you probably need locks when you want to be sure that, like, when you have a sequence of operation, right, on shared memory.
- 52:25Giovanni Barallari: Those are the two rules.
- 52:27Michael Kennedy: I think with those two rules, multithreading is not that hard.
- 52:31Michael Kennedy: Yeah, agreed.
- 52:32Michael Kennedy: So does Tonio come with its own dedicated lock and synchronization primitives?
- 52:38Giovanni Barallari: Yes, there's an entire sync module.
- 52:41Giovanni Barallari: So Tonio has different modules.
- 52:46Giovanni Barallari: Tonya time, which contains time primitives, like timeouts, timers, etc.
- 52:52Giovanni Barallari: It has async module, which contains all the synchronization primitives,
- 52:56Giovanni Barallari: so logs, semaphore, barriers, etc.
- 53:01Giovanni Barallari: It has the network module, which is one providing like sockets.
- 53:06Giovanni Barallari: So that's quite a big difference from a sync.io.
- 53:10Giovanni Barallari: So in a sync.io, we don't have like an async socket library.
- 53:16Giovanni Barallari: So if you think about the standard lib socket module,
- 53:21Giovanni Barallari: Tonio, AsyncIO needs you to use that
- 53:25Giovanni Barallari: and then pass the sockets to the event loop
- 53:28Giovanni Barallari: and then handle the socket through the event.
- 53:31Giovanni Barallari: Whereas in Tonio, there's a network module
- 53:34Giovanni Barallari: and inside that module, there's a socket module,
- 53:36Giovanni Barallari: which has the same exact interface of the standard lib plus socket.
- 53:40Giovanni Barallari: The only difference is, of course,
- 53:42Giovanni Barallari: every async method is async in Tonio.
- 53:47Giovanni Barallari: there's the
- 53:48Giovanni Barallari: streams module
- 53:50Giovanni Barallari: inside the network module which is the high level
- 53:53Giovanni Barallari: trio like
- 53:54Giovanni Barallari: interface to
- 53:56Giovanni Barallari: make it easy to manage
- 53:57Giovanni Barallari: network. It has a file
- 54:00Giovanni Barallari: system module which
- 54:02Giovanni Barallari: contains
- 54:03Giovanni Barallari: all the standard
- 54:06Giovanni Barallari: open kind of
- 54:08Michael Kennedy: methods that they
- 54:09Michael Kennedy: async with open
- 54:10Michael Kennedy: tonio.files.open something like that
- 54:13Giovanni Barallari: yeah.fs yes
- 54:15Giovanni Barallari: and it also contains like
- 54:17Giovanni Barallari: mirror of the
- 54:19Giovanni Barallari: pathlib, standard lib
- 54:20Giovanni Barallari: pathlib, so you can use like
- 54:22Giovanni Barallari: frontoniofs import path and that path
- 54:24Giovanni Barallari: has all the methods
- 54:26Giovanni Barallari: that are required to be asynchronous
- 54:29Giovanni Barallari: so that's
- 54:31Giovanni Barallari: more or less like the
- 54:33Giovanni Barallari: design
- 54:34Giovanni Barallari: I don't think like
- 54:36Giovanni Barallari: so right now I'm at
- 54:38Giovanni Barallari: tonio 0.9.14
- 54:40Giovanni Barallari: I guess
- 54:42Giovanni Barallari: and I don't think
- 54:44Giovanni Barallari: There's much left in terms of modules and primitives and features.
- 54:50Giovanni Barallari: The big feature missing is Windows support.
- 54:52Giovanni Barallari: More on that later.
- 54:55Giovanni Barallari: But yeah, I'd say I'm close to stabilize the API.
- 55:02Giovanni Barallari: So right now, again, this is all alpha.
- 55:05Giovanni Barallari: That's mostly because there's only me working on this.
- 55:08Giovanni Barallari: And I have Fable working on a bunch of other things,
- 55:12Giovanni Barallari: which I guess like if I can digress for a second,
- 55:17Giovanni Barallari: I think like I have a very peculiar and unique way of using AI
- 55:20Giovanni Barallari: because right now I'm like,
- 55:22Giovanni Barallari: and I guess like it's a good use case to advertise.
- 55:26Giovanni Barallari: So the entirety of Tonio,
- 55:28Giovanni Barallari: so Tonio has maybe 1% AI written code.
- 55:32Giovanni Barallari: The only code that was written by Claude
- 55:36Giovanni Barallari: was the pytest plugin.
- 55:38Giovanni Barallari: Oh, by the way, we also have a pytest plugin.
- 55:40Giovanni Barallari: so you can hide the smart tone.
- 55:45Giovanni Barallari: But that's the only part that I let AI touch.
- 55:49Giovanni Barallari: Everything else, like it's old school.
- 55:52Giovanni Barallari: I written all of it like the old way, text editor,
- 55:57Giovanni Barallari: not even any suggestion and everything.
- 56:02Giovanni Barallari: What I used AI for, and it helped me a lot
- 56:07Giovanni Barallari: into reaching a state in which I think Tonio is really stable now
- 56:13Giovanni Barallari: was to use AI to build projects that were using Tonio
- 56:18Giovanni Barallari: and stress test everything about Tonio.
- 56:21Giovanni Barallari: So for example, I made a port of Pi,
- 56:25Giovanni Barallari: the harness from Maria Zeckner.
- 56:28Giovanni Barallari: So I made Claude rewrite the whole thing in Python
- 56:32Giovanni Barallari: because Pi is written in TypeScript, regardless of the name.
- 56:37Giovanni Barallari: So I made that entire harness with Claude saying,
- 56:41Giovanni Barallari: okay, take five,
- 56:42Giovanni Barallari: meter every behavior and just use Tonio to do everything.
- 56:47Giovanni Barallari: And that like helped me like catch
- 56:49Giovanni Barallari: like probably 95% of the bugs in Tonio.
- 56:53Giovanni Barallari: And I kind of started doing the same for the ecosystem.
- 56:57Giovanni Barallari: Maybe we can talk about it a bit later,
- 56:59Giovanni Barallari: but yeah, that's also like a super,
- 57:02Giovanni Barallari: it's super useful for me, right?
- 57:04Giovanni Barallari: Like as a solo open source developer,
- 57:06Giovanni Barallari: which, yeah, I want to focus on Tonio.
- 57:09Giovanni Barallari: I don't have time to do all the other packages.
- 57:12Giovanni Barallari: And so, yeah, that was nice.
- 57:13Michael Kennedy: That's a very interesting way.
- 57:14Michael Kennedy: I hadn't really considered that.
- 57:16Michael Kennedy: It's just like, I need users before I have users.
- 57:19Michael Kennedy: I need these three use cases covered.
- 57:21Michael Kennedy: So give me a web app that uses an async database.
- 57:24Michael Kennedy: Give me this terminal app and so on.
- 57:27Michael Kennedy: And that's, yeah, that's really cool.
- 57:28Michael Kennedy: Yeah.
- 57:29Michael Kennedy: Okay.
- 57:30Michael Kennedy: I agree.
- 57:30Michael Kennedy: Ecosystem is interesting.
- 57:31Michael Kennedy: I want to talk about it.
- 57:32Michael Kennedy: But before that, I want to come back to blocking threads.
- 57:35Michael Kennedy: Yes.
- 57:35Michael Kennedy: So blogging threads are CPU bound generally type of things.
- 57:39Michael Kennedy: Is that right?
- 57:40Michael Kennedy: So I think Tonio is a bit peculiar in this regard
- 57:45Giovanni Barallari: because it really depends what your program does.
- 57:48Giovanni Barallari: Because if your program, whatever that is, has mixed load,
- 57:54Giovanni Barallari: which means like you have both IO bound stuff,
- 57:58Giovanni Barallari: like network, disk, terminal, whatever, and CPU bound stuff,
- 58:05Giovanni Barallari: then the only way to be sure that everything keeps running smoothly,
- 58:10Giovanni Barallari: like on the network part, the IO part,
- 58:13Giovanni Barallari: is to spawn the CPU bound stuff on the blocking thread pool.
- 58:19Giovanni Barallari: But if your program is just CPU bound, then who cares?
- 58:24Giovanni Barallari: Just use the normal thread pool
- 58:29Giovanni Barallari: because then you don't have anything to block.
- 58:32Giovanni Barallari: like your CPU bound, your CPU limited.
- 58:35Giovanni Barallari: So the standard configuration of Tonio
- 58:37Giovanni Barallari: gives you exactly the perfect number of CPU cores to use.
- 58:41Giovanni Barallari: On the other hand, if you just have like IO bound.
- 58:46Giovanni Barallari: So again, like if you have just CPU bound work
- 58:49Giovanni Barallari: or just IO bound work,
- 58:50Giovanni Barallari: you can use like the standard pool,
- 58:53Giovanni Barallari: nothing particular like this.
- 58:55Giovanni Barallari: The blocking thread pool is useful
- 58:57Giovanni Barallari: only when you have mixed workloads
- 58:59Giovanni Barallari: and you need to balance them, right?
- 59:01Michael Kennedy: Okay, how do I create such a thing?
- 59:04Michael Kennedy: How do I start a task in one or the other?
- 59:07Giovanni Barallari: So every await or yell destruction
- 59:11Giovanni Barallari: or a tonio spawn destruction
- 59:13Giovanni Barallari: runs on the standard thread pool.
- 59:16Giovanni Barallari: To spawn something on the blocking thread pool
- 59:19Giovanni Barallari: is just tonio spawn blocking.
- 59:21Giovanni Barallari: Done.
- 59:21Giovanni Barallari: You don't need to manage the size of the pool.
- 59:23Giovanni Barallari: You don't need to create the pool.
- 59:27Giovanni Barallari: If you want to control concurrency in the blocking threat pool,
- 59:34Giovanni Barallari: you either use, like, barriers when you spawn stuff
- 59:38Giovanni Barallari: or semaphores when you spawn stuff.
- 59:41Giovanni Barallari: But, yeah, like, in general,
- 59:43Giovanni Barallari: it's not different from spawning anything else.
- 59:46Giovanni Barallari: Sure.
- 59:46Michael Kennedy: So you can spawn blocking.
- 59:48Michael Kennedy: Here's what I was thinking.
- 59:49Michael Kennedy: Here's what I was getting at.
- 59:51Michael Kennedy: That I think would be a sweet feature.
- 59:53Michael Kennedy: You've got at tonio.main for the entry point, right?
- 59:57Michael Kennedy: Yes.
- 59:58Michael Kennedy: So that runs on tonio.run instead of just Python run or whatever.
- 1:00:02Michael Kennedy: For functions that you know are computational,
- 1:00:05Michael Kennedy: you would like to ensure that they run on a blocking thread
- 1:00:08Michael Kennedy: or along those lines.
- 1:00:10Michael Kennedy: You could put a decorator that just says tonio.cpu or whatever.
- 1:00:15Michael Kennedy: I don't know.
- 1:00:16Michael Kennedy: You come up with a name, but that way I don't even have to think.
- 1:00:19Michael Kennedy: If I import another library also built on tonio,
- 1:00:22Michael Kennedy: I don't know, oh, that function wants me to run it this way.
- 1:00:25Michael Kennedy: No, I just call it.
- 1:00:26Michael Kennedy: Antonio goes, ah, this is an async CPU one.
- 1:00:29Michael Kennedy: So we'll scale it up, scaffold it up on that, basically.
- 1:00:33Giovanni Barallari: That's a nice suggestion, okay?
- 1:00:36Giovanni Barallari: All right.
- 1:00:37Giovanni Barallari: I think it will land in Antonio 0.10, yes.
- 1:00:40Giovanni Barallari: Awesome, okay, cool.
- 1:00:41Michael Kennedy: I like that.
- 1:00:43Michael Kennedy: When you're in the function, the locality of the information
- 1:00:46Michael Kennedy: that, oh, this is computational and so on is right there.
- 1:00:49Michael Kennedy: But when you're calling, and especially in a big app,
- 1:00:51Michael Kennedy: you don't know, right?
- 1:00:51Michael Kennedy: So I think that would be really cool.
- 1:00:53Michael Kennedy: So I'm glad you like it.
- 1:00:54Michael Kennedy: No, we'll work on that.
- 1:00:55Michael Kennedy: Awesome.
- 1:00:56Michael Kennedy: All right, we got time for two really quick things.
- 1:00:59Michael Kennedy: So one thing that is nice about standard asyncio
- 1:01:02Michael Kennedy: is everyone uses asyncio
- 1:01:03Michael Kennedy: if they're writing async code at the moment,
- 1:01:05Michael Kennedy: unless they do something like Trio
- 1:01:06Michael Kennedy: or one of these other things.
- 1:01:08Michael Kennedy: So for example, if I use HTTPX2 or HTTPX
- 1:01:12Michael Kennedy: and I, with async, you know,
- 1:01:14Michael Kennedy: async with create a client of it
- 1:01:16Michael Kennedy: and I await its get,
- 1:01:18Michael Kennedy: that runs on the same sort of deal.
- 1:01:20Michael Kennedy: but it's probably not compatible with Tonio, is it?
- 1:01:23Michael Kennedy: And if it's not, what do I do?
- 1:01:24Giovanni Barallari: Yeah, it's not.
- 1:01:28Giovanni Barallari: So I have one thing that is the current state,
- 1:01:32Giovanni Barallari: and I also have the idea for the future.
- 1:01:35Giovanni Barallari: So right now we have a package which is called TonioMonkey,
- 1:01:40Giovanni Barallari: and you probably can guess what it means, what it does.
- 1:01:43Giovanni Barallari: It basically like monkey patches popular,
- 1:01:48Giovanni Barallari: Or I would either say, like, asyncio native libraries I thought about in the last few months.
- 1:01:56Giovanni Barallari: That might be useful.
- 1:01:59Giovanni Barallari: And so I guess today we have, like, TonyaMonkey can monkey patch async.
- 1:02:05Giovanni Barallari: No, sorry.
- 1:02:06Giovanni Barallari: PsychoPG.
- 1:02:08Giovanni Barallari: It can patch HTTPX and HTTPX2.
- 1:02:12Giovanni Barallari: It can patch Redis.
- 1:02:15Giovanni Barallari: And I think that's most of it for the moment.
- 1:02:17Giovanni Barallari: But I'm open for issues.
- 1:02:21Giovanni Barallari: If anyone from the listeners want to try Tonio to an existing code base
- 1:02:28Giovanni Barallari: and you have a package you would like to see monkey patched,
- 1:02:33Giovanni Barallari: just open an issue in the TonioMonkey repo
- 1:02:35Giovanni Barallari: or even in Tonio discussions, and I will look at it.
- 1:02:41Giovanni Barallari: Because again, right now I need the vast majority of possible use cases
- 1:02:46Giovanni Barallari: to see that I covered everything.
- 1:02:50Giovanni Barallari: Ideally, as soon as I stabilize the API
- 1:02:52Giovanni Barallari: and I say, okay, this is the thing,
- 1:02:56Giovanni Barallari: my idea was to try to contact the NEIO maintainers
- 1:03:04Giovanni Barallari: to see if we can have NEIO backend in NEIO,
- 1:03:13Giovanni Barallari: which should be like a way easier way to deal with this.
- 1:03:20Giovanni Barallari: I'm not sure how much it's feasible because again,
- 1:03:22Giovanni Barallari: like the main problem for Tonio right now is that it doesn't support any of the
- 1:03:27Giovanni Barallari: synchio primitives.
- 1:03:28Giovanni Barallari: So if any code base like relies a ton on task or futures or whatever,
- 1:03:34Giovanni Barallari: that's not in the runtime.
- 1:03:36Giovanni Barallari: Yeah.
- 1:03:37Michael Kennedy: Yeah.
- 1:03:37Michael Kennedy: Okay.
- 1:03:38Michael Kennedy: Interesting.
- 1:03:38Michael Kennedy: Interesting.
- 1:03:39Michael Kennedy: But there are some choices.
- 1:03:40Michael Kennedy: And are you also creating your own?
- 1:03:42Michael Kennedy: I saw some custom HTTP or some other library or two.
- 1:03:48Giovanni Barallari: I'm also trying to be a very contained ecosystem of libraries,
- 1:03:54Giovanni Barallari: mainly on the web part.
- 1:03:55Giovanni Barallari: So right now, I published a low-level HTTP library for Python
- 1:04:02Giovanni Barallari: that is compatible both with Asyncio and Tonio.
- 1:04:07Giovanni Barallari: It's called HTTPunk.
- 1:04:09Giovanni Barallari: I published an eye-level client, HTTP client, on top of that, which is called Punk Rec.
- 1:04:19Giovanni Barallari: So again, you can use that regardless of Tonio Asincaio, because the adaptation layer is inside the package.
- 1:04:27Giovanni Barallari: I kind of published a very beta experiment of a Uvicorn port to work in Tonio,
- 1:04:38Giovanni Barallari: Which I guess brings up a question like, hey, when will Granian support this?
- 1:04:45Giovanni Barallari: Am I right?
- 1:04:46Giovanni Barallari: Yeah, right.
- 1:04:47Giovanni Barallari: So I have plans.
- 1:04:50Giovanni Barallari: It's actually way bigger plans for Granian.
- 1:04:53Giovanni Barallari: So as I said before, 2026 was a bit boring in Granian.
- 1:04:58Giovanni Barallari: Like, no, a bunch of new features, not a bunch of that stuff.
- 1:05:02Giovanni Barallari: But that's just because several months ago, I started designing two things for Granian.
- 1:05:08Giovanni Barallari: So the first is this revision two of the ArchGee protocol,
- 1:05:13Giovanni Barallari: which will be async independent.
- 1:05:17Giovanni Barallari: So it will become like a callback protocol
- 1:05:21Giovanni Barallari: because the other big feature I want to add in Granian
- 1:05:26Giovanni Barallari: is to support a bunch of runtimes.
- 1:05:29Giovanni Barallari: So my idea is not the Granian tree,
- 1:05:32Giovanni Barallari: when it will land, no promises on the time here,
- 1:05:36Giovanni Barallari: but like when it will land,
- 1:05:37Giovanni Barallari: Ideally, it will support Asyncio, Trio, Tonio, gEvent, eventlet, and a bunch of stuff.
- 1:05:45Giovanni Barallari: So that's the idea, is to isolate, let's say, the protocol implementation and the Python runtime implementation.
- 1:05:55Giovanni Barallari: So it will happen one day.
- 1:05:59Giovanni Barallari: In the meantime, I wanted to have a test server to use with Tonio and see what happens.
- 1:06:04Giovanni Barallari: So that's why.
- 1:06:07Michael Kennedy: Yeah, using something like
- 1:06:08Michael Kennedy: Cord or FastAPI or something like that.
- 1:06:11Michael Kennedy: If you were able to run it in Granian
- 1:06:13Michael Kennedy: with the Tonio, Tonio
- 1:06:15Michael Kennedy: backend, the async
- 1:06:17Michael Kennedy: endpoints you write would be
- 1:06:19Michael Kennedy: running on Tonio, yeah?
- 1:06:20Michael Kennedy: Yeah, that's the plan.
- 1:06:22Giovanni Barallari: In TonioMonkey, there are also patches for FastAPI,
- 1:06:25Giovanni Barallari: by the way. And I'm working
- 1:06:27Giovanni Barallari: on a one on Django.
- 1:06:28Giovanni Barallari: I need to ping
- 1:06:30Giovanni Barallari: Carleton on that
- 1:06:32Giovanni Barallari: because we met this year
- 1:06:34Giovanni Barallari: at this year, PyCon Italy,
- 1:06:36Giovanni Barallari: and we talk about it.
- 1:06:39Giovanni Barallari: So maybe in a month or so,
- 1:06:42Michael Kennedy: we will also have like a patch for Django.
- 1:06:44Michael Kennedy: Sweet.
- 1:06:45Michael Kennedy: Yeah, I just had Carlton on to talk about
- 1:06:52Michael Kennedy: basically all the async work in Django 6 and 6.0 and so on.
- 1:06:55Giovanni Barallari: So that was fun.
- 1:06:56Giovanni Barallari: I watched the episode and I was like,
- 1:06:58Giovanni Barallari: huh, sounds familiar, huh, huh.
- 1:07:01Michael Kennedy: Yeah, we've talked about that.
- 1:07:03Michael Kennedy: I see.
- 1:07:03Michael Kennedy: Interesting.
- 1:07:04Michael Kennedy: All right.
- 1:07:04Michael Kennedy: Well, I got one final main topic for us.
- 1:07:07Michael Kennedy: Yep.
- 1:07:08Michael Kennedy: Oh, yeah.
- 1:07:08Michael Kennedy: What about windows?
- 1:07:12Michael Kennedy: So.
- 1:07:12Michael Kennedy: And I'm not putting pressure on you to do it.
- 1:07:15Michael Kennedy: No, no, no.
- 1:07:16Michael Kennedy: I'm just rounding out the conversation.
- 1:07:18Michael Kennedy: Okay.
- 1:07:18Giovanni Barallari: So if you ask me like a few months ago, my answer would probably be like that short video
- 1:07:26Giovanni Barallari: extract from a series like where you had the actor.
- 1:07:32Giovanni Barallari: Whatever.
- 1:07:33Giovanni Barallari: um you know i'm gonna not gonna not gonna swear on the podcast but uh uh you get what i mean
- 1:07:41Giovanni Barallari: uh so i i'm not so first of all like the usual problem so supporting windows in granian
- 1:07:49Giovanni Barallari: it's a pain man like a real pain like i'm not joking right because it has like all these
- 1:07:55Giovanni Barallari: quirk behaviors not just in python not just in terms of threads like do you know that win that
- 1:08:02Giovanni Barallari: that windows have as like a bug from i think it was like nt4 uh that like if you if you share a
- 1:08:11Giovanni Barallari: socket it becomes blocking and so you cannot use it like anywhere um so windows for start like
- 1:08:18Giovanni Barallari: windows is a pain and is a very weird operating system second i don't have like a windows environment
- 1:08:27Giovanni Barallari: because finally in 2026,
- 1:08:29Giovanni Barallari: I was able to finally have just macOS and Linux
- 1:08:32Giovanni Barallari: on all my machines, also for gaming.
- 1:08:35Giovanni Barallari: So I'm so happy.
- 1:08:37Giovanni Barallari: So those are, like I say,
- 1:08:39Giovanni Barallari: the two main preambles on Windows support.
- 1:08:44Giovanni Barallari: But also because implementing the library
- 1:08:48Giovanni Barallari: I use Antonio to manage the Polar,
- 1:08:52Giovanni Barallari: the actual event loop,
- 1:08:54Giovanni Barallari: It supports Windows, but you know, weird way.
- 1:08:58Giovanni Barallari: So, months ago I was like almost a hundred percent convinced now,
- 1:09:03Giovanni Barallari: never windows, never now, thanks to fable by chatting with fable.
- 1:09:09Giovanni Barallari: I think we found a way to hack into, into meal, this library to, to fake
- 1:09:18Giovanni Barallari: some stuff about windows.
- 1:09:20Giovanni Barallari: So it will interpret some stuff as TCP sockets.
- 1:09:24Giovanni Barallari: even if they are like file descriptors or anything.
- 1:09:28Giovanni Barallari: So I won't make a promise here
- 1:09:31Giovanni Barallari: because then I have to do it.
- 1:09:34Giovanni Barallari: But ideally, end of the year,
- 1:09:38Giovanni Barallari: we might see partial Windows support in Tom.
- 1:09:41Giovanni Barallari: Sweet.
- 1:09:41Giovanni Barallari: So that's the idea right now.
- 1:09:44Giovanni Barallari: I still hate Microsoft, to be clear here.
- 1:09:47Giovanni Barallari: Like, man, I just like Windows.
- 1:09:51Giovanni Barallari: So if any of the listeners,
- 1:09:54Giovanni Barallari: like if you're programming in Windows
- 1:09:57Giovanni Barallari: and not using Weasel,
- 1:09:59Giovanni Barallari: please put down in the comments why.
- 1:10:01Giovanni Barallari: Like, why are you self-inflicting this to you?
- 1:10:05Giovanni Barallari: Like, explain me the rationale
- 1:10:08Giovanni Barallari: into dealing with all the BS
- 1:10:11Giovanni Barallari: that Windows 11 is nowadays.
- 1:10:14Giovanni Barallari: So yeah, but anyways,
- 1:10:17Giovanni Barallari: I will try end of the year
- 1:10:18Giovanni Barallari: to have some form of Windows support in time.
- 1:10:21Michael Kennedy: I can tell, I can sense your excitement.
- 1:10:23Michael Kennedy: My Windows computer over there is Windows 10, by the way.
- 1:10:26Michael Kennedy: But I do think for people listening,
- 1:10:28Michael Kennedy: Windows Subsystem for Linux is an escape hatch
- 1:10:30Michael Kennedy: that you can do, right?
- 1:10:32Michael Kennedy: If you had a project, you really want to use this here,
- 1:10:34Michael Kennedy: like set up Windows Subsystem for Linux
- 1:10:35Michael Kennedy: and run it there, right?
- 1:10:36Giovanni Barallari: To be here, like the only reason I want to,
- 1:10:40Giovanni Barallari: like I want to try to add Windows support in Tonio
- 1:10:42Giovanni Barallari: is not for developers,
- 1:10:44Giovanni Barallari: is actually to provide developers a way to say,
- 1:10:48Giovanni Barallari: okay, I want to build a program in Python
- 1:10:50Giovanni Barallari: with Tonio that has to work like everywhere.
- 1:10:53Giovanni Barallari: Because right now, again,
- 1:10:54Giovanni Barallari: like if you code anything in Tonio,
- 1:10:56Giovanni Barallari: it works only on POSIX systems,
- 1:10:58Giovanni Barallari: so only Linux and macOS.
- 1:11:00Giovanni Barallari: So that's the reason why I want to have
- 1:11:02Giovanni Barallari: at least some form of Windows support
- 1:11:04Giovanni Barallari: because, I mean, it's not about developers.
- 1:11:07Giovanni Barallari: It's about like where the software runs
- 1:11:09Giovanni Barallari: at the end of the day.
- 1:11:10Giovanni Barallari: Right, right.
- 1:11:10Michael Kennedy: It's the deployment targets, yeah.
- 1:11:12Giovanni Barallari: Yeah.
- 1:11:13Michael Kennedy: All right, Joe, final call to action.
- 1:11:14Michael Kennedy: People have been listening
- 1:11:15Michael Kennedy: and they're like, this sounds pretty excellent.
- 1:11:17Michael Kennedy: I want to try it.
- 1:11:18Michael Kennedy: What do you tell them?
- 1:11:19Giovanni Barallari: I mean, like, again, I think we're living in the perfect moment to try stuff.
- 1:11:28Giovanni Barallari: We've given with this big opportunity, big new opportunity of free-threaded Python.
- 1:11:35Giovanni Barallari: We have AI agents.
- 1:11:38Giovanni Barallari: And by the way, I was surprised, but like pointing any agent, any model,
- 1:11:44Giovanni Barallari: frontier model to a project and say, okay, implement this in Tonio.
- 1:11:48Giovanni Barallari: I was surprised.
- 1:11:49Giovanni Barallari: They got all the API correctly most of the times,
- 1:11:53Giovanni Barallari: which is amazing.
- 1:11:54Giovanni Barallari: There's no training data about Tonio.
- 1:11:56Giovanni Barallari: And regardless, it was able to drive through stuff.
- 1:12:02Giovanni Barallari: So I guess it's the perfect moment to try stuff.
- 1:12:06Giovanni Barallari: I'd say if for any reason you're not happy with Asyncio,
- 1:12:11Giovanni Barallari: if for any reason you experience any of the pain points we talked about,
- 1:12:18Giovanni Barallari: I think it's like the perfect moment to try new stuff.
- 1:12:24Giovanni Barallari: And if you try Tonio and you have like a use case
- 1:12:29Giovanni Barallari: where it's not working or the API can be improved,
- 1:12:33Giovanni Barallari: like open an issue, open a discussion,
- 1:12:36Giovanni Barallari: ping me, DM me on Twitter.
- 1:12:39Giovanni Barallari: Oh, sorry, X the everything up.
- 1:12:41Giovanni Barallari: I will call it.
- 1:12:44Giovanni Barallari: Ping me and we'll figure out.
- 1:12:48Giovanni Barallari: Yeah, I think that's my message.
- 1:12:51Michael Kennedy: Yeah, awesome.
- 1:12:52Michael Kennedy: Well, it looks like a very ambitious project
- 1:12:54Michael Kennedy: and I think you've done a lot of interesting things.
- 1:12:57Michael Kennedy: So thanks for coming on and sharing it.
- 1:12:58Michael Kennedy: Tell people where they can stay in touch with you as well.
- 1:13:01Giovanni Barallari: Yes, so my GitHub handle is G-I-0-B-A-R-O.
- 1:13:09Michael Kennedy: You can find me with the same handle
- 1:13:14Giovanni Barallari: Twitter. I have a blog, even if I don't write a ton, but you can find my blog at blog.baro.dev.
- 1:13:24Giovanni Barallari: And if you want to join me and Marcelo Trilesinski, again, author of Uvicorn, Starlet, and a bunch of
- 1:13:36Giovanni Barallari: stuff he's making with TokenMaxing, we recently started a podcast available on YouTube.
- 1:13:44Giovanni Barallari: at the www pod.
- 1:13:47Michael Kennedy: Nice.
- 1:13:47Michael Kennedy: So people, check them out.
- 1:13:49Michael Kennedy: Check out the pod.
- 1:13:49Michael Kennedy: That sounds fun.
- 1:13:50Michael Kennedy: I'll give it a look as well.
- 1:13:51Michael Kennedy: Joe, thanks for coming on the show.
- 1:13:53Michael Kennedy: Nice to catch up with you.
- 1:13:54Michael Kennedy: Thank you for having me.
- 1:13:55Michael Kennedy: It was super good.
- 1:13:57Michael Kennedy: This has been another episode of Talk Python To Me.
- 1:14:00Michael Kennedy: Thank you to our sponsors.
- 1:14:01Michael Kennedy: Be sure to check out what they're offering.
- 1:14:02Michael Kennedy: It really helps support the show.
- 1:14:04Michael Kennedy: This episode is sponsored by Sentry's Seer.
- 1:14:07Michael Kennedy: If you're tired of debugging in the dark, give Seer a try.
- 1:14:10Michael Kennedy: There are plenty of AI tools that help you write code,
- 1:14:12Michael Kennedy: but Sentry's seer is built to help you fix it when it breaks.
- 1:14:16Michael Kennedy: Visit talkpython.fm/sentry and use the code talkpython26,
- 1:14:20Michael Kennedy: all one word, no spaces, for $100 in Sentry credits.
- 1:14:24Michael Kennedy: And it's brought to you by us.
- 1:14:26Michael Kennedy: Talk Python and Python Bytes both now have MCP servers.
- 1:14:30Michael Kennedy: Point your AI at 10 plus years of Python episodes,
- 1:14:34Michael Kennedy: transcripts, and show notes free.
- 1:14:36Michael Kennedy: Click MCP in the nav at talkpython.fm and at Python Bytes.
- 1:14:40Michael Kennedy: If you or your team needs to learn Python,
- 1:14:42Michael Kennedy: We have over 270 hours of beginner and advanced courses on topics ranging from complete beginners
- 1:14:48Michael Kennedy: to async code, Flask, Django, HTMX, and even LLMs.
- 1:14:52Michael Kennedy: Best of all, there's no subscription in sight.
- 1:14:55Michael Kennedy: Browse the catalog at talkpython.fm.
- 1:14:57Michael Kennedy: And if you're not already subscribed to the show on your favorite podcast player, what
- 1:15:01Michael Kennedy: are you waiting for?
- 1:15:03Michael Kennedy: Just search for Python in your podcast player.
- 1:15:05Michael Kennedy: We should be right at the top.
- 1:15:06Michael Kennedy: If you enjoy that geeky rap song, you can download the full track.
- 1:15:09Michael Kennedy: The link is actually in your podcast blur show notes.
- 1:15:12Michael Kennedy: This is your host, Michael Kennedy.
- 1:15:13Michael Kennedy: Thank you so much for listening.
- 1:15:15Michael Kennedy: I really appreciate it.
- 1:15:16Michael Kennedy: I'll see you next time.
- 1:15:27I'm me.
- 1:15:29Get me ready to roll.
- 1:15:32Upgrade the code.
- 1:15:34No fear of getting old.
- 1:15:37We tapped into that modern vibe
- 1:15:40over Kenny's storm.
- 1:16:11Продолжение следует...