Brought to you by Talk Python Courses and Six Feet Up consulting

#475: Haunted warehouses

Published Mon, Mar 30, 2026, recorded Mon, Mar 30, 2026
0:00
00:40:54
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by us! Support our work through:

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 11am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Michael #1: Lock the Ghost

  • The five core takeaways:
    1. PyPI "removal" doesn't delete distribution files. When a package is removed from PyPI, it disappears from the index and project page, but the actual distribution files remain accessible if you have a direct URL to them.
    2. uv.lock uniquely preserves access to ghost packages. Because uv.lock stores direct URLs to distribution files rather than relying on the index API at install time, uv sync can successfully install packages that have already been removed, even with cache disabled. No other Python lock file implementation tested behaved this way.
    3. This creates a supply chain attack vector. An attacker could upload a malicious package, immediately remove it to dodge automated security scanning, and still have it installable via a uv.lock file, or combine this with the xz-style strategy of hiding malicious additions in large, auto-generated lock files that nobody reviews.
    4. Removed package names can be hijacked with version collisions. When an owner removes a package, the name can be reclaimed by someone else who can upload different distribution types under the same version number, as happened with "umap." Lock files help until you regenerate them, then you're exposed.
    5. Your dependency scanning needs to cover lock files, not just manifest files. Scanning only pyproject.toml or requirements.txt misses threats embedded in lock files, which is where the actual resolved URLs and hashes live.

Brian #2: Fence for Sandboxing

  • Suggested by Martin Häcker
  • “Some coding platforms have since integrated built-in sandboxing (e.g., Claude Code) to restrict write access to directories and/or network connectivity. However, these safeguards are typically optional and not enabled by default.”
  • “JY Tan (on cc) has extracted the sandboxing logic from Claude Code and repackaged it into a standalone Go binary.”
  • Source code on GitHub: https://github.com/Use-Tusk/fence
  • Related:

Michael #3: MALUS: Liberate Open Source

  • via Paul Bauer
  • The service will generate the specs of a library with one AI and build the newly licensed library using the specs with another AI circumventing the licensing and copyright rules.
  • AI that has not been trained on open source reads the docs and API signature, creates a spec. Another AI processes that spec into working software.
  • Is it a real site? Are they accepting real money, or are they just trying to cause a stir around copyright?

Brian #4: Harden your GitHub Actions Workflows with zizmor, dependency pinning, and dependency cooldowns

Extras

Brian:

Michael:

Joke: Can you?

Episode Transcript

Collapse transcript

00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:05 This is episode 475, recorded March 30th, 2026.

00:10 And I'm Brian Okken.

00:11 And I'm Michael Kennedy.

00:12 And this episode, as is regular lately, is brought to you by us.

00:16 All of the stuff, the books, courses, head on over to Python Bytes.

00:21 Wait, yeah, Python Bytes.fm.

00:22 We have links to everything, but there's also Talk Python.com.

00:27 That's right.

00:28 Talk.com will get you there.

00:29 You know, just redirect to.fm.

00:31 It's all good.

00:31 Okay.

00:32 talkpython.fm.

00:33 Right.

00:34 Okay.

00:34 And Talk Python training, of course.

00:37 I've watched and done so many courses on there.

00:40 It's a great resource.

00:42 And if you'd like to learn pytest, there's a course there.

00:45 But there's also pythontest.com.

00:47 And thank you to our Patreon supporters, as usual.

00:50 And also, thanks to everybody to subscribe to the newsletter, because it's fun to put together.

00:55 And we have a lot of background information.

00:57 So we like to send out all of the links to everything we talk about on there.

01:02 And you can reach us to send us topics that you'd like us to talk about or topics you'd like us to stop talking about, whatever.

01:10 The contact stuff is on pythonbytes.fm, but we're on Mastodon and Bluesky.

01:17 And yeah, and there's also a contact form there that you can get.

01:21 And if you're listening to this, thank you.

01:23 And also, if you'd like to watch the show live or at least watch it, the recording later,

01:28 you can go on to pythonbytes.fm/live and either be part of the audience or like a ghost.

01:37 Like a ghost.

01:38 Let's lock the ghost.

01:39 How about that?

01:40 So there's this interesting article at CERT.at.

01:45 I'm guessing that is the way.

01:46 And this one is super relevant to us.

01:48 This is a security place, security website.

01:52 Lock the ghost.

01:53 In the software world, remove is not always equal to gone, completely gone.

01:59 This is crystal clear.

02:00 There's always a good reason for that, but even the best reasons do not,

02:03 does not have to be intuitive or expected by the users.

02:06 Let's take a short trip through how Python package index handles removals

02:10 and how we can lock the ghost in a uv lock file forever, forever.

02:15 So this is a security thing and it's specifically, uniquely an issue for uv

02:22 and the uv lock file in particular.

02:25 So if you're using uv like I do with like uv pip compile, uv and then requirements.txt, that kind of thing,

02:33 doesn't apply.

02:33 uv.lockfile.

02:35 We're both huge fans of uv, and one of the reasons we are fans is because of the performance, right?

02:41 It's so fast and it bundles so many tools together.

02:44 Some of these are making really interesting trade-offs.

02:47 Often those trade-offs are certainly fine, you know, like a short caching period.

02:52 So if you ask it to install something and it did it 10 seconds ago, it's not going to go and ask the APIs for it again

02:58 and that sort of thing.

03:00 Or uv Python install, which is awesome.

03:03 It gets you Python in a couple of seconds instead of forever with a bunch of buttons,

03:07 you know, next, next, next, confirm, agree, confirm, next, next, yes.

03:10 You know, like that installer experience.

03:12 So those are all good, but I guess this is a bit of a negative consequence

03:17 of having some of these optimizations.

03:19 So I pulled out some, I'll read my notes here.

03:21 So the essence is in the uv lock file, it points directly to the final file on the CDN, I'm guessing,

03:29 or even the storage.

03:30 But, you know, even if you remove something from the storage, it doesn't necessarily remove it from the CDN fastly and so on, right?

03:36 So however it is, it points to the very final file.

03:40 In when something is yanked or removed from PyPI, it goes out of the listing.

03:44 You can't find it.

03:45 You ask pip to install it.

03:46 It's not there.

03:47 but the underlying file is still hanging around.

03:50 So if you have a direct URL to the result file, instead of following the redirects or whatever,

03:56 that file doesn't necessarily get removed.

03:57 That's what that opening was about, right?

03:59 So that's basically the problem.

04:01 If the file is still there, the file is still there even if it gets yanked, right?

04:06 So there's a couple of interesting knock-on effects.

04:08 So uv lock uniquely preserves this, these ghost packages, they call them in this file.

04:13 So instead of removing them, they just link directly to them as an optimization,

04:17 I presume, however, no other thing like Hatch or PDM or whatever links to them.

04:23 Right.

04:24 So they don't do that.

04:25 Right.

04:25 This is specifically about uv.

04:27 So it creates an interesting supply chain problem.

04:29 I mean, that's just like the security problem du jour or the year, right?

04:35 Whatever your year and fridges, the problem that all these things are getting some level

04:41 of takeover and then, you know, that's blowing into packages and other libraries that are

04:47 built into code.

04:48 And then obviously that amplifies them massively.

04:50 So in this case, an attacker could upload a malicious package and then immediately remove

04:56 it, but still have the uv lock file point at it.

05:00 Okay.

05:00 Yeah.

05:00 So if you immediately remove it, you might outrun the scanners, the automated scanners

05:06 to go, let me scan the new inbound PyPI packages, because that package doesn't exist anymore.

05:12 We don't need to scan it.

05:13 But you could craft a specific uv lock file that still points to the ghosted remnant.

05:19 You know what I mean?

05:21 Yeah, but aren't the lock files on the client side?

05:23 So it would be just people that created the client lock files during the...

05:27 Yes, that seems possible.

05:29 But imagine this, I create Molting Claw or whatever, like the world's third most popular GitHub project out there, put it up, get it working normally.

05:39 And then after it gets really popular, I update a lock file, not even the input,

05:45 not the pyproject.tom or nothing.

05:46 I just link, I just update the lock file itself to point at this ghosted malicious file.

05:54 So anybody who installs it, well, they uvsync, that installs everything in the lock file,

06:00 and off it goes.

06:01 So it's not that you ran and installed the thing.

06:05 It's that somebody could craft a lock file such that if you sync that project,

06:10 then it's installed on your machine and off to its regular badness, you know, with its setup.py or whatever.

06:16 So beware, folks.

06:17 Beware.

06:17 I'm not sure exactly what the solution here is, but it's something that could happen.

06:21 And maybe the Astral team, I'm sure the Astral team has already heard about this.

06:26 This was from last week.

06:27 Okay.

06:27 Interesting.

06:28 Well, we'll wait to hear back.

06:30 so yeah i haven't heard anything i mean i guess if i go to the end there's not like an update

06:35 how should i live this is how should i live to sum it up i presented that removed packages could

06:43 still be i don't know yeah well i mean there's a lot this it it's a security is a big thing um

06:51 anyway yeah supply chain security is extra bad because it's not even necessarily the things that

06:56 you're using it could be the things that you're using what they're using you know right and

07:00 something could change there like i'm not checking on i don't know care debt for example just pick

07:04 something out of thin air because i'm not using it directly i'm not tracking its releases i happen

07:09 to maybe be using something that uses care debt that then you know if something happened to that

07:13 package i'm not saying it has right just like thinking of like really popular third party

07:17 third level dependencies yeah yeah and uh yeah there's there's anyway we'll get into there's

07:23 we've got more security topics coming up so let's uh let's we're not gonna we're not gonna run out

07:27 are we? No. So the next step, I want to talk about a little bit more security, but this is

07:35 how to, how to rein in your AI a little bit. So this really, what am I going to talk about? This

07:42 is suggested by Martin Hecker. I think it's Hecker. It's German name, H-A-E-C-K-E-R. Anyway,

07:51 Thanks, Martin.

07:52 Anyway, for context, this seems so long ago, June of 2025.

07:59 It was less than a year ago.

08:01 Simon Willison wrote a blog post about the trifecta of AI agents of lethal, the lethal trifecta,

08:08 which is giving them access to private data, exposure to untrusted content, and ability

08:13 to externally communicate.

08:15 That's pretty much what coding agents are like now, especially if you run it in YOLO mode

08:19 or dangerous mode because, and it seems like people wouldn't do that, right?

08:25 But it's so much faster.

08:28 So if you have your agents on like ask mode, it's just like, hey, can I run this command?

08:34 Yes.

08:34 Can I run this other command?

08:36 Yes.

08:37 And so you can say, just stop asking right now.

08:40 I trust you.

08:41 But should you?

08:43 I don't know.

08:44 So if you've got private data on your device, So there's something to be concerned about.

08:50 So one of these solutions is sandboxing.

08:53 And you can, or one of the solutions is create a VM and just don't put the stuff on the VM

08:59 that you only want the AI to use.

09:03 That's a lot, that's a little, that's a extra.

09:06 That's a little extra.

09:07 And it's for people that are normally using VMs might be fine or either virtual machines

09:14 or those other things.

09:18 Containers, right.

09:18 If they're normally using containers, great.

09:21 But if that's not your normal workflow, it's a tough ask.

09:26 So Claude Code has sandboxing.

09:28 I haven't tried it out to see how clear it is.

09:31 It's a little, it apparently works great on macOS, Linux, and WSL2 uses bubble wrap.

09:39 So if you're using WSL2 for Cloud Cursor, or Claude Code, that might be okay.

09:46 But what about other agents and stuff?

09:48 So what we got a suggestion was that Claude Code has this built in.

09:55 I'm not sure how well, if it's really restricted or if it's suggestions.

10:00 Anyway, I haven't tried it out.

10:03 So I'd love to hear what other people think about the sandboxing stuff.

10:06 Anyway, the same kind of idea that Claude Code uses is pulled out as something else you can use with different...

10:13 AI agents if you want. So this is a project called Fence. It's lightweight sandboxes for terminal

10:19 agents, and it uses this similar sort of stuff that Claude Code does. And this is pretty exciting

10:27 to be able to restrict what it has access to, like file permissions. You can restrict how much

10:33 your file system it has access to. You can restrict the network access, which websites and stuff it

10:41 can access and even GitHub repos, restrict which repos.

10:48 That's all cool.

10:49 And it's also really cool that this is open source.

10:51 So this is Go code, but it's a fence project that people can contribute to.

10:58 And it's very active right now.

11:00 So I'd be excited to hear what other people think of fencing, if you think it's safe enough.

11:07 Anyway, I'm definitely going to try it out because I was actually considering buying an extra computer so that I could run it isolated.

11:16 I mean, I know that a container is way cheaper than an extra computer, but also an extra computer is not that much either.

11:23 So, yeah.

11:24 What do you all think about this?

11:25 What do you think, Michael?

11:26 Yeah, it's interesting.

11:27 I mean, a Mac mini is very cheap, right?

11:30 If you 400 bucks or something like that, it's a pretty cheap computer if you want to have a separate machine.

11:35 But also a VM potentially would work if you wanted to have some isolation.

11:39 I think this is a neat idea.

11:41 I like that it's open source.

11:42 The one thing I don't like, and I don't know that there's necessarily a great fix for that,

11:47 just given the way that it works, is it seems like you can have it work on any terminal command.

11:54 So like Claude Code or Codex CLI or Gemini CLI, whatever.

11:59 But say VS Code, Cursor, iCharm, you want to run one of those.

12:05 but have the agents that run in those more proper editors limited, that seems harder, you know?

12:11 It doesn't seem like it supports that.

12:12 Yeah.

12:13 So that's the way I like to work.

12:15 Honestly, this might be a minority opinion, but I think Claude Code and friends, the way that they work,

12:22 are an anti-pattern for how real software developers should be coding.

12:27 And what I mean by that is Claude Code and other CLI ones encourage you to just have the code just like rip by, like do this.

12:34 And it's just like, you see the code screaming by and it's like, okay, I'm done.

12:37 And then your job is to like, accept that or whatever.

12:41 Or you wait 10 minutes for it to do a thing.

12:43 I was doing a project a few days ago.

12:45 Claude Code spun up five agents that all ran for 15 minutes in parallel.

12:50 And then it gave me the result.

12:52 So that's a lot of code changes.

12:55 And that's a lot of my credits in addition to just time to wait 15 minutes and see how it came out.

13:01 So what I much prefer is to have some kind of editor, VS Code, PyCharm, whatever, where the work is happening.

13:07 And as it's making changes, I can roll up, okay, made this change.

13:11 Let me look.

13:12 Actually, it's going down the wrong path.

13:13 Hey, stop, stop, stop.

13:14 No, don't.

13:14 Look, you did this wrong.

13:15 Go that way.

13:16 You know, you're not following the patterns of this.

13:19 So with the just like streaming by like a social media feed, it encourages you not to review it while it's working.

13:25 And I think that that is not right.

13:27 I know the trend is to like not review code at all, but the trend is also to get a bunch of like unstable software.

13:32 So I think you're paying.

13:34 Anyway, I don't like the CLI ones because of that.

13:36 Therefore, I probably won't be using this, but I would like to.

13:40 That's my take.

13:40 Yeah.

13:41 It's interesting because like this is similar to, you know, hiring, hiring somebody to do work for you or,

13:48 or having an intern or a new hire or something that you don't quite trust yet

13:54 of saying, hey, I want you to do this job, but I'd like you to work for like four hours at most

14:02 and then check in.

14:03 Right, right.

14:03 Work on it this morning and then check in with me after lunch.

14:06 Something like that, right?

14:07 Yeah.

14:07 So you wouldn't want like four hours of cursor or Claude Code to run, but you might go use this many tokens or something

14:18 and then check in to make sure that you're in the right track or something.

14:22 Yeah.

14:23 Also, testing helps.

14:25 Testing absolutely helps.

14:26 It does.

14:28 But the problem is sometimes the agents are like, that test doesn't seem relevant.

14:31 It was also hard to make it fixed, so we took it out.

14:34 You know, that's happened to me.

14:36 And if you got enough tests, it's like, oh, there's some 1,100 something number of tests.

14:42 You don't notice that the one that you really needed is gone, you know?

14:45 Yeah.

14:45 Yeah, we're getting on a tangent, but I was listening to a podcast this morning or interview

14:50 with somebody that had used a like clause which I haven't I haven't done any clause yet or anything

14:57 but having a thing that controls lots of agents to do things like control his house with his pool

15:03 temperature and lights and everything and I'm like if I want my lights on in my room I turn the light

15:10 switch on it's I haven't coded anything in theory I want a smart home and practice I'm like boy that's

15:17 not really that helpful buttons are really easy though uh anyway okay um well let's go on to the

15:23 next thing what do you got indeed let's go on to the next thing and this one is this one is a

15:30 it's called malicious and it it has to do with it's also an ai one so i know some people are

15:37 overwhelmed or uninterested in the ai stuff but i don't think this is the ai in the sense that

15:41 that you're thinking about.

15:42 This is crazy.

15:43 So this is an open source copyright concept and it doesn't necessarily have to do with AI.

15:48 It just happens to be that AI is the workhorse of it.

15:51 So check this out.

15:53 And I don't know if this is a real project that people are making real money.

15:57 You can, there's like real pricing here.

16:00 So what is the idea?

16:01 The idea is, so I don't know if this is a real project because it could be put out here to cause such a backlash

16:07 that it causes a lawsuit.

16:08 That's what I'm saying.

16:10 But there is real pricing.

16:11 So here's the thing.

16:12 Remember how we had that, there was like this big debate, just I think last week about Chardet, right?

16:17 Yeah.

16:17 Chardet, Chardet, that the current maintainer, who is not the original copyright holder,

16:23 had AI recreate one, create the library, basically one generate the description and the specifications,

16:31 and then another one that has never seen any of the code, take that and then turn that into the new project 7.0

16:36 and then change the license because this new bit of code the same thing, right?

16:42 Basically this is that as a service.

16:45 - Interesting.

16:46 - Yeah, so it calls a clean room as a service.

16:49 Finally, liberation from open source obligations.

16:51 It's pretty shady, you guys.

16:53 This is bad news.

16:54 Our proprietary AI robots independently recreate open source projects from scratch.

16:59 The result, legally distinct code with corporate friendly licensing.

17:05 No attribution, no copy left, no problem.

17:07 And there's pricing for this.

17:09 I know, it's really crazy.

17:11 So the pricing is transparent pay per kilobyte pricing.

17:15 So it's focused on JavaScript at the moment.

17:17 Every package is priced by its unpacked size on npm.

17:21 How about that?

17:22 So for example, left pad, left pad, if you wanted a copyright, not copy left, left pad,

17:29 it would cost 50 cents.

17:31 If you want to express the Node.js powered web framework, 73 cents.

17:38 want um moment i don't know what moment is apparently it's pretty big it costs 42 dollars

17:43 what do you think about this brian this is nuts huh is this is real i mean like it could be um

17:51 that's like you said i don't know if this is real or not but i think it is it is a real

17:56 copyright conversation and it is a called malice i know m-a-l-u-s yeah i think i we need we need

18:03 to create a competing one that's called spite spite and malice anyway amazing liberate open

18:11 sources the h2 like how how nutso is this like i said i think it could be something that's just

18:17 trying to get attention to this problem and like cause some kind of final legal decision to come

18:22 down about it or it could be something people are just paying money well yeah we'll take it yeah i

18:26 honestly don't know you know what what what's creepy is like a decent like an evil but decent

18:32 business model might be to do something like this and just keep track of all the companies that have

18:37 paid you to steal from open source um and then you know and then like you know sue them or um or like

18:47 you know uh anyway yeah well i i leave this here for people to riminate about but i do think it's

18:54 pretty wild i think it's pretty wild i also i guess it's good to talk about it because people

19:00 are going to do this anyway right people are going to try to do clean room solutions and yeah around

19:05 stuff yeah clean room solutions have worked i mean there was um i mean goel de casa i don't know

19:13 that i'm not sure how to spell it the guy created mono um the which was the open open source version

19:20 of dot net when dot net was or yeah of dot net and C# when it was still completely commercial

19:26 and just made sure that whoever they hired to work on it had never looked at the source code or worked, you know,

19:32 and they rebuilt it.

19:32 And ultimately the outcome was that Microsoft bought them because they thought that open source was better later

19:38 instead of a virus or whatever they called it at the time.

19:41 So, I mean, that's a historical precedent for this clean room concept.

19:45 But if you just, the difference is that took multiple people six months to a year, whereas this is like an afternoon.

19:51 You know what I mean?

19:52 If you turn Claude Code loose on it.

19:54 Such is the world right now, yeah.

19:56 Yeah, such as the world right now.

19:57 But anyway, I honestly don't know how I feel about this.

20:00 I mean, it seems like a really crappy thing to do.

20:03 At the same time, it seems like you should be able to, you know, in the Google versus,

20:09 I think, Oracle case, the case about Java, and I think it was Java and Android, the Supreme

20:15 Court, whatever the highest court it went to, ruled that APIs, the signature of the APIs

20:20 are not copyrightable, right?

20:22 So that's part of the precedence, but this is the internals.

20:27 But if you take something and scrape out, these are all the APIs, and here's a description of what it does,

20:32 and you feed that to an AI, that's pretty close to doing what Google did,

20:35 but they had a team of hundreds of people or something.

20:37 You know what I mean?

20:38 I don't know.

20:39 Like I said, I don't know how to feel about this.

20:40 I'm just going to put this out there for people's awareness and move on to your next topic, Brian.

20:45 Well, I want to talk about, just change it up a little bit and talk about security.

20:53 So this one comes from us, from Matthias Schotl, I think.

20:59 Anyway, thanks, Matthias.

21:01 I sent it in through email, which, yeah, very easy to find email.

21:06 So the article, this is kind of fun because in the email he said, you know what, I wanted to suggest this, but also this topic,

21:16 but also I'm trying to get better about writing blog posts, And I appreciate that because we like blog posts.

21:23 I like to read blogs.

21:25 So he's got an article called Harden Your GitHub Action Workflows with Zizmor,

21:31 Dependency Pinning and Dependency Cooldown.

21:33 So there's three topics.

21:35 So you've got, and actually this came up because he was looking at an article like,

21:40 please let me get this.

21:41 Okay.

21:42 Like from Step Security saying an AI-powered bot actively exploited GitHub actions involving Microsoft Datadog, CNF projections, lots of things.

21:54 So this sort of, you have to basically making sure your GitHub actions are secure also,

22:00 not just your whatever thing you're building, but your actions might have a problem.

22:06 So we had actually covered Zismore, but I went and looked to see when it was. So it was episode

22:15 408 November 2024 we covered Zizmor and uh and then look at the look at the uh the repo so

22:23 Zizmor repo um it's Zizmor is a static analysis tool for GitHub actions uh I thought it was pretty

22:29 cool so we covered it and it's got a bunch of sponsors now and look at the start count hmm we

22:34 covered it in in November 2024 and right after that it kind of took off that thing totally hockey

22:40 stick how about that maybe it's because of us who knows probably not but anyway um so that's pretty

22:47 cool i'm sure at least one of those stars is from us at least one of the stars yeah like the one i

22:52 put on there maybe um anyway so the uh so what what can you do so there's supply chain issues um uh

23:02 doing static analysis of your GitHub actions definitely um something to do and this is not

23:07 What I'd like to put out is this is not just business-critical stuff.

23:12 It's really anything that you're putting out on GitHub, and especially things that you're releasing through PyPI,

23:19 because even your little left pad thing might get exploited, whatever.

23:23 You might not think about it, but somebody else could take advantage of it

23:27 to lock stuff down.

23:28 So we've got the static analysis.

23:32 The other thing he brought up is dependency pinning.

23:36 So, and this is related to the LiteLLM exploit from last week, which I don't think we covered, but hopefully everybody heard about this.

23:45 So there's one of the, and this one is creepy because apparently the, even if you pinned the dependency with version numbers, that wasn't enough because a malicious package overrode the binary with the same version number.

24:05 so you really should be checking the sha key is that shah or sha i don't know how to pronounce

24:12 that but i think typically said shah but if you call you talk about the hashing algorithm i think

24:17 people say sha so it could go either way right so but some of those that some of those are a little

24:23 bit um uh a little bit hard to i mean it's hard to do deal with it's not really hard but it's it's

24:31 less of a it's more of a pain than just typing out the version so there's a there's a tool

24:35 apparently called renovate that helps um uh for um helps for that that part of it um and you know

24:42 uv pins you like i was gonna say uv locks but now we have a problem with the uv locks on

24:48 uh so um it's like whack-a-mole it's definitely whack-a-mole so uh so using things to to check

24:56 to check those SHAs also. And then dependency cooldowns. I think you brought this up either last

25:02 week or recently. Yeah.

25:04 To be able to say, hey, I'm going to update everything, but don't update if

25:10 anything's newer than seven days or something like that. I would like to point out that

25:14 I do not do this. I do not.

25:16 When I say it, I say one week.

25:18 That's an improper fraction right there is what that is. No, I'm just kidding.

25:22 Literally, mine says one week. That says seven days, but whatever. Same idea. I think it's a very

25:26 It solves the problem that I talked about, and it solves the problem because after seven days, that thing's not going to exist on the package manifest, right?

25:33 And it solves the problem here.

25:35 It's a super simple thing, and it's not perfect, but it's a layer of defense.

25:39 Yeah, so I don't think this is too much.

25:42 So I think that I've got a project that I'm going to try this out.

25:47 I'm going to try these things.

25:48 And my guess is it's going to take me longer to figure out what to do than to actually implement everything.

25:54 Yeah.

25:55 That's how a lot of stuff is.

25:56 Like I changed, I had to change one line, but it took me two days of research

26:00 to figure out what the right choice of that one line was.

26:03 I mean, and let's get real.

26:04 I'm just going to point an agent at this article and say, could you do all this stuff for my project?

26:09 This seems like a problem.

26:10 Read it, fix it.

26:11 Research it, fix it.

26:12 Yep, exactly.

26:14 Maybe.

26:15 You can get a non-GPL version if you pay a few cents and send it through malicious.

26:19 All right.

26:20 So a real-time follow-up.

26:21 I just want to, I forgot to credit Paul Bauer who sent in the thing about malicious.

26:25 So thanks for that.

26:26 And you mentioned left pad.

26:27 I was curious, is there a Python left pad?

26:29 Yes.

26:29 In fact, there is a Python left pad.

26:31 Really?

26:32 Yes.

26:33 Inspired by the famous left pad package on npm that broke the internet.

26:37 It's a joke.

26:38 I mean, but it works.

26:39 You can pip install it.

26:40 It's called a port of the infamous left pad npm package.

26:45 Interesting.

26:45 Okay.

26:46 Yeah.

26:47 Okay.

26:49 I think we're on to extras.

26:52 I just said I have one.

26:53 Do you have some extras?

26:55 Yeah, I'll go ahead and go first.

26:57 All right.

26:58 So I want to talk about a new SaaS that I released, Brian, that people have seen me using,

27:03 but they don't know that necessarily had anything to do with me called InterviewCue.

27:07 So this is a Python built platform for doing podcasts.

27:12 So if people are out there, they're content creators, they're podcasters, they do interviews, whatever.

27:16 Give this thing a look.

27:18 The whole idea is from starting out with like Brace or about an idea, all the way until you push something out

27:23 as a final bit of audio file or video or whatever.

27:26 It's there to like make every step a little bit easier and guide that.

27:30 So I knew I was gonna talk about that this week.

27:32 So last week I pressed a stopwatch start stop when I, from the time I had downloaded the audio files

27:38 from our interview last week until I had shipped it with chapters, with album art, all that kind of stuff.

27:43 Edited final, like raw audio downloaded to final audio and the podcast feed, 18 seconds, 51, 18 minutes, 51 seconds.

27:52 - Oh, wow.

27:52 - So super excited about this.

27:54 Mostly I built it for myself, but I thought, you know, I'll put in some extra effort.

27:57 Keep finding, I actually had to rewrite it three times 'cause I'm like, yeah, this is the right UI metaphor

28:02 for how this works.

28:03 And I tried it on a few podcast episodes.

28:05 I'm like, nope, no, it's not.

28:06 This is horrible.

28:07 I can't, it's just so disorienting.

28:09 Do it again, I think it's really nailed now.

28:11 So people are doing podcasts or interviews.

28:13 I know that's not most people listening, but it's a really cool Python app.

28:16 It's a mega app.

28:17 It's like 75,000 lines of Python or something.

28:19 It does a bunch of stuff.

28:20 - Okay, nice.

28:21 Yeah, thanks.

28:22 Good dogfooding.

28:23 Yes, dogfooding.

28:24 I built for myself.

28:26 One of the things that I learned as part of that, so that gives people 250 megs of free storage unlimited.

28:33 It does free transcripts.

28:34 It does all that kind of stuff.

28:36 One of the things that makes that work is you need to be able to store stuff

28:40 that's not too expensive.

28:42 So if you store something on S3 or something like that, Azure Blob Storage, probably the same price.

28:49 They all seem to copy each other, except for DigitalOcean, which is a little bit cheaper at seven.

28:54 No, it's at one cent per gigabyte per month for a regular S3 storage.

29:01 But they just came out with this thing called Spaces, which is their S3 cold storage.

29:06 So you can put something up and say, I'm not going to access it very much.

29:09 And if I do access it, it costs a little tiny bit more.

29:12 Like instead of it costs a cent per gigabyte when you access it.

29:17 So which is, you know, more than their, their default pricing or whatever.

29:21 But if you don't access it, it's 0.007 cents per gigabyte per month.

29:28 Think how cheap that is.

29:29 That is awesome.

29:30 And you don't have to have like, oh, we have Glacier, which is its own storage system.

29:34 And then if we want to, we can move it back into S3 and out of us, like it's literally

29:38 the same API as S3.

29:39 You just use Bodo to talk to it.

29:41 But if you, your access pattern is very infrequently, which, you know, it is, you record a podcast,

29:46 maybe you touch it once or twice.

29:47 There's like a little cool trick with disk cache.

29:49 So most of the time when it's sort of in an active mode, it doesn't even go to the internet.

29:53 It just works with like a local volume at Hetzner.

29:56 And then if it needs to go back, it's still pretty cheap.

29:59 Isn't that cool?

30:01 So what would you put in the cloud that you don't access very often?

30:05 Backup files.

30:06 Like, so for example, let's say you want to store the, let's go back to interview QS, something concrete, right?

30:11 Just so it's concrete.

30:12 One of the things that we'll do is it will generate transcripts for you.

30:15 So it could take that VTT or SRT file or whatever, like a text file, put it into this cold storage.

30:22 Also put like a 30-day local cache where it works with it.

30:25 But after that, it just runs out of space.

30:27 It throws it away.

30:28 So maybe it's in this little local cache for like the two days that you're editing the podcast.

30:32 But how often do you go back to a podcast you did last year and then pull up the transcript segment and want to look at it?

30:38 Most people who would use a service like this would just go like, well, once I've produced it and downloaded the final transcript,

30:43 like they don't go back and mess with it again right so it's that kind of thing it's like when

30:47 you're creating something or you're actively editing it then you want those files there you

30:51 want that access but then pretty soon it's going to fall into like i just want it historically kept

30:55 for me okay i think there's a lot of access patterns for that all right uh back to fire and

31:00 forget so i talked about this last week this fire and forget pattern and how this was pretty sketch

31:04 that i thought i still believe that to be true um i have two things on it one i'm sorry i don't

31:10 remember who sent me this message. I can't, I'm sorry. I can't remember who sent me this, but

31:14 thank you for sending me. They said, actually, I said, starting in Python 3.12, this has been a

31:19 problem. What they said is starting in Python 3.12, what happened is the documentation pointed out

31:24 that this was a problem. Whereas previously it was a silent sort of unknown issue. So they think

31:30 that it has been there since 3.4, 3.4, whenever, whenever create task got defined and asyncio got

31:35 defined, you know, the year before async and await, which I think that's 3.5. Anyway, for a long,

31:40 long time that it has been there but in 3.12 the documents were documentation was updated say hey

31:45 this is a problem be aware of it so it could be that this has always been a problem and it's just

31:50 that you know the for people who don't know if you just go and say hey i want to fire something off

31:55 in the background to let it run on the event loop async io.create task and you give it the async

32:01 function that's not enough that is not enough to keep it from getting garbage collected potentially

32:07 because the loop itself doesn't hang on to it.

32:09 Okay, so that's the issue, right?

32:11 They think that that's been the case forever and they just document it in 3.12.

32:14 So thanks for pointing that out.

32:15 I don't know that should be true.

32:16 I looked into it and didn't find a great answer.

32:18 The next thing though is another person pointed out, Richard pointed out that Will McGugan wrote an article

32:26 called the Heisenbug lurking in your async code.

32:28 What does it talk about?

32:29 Well, if you do create task, guess what?

32:32 It could be garbage collected.

32:33 It may disappear without warning during garbage collection.

32:35 Da da da da da.

32:36 And so that's all well and good.

32:38 Thanks, Will, for writing that.

32:39 So I did another post that sort of talked about that.

32:41 But what's interesting is, luckily, Will added numbers and concrete search values.

32:47 So if I go here, there are, wait for it, 586,000 separate code files that have this pattern.

32:53 Because people have been telling me, it's not a problem, Michael.

32:55 This is some weird edge case that only you care about.

32:57 Me and the 586,000 other people, right?

33:00 Look at this.

33:00 The very first hit is like, boom.

33:02 They're not putting it into like.

33:04 So not every one of these 586,000, actually, like this is actually a documentation line here.

33:10 This one, they are holding the task.

33:12 But even on the first page, which is like a very small amount of those half a million,

33:16 there's five instances where they're doing the thing that you said you're not supposed to do.

33:20 So, all right, that's it for my extras.

33:22 But I thought that would be a fun follow-up on two accounts.

33:25 Yeah, I just have one extra.

33:27 And that is that GitHub is, I went to GitHub this morning and notice that on April 24th,

33:34 they're going to, GitHub Copilot is going to start recording interaction data

33:39 for their AI model training unless you opt out.

33:41 So a company is actually asking before they spy on you.

33:44 So that's nice.

33:46 But they're going to spy on you.

33:48 Yeah.

33:49 Well, you can opt, apparently you can opt out.

33:51 Yes, I've already opted out.

33:52 Have you?

33:53 Yeah.

33:53 I was going to, and I'm like, do I really care how they, my GitHub interactions are?

34:00 And honestly, it's kind of a no-op for me or, you know, a tree falls in the forest.

34:05 No one learns to hear it.

34:06 Like, actually, the tree does still fall.

34:07 That's a pretty human-centric perspective of the world.

34:09 But this is GitHub Copilot interaction, not your repository data, right?

34:15 That's what it says.

34:16 On April 24th, we'll start using GitHub Copilot interaction data for AM model training, unless

34:21 you say no.

34:22 I don't use GitHub Copilot.

34:24 So maybe they can have all my interactions or none of them.

34:27 They'll be the same.

34:28 When I first saw that, I thought, oh, they're going to start, they're asking for permission to use my code in my repository and my issues and stuff for training.

34:35 But that doesn't sound like what it is.

34:38 What are they?

34:39 Okay, the GitHub Copilot interactions with.

34:42 Yeah.

34:42 So the ones, probably the ones I'm responsible for, like when am I using GitHub Copilot?

34:47 Okay.

34:47 Yeah.

34:48 And like, if you go to the GitHub homepage, there's a ask Copilot sort of thing.

34:53 and there's other areas where if you do a search, I think some Copilot stuff in the PR,

34:59 you might be able to, especially if you're a paid user of Copilot, that's a much bigger thing.

35:04 Yeah, one of the interesting things is you can ask, where'd it go?

35:08 I think you can ask an agent to like, oh yeah, here we go.

35:12 If I'm looking at an issue, you can assign it to an agent to have them fix it.

35:16 I haven't tried this.

35:18 I might try this on this one.

35:20 I've already been having mine do that, but not through copilot in Claude Code i just say hey claude issue 199 of this repository i would

35:29 like to work on that can you get can you plan that out with me and have a conversation and

35:35 it just goes logs into GitHub using the gh cli pulls it down understands it and then and keeps

35:41 working with it so it's not exclusive to uh to GitHub and copilot if you have the gh cli installed

35:48 Which is very cool.

35:49 Okay.

35:50 Yeah, that looked more scary to me before.

35:52 And now I'm like, actually, I don't care.

35:54 I don't care.

35:55 Should we talk about something funny?

35:57 We shall make a joke.

35:59 So for an InterviewCue, I'm going to press Mark as asked.

36:01 There we go.

36:02 So I can't tell for sure if we did this before, but if so, it's been long enough that I think it'll be fun.

36:07 Okay.

36:08 All right.

36:09 So Will Smith and iRobot, I think that's a good sort of future, but looking back to like now type of thing, right?

36:16 So Will Smith talking to one of these robots, can an LLM write maintainable code?

36:22 The robot stares back with its mechanical eyes.

36:26 Can you?

36:29 Oh, snap.

36:30 Oh, snap.

36:34 Yeah.

36:35 I mean, it's a funny joke.

36:36 I think it's a funny joke just because of the time and so on.

36:38 And there's a lot of variations that you could have on it.

36:40 I haven't read the comments.

36:41 We have to read the comments.

36:42 But there are certainly co-workers I've had in the past who I would take Claude Code over that co-worker for working on my code together.

36:50 Yeah, definitely.

36:52 Yeah.

36:52 Not saying the Claude Code is perfect.

36:54 I just want to let it run loose.

36:55 But I've had some people who are like pretty bad, especially people taking some of my training classes.

36:59 And how did you get into this?

37:01 I mean, this company?

37:03 I had some, I'll tell you, I don't want people to feel like I'm making fun of people over like being too picky or elitist.

37:09 This is a person who worked at a, either a bank, something, let's say a bank, like something like

37:14 a bank, like a big enterprise company. And this was when I was teaching C-sharp way back in the day.

37:20 And we would do like an hour's worth of presentation and demos. And then it was,

37:25 okay, now you guys for the next hour, work on this thing. That's like a derivative version of

37:29 what we've been talking about. Right. And this person who has been employed at this company for

37:33 six months as a software developer, professionally at a bank, read the instructions. So Michael,

37:38 I need help. I said, no, no problem. What's going on here? Like, well, I can't get this

37:41 to work. And they had variable name equals some sentence, no quotes around it. I said,

37:47 oh, you got a couple of problems here. That's a string. So you need to put quotes around the

37:50 string. What are you talking about? Like, I don't know what to tell you. Like you need to put the

37:54 quote character at the beginning and end. So like the compiler knows that this is actually a string

37:59 bit, not just other keywords and stuff. Like see the thing left of the enter shift, press that

38:05 and put it at the beginning.

38:05 And it was like a challenge to get those quotes in there.

38:08 And then it still wouldn't work.

38:09 I'm like, oh, because you have to declare the variable as a string.

38:12 Like, so you have to say string space email equals whatever, or whatever it was, right?

38:17 What do you mean?

38:17 I'm like, six months as a professional developer in this language.

38:21 This was not like they're starting this language.

38:24 I'm like, okay, I will take Claude Code all day.

38:26 I will take this robot thing all day over that as a coworker.

38:29 Seriously.

38:30 So I don't think I'm being harsh to say that.

38:32 That's out of bounds of like, you shouldn't be.

38:34 You should have gotten past that step after six months, eight hours a day.

38:38 So lesson out there, if you know what quotes are, you might be able to get a job.

38:44 Yes, if you know how to make a string in a programming language.

38:49 Okay.

38:49 While we're on the tangent, I'll just get one more tangent.

38:52 So I had an interview once somebody came in and it was a contract position.

38:59 But still, I usually start with a real lowball question just to make sure.

39:09 And I usually say something like, okay, I just want to write a function in Python that takes a user input string or takes a string.

39:20 Or actually, what is it?

39:22 Write a function that takes two numbers and adds them and returns the answer.

39:26 This was a long, it took a while to get to the point where I could say, let's actually, let's stop. And I don't want to try to be cold. So I usually like ask about their background and whatever and fill out the hour. But it was clear that this wasn't going to work because they, this firstly started out with like print statements to the standard out and using the input command to get user data.

39:53 And I'm like, no, it's a function.

39:55 It just has parameters.

39:56 That's it.

39:58 Oops.

39:59 So, yeah.

40:01 Anyway, lots of different backgrounds that get into software.

40:05 So, yeah.

40:05 Yeah.

40:06 Definitely some that I would take an agent over.

40:10 But that's funny.

40:12 Let's look at the comments real quick.

40:14 Okay.

40:15 John says, man, this is going to slay on LinkedIn.

40:21 Oh, my gosh.

40:22 Yeah.

40:23 Right. Everyone acting like they're Linus Torvalds.

40:29 Yeah. So would you, LinkedIn's weird.

40:33 Every time I pick my head into LinkedIn, I like try to back out because I think it's all just full of bots.

40:38 I don't think there's any people there left.

40:40 So yeah, well, you haven't embraced your a hundred day ones attitude.

40:45 Guess not. Anyway, good episode.

40:48 Fun talking with you.

40:49 Thanks to everybody that showed up to listen and we'll see you all next week.


Want to go deeper? Check our projects




Subscribe to Python Bytes