#464: Malicious Package? No Build For You!
About the show
Connect with the hosts
- Michael: @mkennedy@fosstodon.org / @mkennedy.codes (bsky)
- Brian: @brianokken@fosstodon.org / @brianokken.bsky.social
- Show: @pythonbytes@fosstodon.org / @pythonbytes.fm (bsky)
Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am 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.
Brian #1: ty: An extremely fast Python type checker and LSP
- Charlie Marsh announced the Beta release of
tyon Dec 16 - “designed as an alternative to tools like mypy, Pyright, and Pylance.”
- Extremely fast even from first run
- Successive runs are incremental, only rerunning necessary computations as a user edits a file or function. This allows live updates.
- Includes nice visual diagnostics much like color enhanced tracebacks
- Extensive configuration control
- Nice for if you want to gradually fix warnings from ty for a project
- Also released a nice VSCode (or Cursor) extension
- Check the docs. There are lots of features.
- Also a note about disabling the default language server (or disabling ty’s language server) so you don’t have 2 running
Michael #2: Python Supply Chain Security Made Easy
- We know about supply chain security issues, but what can you do?
- Typosquatting (not great)
- Github/PyPI account take-overs (very bad)
- Enter pip-audit.
- Run it in two ways:
- Against your installed dependencies in current venv
- As a proper unit test (so when running pytest or CI/CD).
- Let others find out first, wait a week on all dependency updates:
uv pip compile requirements.piptools --upgrade --output-file requirements.txt --exclude-newer "1 week"
- Follow up article: DevOps Python Supply Chain Security
- Create a dedicated Docker image for testing dependencies with pip-audit in isolation before installing them into your venv.
- Run pip-compile / uv lock --upgrade to generate the new lock file
- Test in a ephemeral pip-audit optimized Docker container
- Only then if things pass, uv pip install / uv sync
- Add a dedicated Docker image build step that fails the
docker buildstep if a vulnerable package is found.
- Create a dedicated Docker image for testing dependencies with pip-audit in isolation before installing them into your venv.
Brian #3: typing_extensions
- Kind of a followup on the deprecation warning topic we were talking about in December.
- prioinv on Mastodon notified us that the project typing-extensions includes it as part of the backport set.
- The warnings.deprecated decorator is new to Python 3.13, but with
typing-extensions, you can use it in previous versions. - But
typing_extesionsis way cooler than just that. - The module serves 2 purposes:
- Enable use of new type system features on older Python versions.
- Enable experimentation with type system features proposed in new PEPs before they are accepted and added to the <code>typing</code> module.
- So cool.
- There’s a lot of features here. I’m hoping it allows someone to use the latest typing syntax across multiple Python versions.
- I’m “tentatively” excited. But I’m bracing for someone to tell me why it’s not a silver bullet.
Michael #4: MI6 chief: We'll be as fluent in Python as we are in Russian
- "Advances in artificial intelligence, biotechnology and quantum computing are not only revolutionizing economies but rewriting the reality of conflict, as they 'converge' to create science fiction-like tools,” said new MI6 chief Blaise Metreweli.
- She focused mainly on threats from Russia, the country is "testing us in the grey zone with tactics that are just below the threshold of war.”
- This demands what she called "mastery of technology" across the service, with officers required to become "as comfortable with lines of code as we are with human sources, as fluent in Python as we are in multiple other languages."
- Recruitment will target linguists, data scientists, engineers, and technologists alike.
Extras
Brian:
- Next chapter of Lean TDD being released today, Finding Waste in TDD
- Still going to attempt a Jan 31 deadline for first draft of book.
- That really doesn’t seem like enough time, but I’m optimistic.
- SteamDeck is not helping me find time to write
- But I very much appreciate the gift from my fam
- Send me game suggestions on Mastodon or Bluesky. I’d love to hear what you all are playing.
Michael:
- Astral has announced the Beta release of ty, which they say they are "ready to recommend to motivated users for production use."
- Reuven Lerner has a video series on Pandas 3
Joke: Error Handling in the age of AI
- Play on the inversion of JavaScript the Good Parts
Episode Transcript
Collapse transcript
00:00
00:04
00:14
00:15
00:16
00:17
00:23
00:27
00:32
00:37
00:43
00:47
00:52
00:56
00:57
00:58
00:58
00:59
00:59
01:01
01:01
01:07
01:08
01:09
01:10
01:11
01:12
01:13
01:20
01:23
01:24
01:25
01:33
01:39
01:46
01:52
01:59
02:05
02:10
02:16
02:23
02:33
02:40
02:44
02:51
02:59
03:08
03:12
03:15
03:23
03:26
03:30
03:33
03:37
03:39
03:40
03:42
03:45
03:48
03:55
03:59
04:03
04:10
04:15
04:22
04:27
04:33
04:38
04:40
04:46
04:49
04:54
04:55
05:00
05:01
05:04
05:06
05:09
05:14
05:16
05:18
05:19
05:24
05:26
05:33
05:36
05:40
05:43
05:51
05:55
05:58
06:00
06:04
06:04
06:07
06:10
06:14
06:18
06:20
06:22
06:26
06:29
06:32
06:33
06:35
06:41
06:42
06:44
06:50
06:56
06:58
07:04
07:05
07:10
07:12
07:18
07:23
07:25
07:26
07:30
07:33
07:35
07:38
07:40
07:42
07:46
07:47
07:51
07:55
07:59
08:04
08:08
08:10
08:15
08:19
08:24
08:25
08:26
08:27
08:32
08:33
08:35
08:39
08:40
08:49
08:56
09:06
09:15
09:22
09:23
09:25
09:32
09:33
09:44
09:49
09:49
09:50
10:07
10:09
10:22
10:25
10:30
10:32
10:34
10:36
10:39
10:42
10:43
10:44
10:46
10:49
10:50
10:51
10:53
10:57
10:59
11:04
11:05
11:08
11:09
11:13
11:15
11:19
11:21
11:23
11:25
11:28
11:29
11:31
11:33
11:36
11:42
11:45
11:52
11:58
12:04
12:06
12:09
12:10
12:11
12:16
12:20
12:22
12:22
12:23
12:27
12:28
12:29
12:32
12:34
12:39
12:42
12:46
12:48
12:49
12:52
12:56
13:05
13:10
13:13
13:14
13:20
13:24
13:27
13:34
13:39
13:44
13:49
13:55
14:00
14:05
14:10
14:14
14:19
14:23
14:28
14:32
14:40
14:45
14:50
14:55
15:01
15:05
15:13
15:21
15:26
15:32
15:37
15:41
15:44
15:51
15:53
15:55
15:58
16:00
16:06
16:11
16:14
16:18
16:20
16:20
16:25
16:26
16:27
16:29
16:32
16:47
16:48
16:50
17:04
17:06
17:09
17:11
17:15
17:16
17:16
17:22
17:26
17:28
17:30
17:32
17:34
17:34
17:41
17:44
17:50
17:55
18:00
18:06
18:14
18:19
18:21
18:26
18:32
18:33
18:35
18:40
18:43
18:47
18:53
18:54
18:56
19:05
19:06
19:12
19:20
19:23
19:24
19:28
19:31
19:32
19:34
19:43
19:48
19:50
19:51
19:52
19:58
20:03
20:05
20:06
20:13
20:15
20:19
20:25
20:26
20:28
20:32
20:37
20:38
20:44
20:47
20:52
20:59
21:02
21:03
21:04
21:07
21:14
21:15
21:16
21:17
21:20
21:21
21:21
21:23
21:25
21:30
21:31
21:34
21:34
21:35
21:36
21:38
21:45
21:50
21:53
21:56
22:02
22:05
22:15
22:16
22:17
22:24
22:30
22:37
22:46
22:51
22:53
22:54
22:56
23:00
23:01
23:02
23:02
23:03
23:06
23:20
23:22
23:22
23:25
23:26
23:27
23:30
23:31
23:33
23:35
23:43
23:45
23:51
23:55
23:59
24:03
24:06
24:11
24:14
24:20
24:22
24:28
24:32
24:33
24:39
24:45
24:55
25:03
25:10
25:17
25:23
25:31
25:36
25:41
25:47
25:51
25:56
26:02
26:06
26:11
26:14
26:16
26:17
26:19
26:20
26:21
26:23
26:25
26:27
26:29
26:29
26:31
26:35
26:43
26:44
26:49
26:50
26:52
26:53
27:02
27:05
27:06
27:07
27:09
27:12
27:16
27:18
27:20
27:23
27:26
27:33
27:37
27:41
27:47
27:49
27:55
27:58
28:03
28:08
28:11
28:15
28:19
28:23
28:26
28:27
28:28
28:34
28:35
28:36
28:38
28:41
28:43
28:44
28:46
28:47
28:48
28:54
29:00
29:06
29:07
29:13
29:15
29:17
29:18
29:18
29:19
29:23
29:25
29:26
29:30
29:33
29:34
29:35
29:36
29:40
29:42
29:43
29:50
29:56
30:05
30:09
30:10
30:10
30:11
30:12
30:14
30:15
30:17
30:17
30:18



