Michael Kennedy

Things Michael Says on Podcasts

Python developer, PSF Fellow and founder of Talk Python Training, which offers courses for Python developers. Covers Python releases, free-threaded Python, packaging with uv, data tools and coding agents. Hosts Talk Python To Me and co-hosts Python Bytes, a weekly news show for Python developers. Has appeared as a guest on Real Python Podcast, The Changelog and Command Line Heroes.

Where to Find Them

Michael Kennedy hosts Python Bytes and hosts Talk Python To Me . They have also been a guest on Test & Code (4 times) , Real Python Podcast (2 times) , Legacy Code Rocks , The Changelog , Command Line Heroes and Vanishing Gradients .

Recently: “#507 Something about security” on Python Bytes (December 2026); “#570: Free-Threaded Python” on Talk Python To Me (November 2026); “#506 Raft, Rust, and release day” on Python Bytes (November 2026); “#505 Introducing diskcache-oxide” on Python Bytes (November 2026); “#569: Connecting Agents to Data via MCP, CLI, and More” on Talk Python To Me (November 2026); “#504 Who turned the GIL back on?” on Python Bytes (November 2026).

What They Said

“When you hear corrupt memory and crash the interpreter, that is one bit of cleverness away from remote code execution with no authentication. That's a very bad place to be.” — Michael Kennedy, Python Bytes

Michael Kennedy was covering a write-up in which AI agents translated about 10 percent of CPython's functions into the proof language Lean and reported hundreds of bugs, around 55 of which could crash the interpreter or corrupt memory. This is his reaction to those.

Python Bytes · 2026-12-02 Permalink → Listen →
Python Bytes Around 06:34 into the episode
Michael Kennedy

…that has not seen or participated in this i would like you to evaluate it right and tell me if you think this is actually true and so on so they did that to make sure it works and they ended up with 600 000 lines of lean across 1500 files here's a part where it gets weird 18 927 theorems and lemmas

Calvin Hendryx-Parker

i'm not even sure what a lemma is

Michael Kennedy

i love that they have lemmas so lemmas are like not quite as strong as a theorem it's like a theorem is like a big statement a little lemma is like a little bit of a side idea that you combine to make a theorem type of thing so very fun uh there but here's where it gets interesting it reported 415 verified bugs in c python most of which are small but 55 can crash the interpreter or oh my god corrupt memory from ordinary python code you probably

Calvin Hendryx-Parker

yeah you might want to look into that

Michael Kennedy

when you hear corrupt memory and crash the interpreter that is one bit of cleverness away from remote code execution with yeah no authentication right that's a very bad place to be

Calvin Hendryx-Parker

wow so this is completely on their own not associated to the psf or yeah i don't

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.
“And do you know what you don't get if you have a static file that has 20 lines of Python you wrote in it? Supply chain exposure. Not on that file anyway.” — Michael Kennedy, Talk Python To Me

The host and guest were discussing having a coding agent write small pieces of code instead of installing libraries that pull in other packages, with supply chain attacks a top worry this year.

Talk Python To Me · 2026-11-26 Permalink → Listen →
Talk Python To Me Around 39:38 into the episode
Michael Kennedy

I don't know. I don't know how to solve this problem, but that's the place we're in.

Christopher Ariza

…feel that pull as well in my own work where, you know, I can look for a small library to do something, or I can have my agent just write it and have it be, you know, 95% or 100% of what I need. So we don't get as much reuse through that mechanism, but it does avoid a lot of dependency problems.

Michael Kennedy

Yeah, it avoids this threading issue if. The third level transitive dependency is not thread ready yet. But you can just tell your agent, make these 20 lines of code thread safe, but it's really hard to tell it to make like all of these dependencies you don't control behave in a way, you know? Yeah, that's the other one that is honestly a 2026 top hit as well. Not as much as AI, but it supply chain attacks and vulnerabilities. And do you know what you don't get if you have a static file that has got 20 lines of Python you wrote in it? Supply chain exposure. Not on that file anyway. You know what I mean?

Christopher Ariza

Yeah, that's true too. I mean, that's that's absolutely the case. There is, there is a benefit from reducing your vulnerable dependency exposure for not only supporting new features like this, but also for security. Absolutely.

Michael Kennedy

You work, at least for a while, in a very high-stakes industry. What have you all been doing with dependencies and supply chain concerns? Like, has this been something that's concerned you as well?

Christopher Ariza

Yeah, absolutely. So, um,

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.
“What happens if I take that same awesome disk cache, the original, and I use it in a multi-threaded situation? It goes from 400,000 requests a second to 19,000. It's 20 times slower if I try to use it in a free-threaded way. … It was built for a different time.” — Michael Kennedy, Python Bytes

Calvin asked whether the existing diskcache library was good enough and whether a rebuild was needed. Michael answers with his own benchmark of the original library under free-threaded Python, which is why he wrote a Rust-backed version.

Python Bytes · 2026-11-17 Permalink → Listen →
Python Bytes Around 21:36 into the episode
Michael Kennedy

…On a single SQLite file with one thread, just straight Gil Python, nothing fancy yet. It does in a 99 to 1 read-write ratio. So 99 reads, one write. That's pretty cache standard. There's also a graph for a thousand reads and one write. It does 670,000 reads and writes a second. A second. Okay.

Calvin Hendryx-Parker

Michael, isn't it just good enough? Do we need this?

Michael Kennedy

Yes, we do because the previous one was also very impressive. Like I do not take away my positive comments about regular disk cache. But if, and here, remember the free-threaded mission, this is my mission. What happens if I take that same awesome disk cache, not mine, the original, and I use it in a multi-threaded situation? It goes from 400,000 requests a second to 19,000. It's 20 times slower if I try to use it in a free-threaded way. Yeah. Broken as that. It's no good. And it's just, it was built for a different time, right? And I would be totally content if I think the guy's name is Greg. Greg behind it would like go, yeah, we're totally going to ramp this thing up. But he got hired at OpenAI and then like the next day, like responses on GitHub. Like there was just, maybe it's a corporate thing. I don't know. He's just like not allowed to even reply, but done. So I went through and I said, I want to take a similar API, not identical, but almost the same. And I want to build this free-threaded, multi-threaded, rust-based version of this.…

Calvin Hendryx-Parker

you're ready to deploy onto PyZero now.

Michael Kennedy

Yes. Yeah. 100%. So you give it just SQLite file and it can be durable or not. So the serialization for disk cache, and a lot of these caches, I think I saw it in the other one is pickle. That's just wrong to me. Like it's a security violation. You hear this a lot with Hugging Face and those types…

Calvin Hendryx-Parker

That's pretty incredible. Yeah. And this is modern now.

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.
“If you're thinking about a project, maybe just take the two minutes, copy the GitHub URL, go to your favorite AI and go, hey, I'm considering using this. Is there anything malicious in here? Don't do a security review. Just tell me, is it a supply chain thing? That's the new virus scanner. I think we've got to get to that.” — Michael Kennedy, Python Bytes

After a segment on honeypots and supply-chain attacks, Michael Kennedy suggests asking an AI model to vet any unfamiliar repository before using it. It's his advice, not a tested method.

Python Bytes · 2026-11-10 Permalink → Listen →
Python Bytes Around 23:57 into the episode
Michael Kennedy

I mean, not cool that it's happening, but I love the idea of honeypots and these canaries and type of things. They're really great.

Calvin Hendryx-Parker

Especially if it's your hobby and you want to see what's going on and experience it. If you can get one of them hitting your honeypot, then you'll gather data from the attackers.

Michael Kennedy

Yeah, absolutely. Now, before we move on to my extra, we were talking before the show, but it feels like maybe worth bringing it out to the audience now. As I go around and look at these different projects that people send me and so on, you never know what's out on the internet, right? There's all the supply chain stuff. So if you're thinking about a project, maybe just take the two minutes, copy the GitHub URL, go to your favorite AI and go, hey, I'm considering using this. Is there anything malicious in here? Don't do a security review. Just tell me, is it a supply chain thing? And just, you know, that's the new virus scanner. I think we got to get to.

Calvin Hendryx-Parker

These repositories have hooks potentially in them that could run code on your machines. And you clone it. And then if you change into another branch, there's a hook that can fire that can do whatever it wants.

Michael Kennedy

Isn't that nice? I get an extra little bit of execution that I didn't expect. It was convenient.

Calvin Hendryx-Parker

It was convenient as developers because we would use it for certain things, but it's also very convenient for attackers.

Speaker names come from our own diarization. The position is estimated from where the line sits in the episode.

Collections They Appear In